diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 87cf2fd..37036d1 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,7 +1,7 @@ [bumpversion] -current_version = 1.1.0 +current_version = 1.1.1 message = release: Bump version {current_version} to {new_version} tag_name = {new_version} -[bumpversion:file:backend/src/appenlight/VERSION] +[bumpversion:file:backend/VERSION] diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ac6029a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +language: python + +dist: xenial + +notifications: + on_success: change + on_failure: always + +matrix: + include: + - python: 3.5 + env: TOXENV=py35 + - python: 3.6 + env: TOXENV=py36 DB_STRING="postgres://postgres@127.0.0.1:5432/appenlight_test" DB=postgres + addons: + postgresql: "9.6" + - python: 3.6 + env: TOXENV=py36 BCRYPT="enabled" DB_STRING="postgres://postgres@127.0.0.1:5432/appenlight_test" DB=postgres PGPORT=5432 + addons: + postgresql: "10" + apt: + packages: + - postgresql-10 + - postgresql-client-10 + +install: +- travis_retry pip install -U setuptools pip tox + +script: +- travis_retry tox + +services: +- postgresql + + + +before_script: +- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database appenlight_test;' -U postgres; fi" + +after_success: +- pip install coveralls +- coveralls diff --git a/backend/README.rst b/backend/README.rst new file mode 100644 index 0000000..3d14665 --- /dev/null +++ b/backend/README.rst @@ -0,0 +1,16 @@ +.. :changelog: + +History +------- + +0.9.1 (2016-XX-XX) +++++++++++++++++++ + +* Added suppot for "NOT' operator in rule engine +* Various bugfixes + + +0.9.0 (2016-06-29) +++++++++++++++++++ + +* first tagged public release diff --git a/backend/src/appenlight/VERSION b/backend/VERSION similarity index 100% rename from backend/src/appenlight/VERSION rename to backend/VERSION diff --git a/backend/setup.py b/backend/setup.py index 80cfdfd..5d15128 100644 --- a/backend/setup.py +++ b/backend/setup.py @@ -1,11 +1,10 @@ import os -import sys import re from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) -README = open(os.path.join(here, '..', 'README.md')).read() +README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGELOG.rst')).read() REQUIREMENTS = open(os.path.join(here, 'requirements.txt')).readlines() @@ -29,10 +28,11 @@ def _get_meta_var(name, data, callback_handler=None): return callback_handler(eval(matches.groups()[0])) + with open(os.path.join(here, 'src', 'appenlight', '__init__.py'), 'r') as _meta: _metadata = _meta.read() -with open(os.path.join('src', 'appenlight', 'VERSION')) as _meta_version: +with open(os.path.join(here, 'VERSION'), 'r') as _meta_version: __version__ = _meta_version.read().strip() __license__ = _get_meta_var('__license__', _metadata) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..c684286 --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +[tox] +envlist = py35,py36 +setupdir = backend + +[testenv] +extras = dev +passenv = DB + DB_STRING + +commands= + pip install -U pip setuptools wheel + pip install -r backend/requirements.txt + pytest backend/src/appenlight/tests