diff --git a/README.rst b/README.rst index b370a23..8c1bcab 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ Use pypi to install the latest oemof version. .. code:: bash - pip3 install oemof + pip3 install oemof.db If you want to have the developer version clone the repository by diff --git a/doc/conf.py b/doc/conf.py index de65d34..d94b00e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -60,7 +60,7 @@ # built documents. # # The short X.Y version. -version = '0.0.4' +version = '0.0.5' # The full version, including alpha/beta/rc tags. release = version diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 24ed21e..4a236d1 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -8,6 +8,7 @@ These are new features and improvements of note in each release :local: :backlinks: top +.. include:: whatsnew/v0005.txt .. include:: whatsnew/v0004.txt .. include:: whatsnew/v0003.txt .. include:: whatsnew/v0002.txt diff --git a/doc/whatsnew/v0005.txt b/doc/whatsnew/v0005.txt new file mode 100644 index 0000000..68c60f6 --- /dev/null +++ b/doc/whatsnew/v0005.txt @@ -0,0 +1,14 @@ +v0.0.5 (March 20th, 2017) ++++++++++++++++++++++++++ + +Bug fixes +######### + + * In order to play well with `oemof`, `oemof/db/__init__.py` has been + removed. This should fix `oemof`'s `issue #269 `_. + +Contributors +############ + + * Stephan Günther + diff --git a/oemof/__init__.py b/oemof/__init__.py deleted file mode 100644 index 3ad9513..0000000 --- a/oemof/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) diff --git a/oemof/db/__init__.py b/oemof/db/__init__.py index 5f2bd7a..9cea4cc 100755 --- a/oemof/db/__init__.py +++ b/oemof/db/__init__.py @@ -6,6 +6,8 @@ import getpass +__version__ = '0.0.5' + def url(section="postGIS", config_file=None): """ Retrieve the URL used to connect to the database. diff --git a/setup.py b/setup.py index 58847b6..1d08198 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,10 @@ from setuptools import find_packages, setup setup(name='oemof.db', - version='0.0.4', + # Unfortunately we can't use a `__version__` attribute on `oemof.db` as + # we can't import that module here. It depends on packages which might + # not be available prior to installation. + version='0.0.5', description='The oemof database extension', namespace_package = ['oemof'], packages=find_packages(), diff --git a/tests/import_tests.py b/tests/import_tests.py new file mode 100644 index 0000000..a85d4bc --- /dev/null +++ b/tests/import_tests.py @@ -0,0 +1,9 @@ +from nose.tools import ok_ + +import oemof.db as oemofdb + +def test_oemofdb_imports(): + ok_(oemofdb.connection) + ok_(oemofdb.engine) + ok_(oemofdb.url) + diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..5ac8a42 --- /dev/null +++ b/tox.ini @@ -0,0 +1,14 @@ +# Tox (https://tox.readthedocs.io/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py + +[testenv:py] +setenv = + PIP_USER = false +commands = nosetests +deps = nose +