diff --git a/README.md b/README.md index e8ca942a..119d4781 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,28 @@ Join us - http://launchpad.net/taskflow -Help ----- +Testing and requirements +------------------------ -**Tox.ini** +### Requirements + +Because TaskFlow has many optional (pluggable) parts like persistence +backends and engines, we decided to split our requirements into two +parts: +- things that are absolutely required by TaskFlow (you can't use + TaskFlow without them) are put to `requirements.txt`; +- things that are required by some optional part of TaskFlow (you + can use TaskFlow without them) are put to `optional-requirements.txt`; + if you want to use the feature in question, you should add that + requirements to your project or environment; +- as usual, things that required only for running tests are put + to `test-requirements.txt`. + +### Tox.ini + +Our tox.ini describes several test environments that allow to test +TaskFlow with different python versions and sets of requirements +installed. To generate tox.ini, use the `toxgen.py` script by first installing [toxgen](https://pypi.python.org/pypi/toxgen/) and then provide that script diff --git a/optional-requirements.txt b/optional-requirements.txt new file mode 100644 index 00000000..4c0d387e --- /dev/null +++ b/optional-requirements.txt @@ -0,0 +1,22 @@ +# This file lists dependencies that are used by different +# pluggable (optional) parts of TaskFlow, like engines +# or persistence backends. They are not strictly required +# by TaskFlow (you can use TaskFlow without them), but +# so they don't go to requirements.txt. + +# Database (sqlalchemy) persistence: +SQLAlchemy<=0.7.99,<=0.9.99 +alembic>=0.4.1 + +# Database (sqlalchemy) persistence with MySQL: +pyMySQL +MySQL-python + +# Database (sqlalchemy) persistence with PostgreSQL: +psycopg2 + +# ZooKeeper backends +kazoo>=1.3.1 + +# Eventlet may be used with parallel engine +eventlet>=0.13.0 diff --git a/tox-tmpl.ini b/tox-tmpl.ini index 1ad399a6..d8d0a1d1 100644 --- a/tox-tmpl.ini +++ b/tox-tmpl.ini @@ -34,7 +34,7 @@ commands = pylint [testenv:cover] basepython = python2.7 -deps = {[testenv:py27-sa9-mysql-ev]deps} +deps = {[testenv:py27]deps} commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:venv] @@ -52,7 +52,9 @@ deps = {[testenv:py26-sa7-mysql-ev]deps} [testenv:py27] basepython = python2.7 -deps = {[testenv:py27-sa9-mysql-ev]deps} +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/optional-requirements.txt + -r{toxinidir}/test-requirements.txt [testenv:py33] basepython = python3.3 diff --git a/tox.ini b/tox.ini index 13bbf71f..e30b39ec 100644 --- a/tox.ini +++ b/tox.ini @@ -65,7 +65,7 @@ commands = pylint [testenv:cover] basepython = python2.7 -deps = {[testenv:py27-sa9-mysql-ev]deps} +deps = {[testenv:py27]deps} commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:venv] @@ -81,7 +81,9 @@ deps = {[testenv:py26-sa7-mysql-ev]deps} [testenv:py27] basepython = python2.7 -deps = {[testenv:py27-sa9-mysql-ev]deps} +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/optional-requirements.txt + -r{toxinidir}/test-requirements.txt [testenv:py33] basepython = python3.3