This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
533 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.idea/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,68 @@ | ||
An oemof extension to use the oemof related postgis database. | ||
|
||
To use this extension you have to have access to the oemof postgis database. | ||
See `the documentation`_ for more information! | ||
|
||
.. _`the documentation`: https://oemofdb.readthedocs.io | ||
|
||
|
||
The oemof code will be released in early 2016 but you can try this extension | ||
already with the feedinlib. If you are interested to join the oemof database | ||
project please contact us. | ||
|
||
Installation | ||
++++++++++++ | ||
|
||
Clone the repository to your local system. | ||
Use pypi to install the latest oemof version. | ||
|
||
.. code:: bash | ||
pip3 install oemof | ||
If you want to have the developer version clone the repository by | ||
|
||
.. code:: bash | ||
git clone [email protected]:oemof/oemof.db.git | ||
Then you can install it using pip3 with the -e flag. | ||
and can install it using pip3 with the -e flag. | ||
|
||
.. code:: bash | ||
sudo pip3 install -e <path/to/the/oemof.db/repository/root/directory> | ||
.. _readme#configuration: | ||
|
||
Configuration | ||
+++++++++++++ | ||
Keep `virtualenvs`_ in mind! | ||
|
||
.. _`keyring package`: https://virtualenv.pypa.io | ||
|
||
Configuration and usage | ||
+++++++++++++++++++++++ | ||
|
||
As the purpose of this package is to facilitate usage of the ``oemof`` | ||
database, it needs to know how to connect to this database. Being part of | ||
``oemof``, ``oemof.db`` looks for this configuration in the file ``config.ini`` | ||
in a directory called ``.oemof`` in your home directory. | ||
``oemof``, as fallback ``oemof.db`` always looks for this configuration in the | ||
file ``config.ini`` in a directory called ``.oemof`` in your home directory. | ||
|
||
A particular config-file can either specified and accessed via | ||
|
||
|
||
.. code-block:: python | ||
from oemof.db import cfg | ||
# only load config file | ||
cfg.load_config(config_file=<you-config-file>) | ||
# access config parameters | ||
cfg.get(<section>, <parameter>) | ||
If you're interested in establishing a database connection and specify config | ||
file connection parameters are stored in use | ||
|
||
.. code-block:: python | ||
from oemof.db import cfg | ||
# establish database connection with specified section and config_file | ||
db.connection(section=<section>, config_file=<you-config-file>) | ||
To configure database access this file has to have at least one dedicated | ||
section containing the necessary options, like this: | ||
|
@@ -62,9 +94,3 @@ where ``"database"`` and ``"username"`` have the same values as the | |
corresponding options in ``config.ini``. | ||
|
||
.. _`keyring package`: https://pypi.python.org/pypi/keyring | ||
|
||
Required packages | ||
+++++++++++++++++ | ||
|
||
* python3-sqlalchemy | ||
* python3-keyring |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
oemof_pg | ||
======== | ||
oemof | ||
===== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
coastdat | ||
config | ||
db | ||
tools | ||
oemof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
oemof.db package | ||
================ | ||
|
||
Submodules | ||
---------- | ||
|
||
oemof.db.coastdat module | ||
------------------------ | ||
|
||
.. automodule:: oemof.db.coastdat | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.db.config module | ||
---------------------- | ||
|
||
.. automodule:: oemof.db.config | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.db.feedin_pg module | ||
------------------------- | ||
|
||
.. automodule:: oemof.db.feedin_pg | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.db.powerplants module | ||
--------------------------- | ||
|
||
.. automodule:: oemof.db.powerplants | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.db.test_config_changes module | ||
----------------------------------- | ||
|
||
.. automodule:: oemof.db.test_config_changes | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
oemof.db.tools module | ||
--------------------- | ||
|
||
.. automodule:: oemof.db.tools | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: oemof.db | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
oemof package | ||
============= | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
|
||
oemof.db | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: oemof | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
v0.0.4 (December 16, 2016) | ||
++++++++++++++++++++++++++ | ||
|
||
New features | ||
############ | ||
|
||
* Create an empty database table with primary key type serial in `tools.py` | ||
* Access grant to users/ group of users, see `grant_db_access` in `tools.py` | ||
* Additional optional keyword argument to specify config file (`issue #21 <https://github.com/oemof/oemof.db/issues/21>`_) | ||
* Ask for password and save store in keyring if not existent (`issue #22 <https://github.com/oemof/oemof.db/issues/22>`_) | ||
|
||
|
||
Documentation | ||
############# | ||
|
||
|
||
Testing | ||
####### | ||
|
||
|
||
Bug fixes | ||
######### | ||
|
||
* Add missing keyrings.alt dependency | ||
|
||
|
||
Other changes | ||
############# | ||
|
||
|
||
Contributors | ||
############ | ||
|
||
* Guido Pleßmann | ||
* Uwe Krien |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.