diff --git a/.travis.yml b/.travis.yml index d983b18..b6bc97b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ python: - "3.4" install: - - pip install -r requirements.txt - - pip install flake8 + - pip install -r requirements/test.txt env: matrix: diff --git a/Makefile b/Makefile index f2c486a..2c66c53 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ -.PHONY: test clean +.PHONY: test clean install_requirements setup lint help: @echo 'Available targets:' @echo ' lint Checks the codebase against PEP8 style convention.' @echo ' test Runs all the tests in the project.' @echo ' clean Removes *.pyc files.' + @echo ' install_requirements Installs local requirements for the project.' + @echo ' setup Installs requirements and runs project tests.' lint: cd src && flake8 --exclude=migrations,settings . @@ -12,5 +14,10 @@ lint: test: cd src && python manage.py test --settings=foobar.settings.test +install_requirements: + pip install -r requirements/local.txt + +setup: install_requirements test + clean: find . -name "*.pyc" | xargs rm diff --git a/requirements.txt b/requirements.txt index 7921552..ea77c2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -Django==1.10.5 --r requirements/common.txt +-r requirements/production.txt diff --git a/requirements/common.txt b/requirements/base.txt similarity index 81% rename from requirements/common.txt rename to requirements/base.txt index 421b34d..2ab3ac9 100644 --- a/requirements/common.txt +++ b/requirements/base.txt @@ -1,20 +1,15 @@ django-bananas==1.0.8 django-enumfields==0.8.2 -django-factory-boy==0.1.6 django-model-utils==2.2 git+https://github.com/disqus/django-bitfield.git@306ba5#egg=django-bitfield git+https://github.com/kjagiello/django-money.git@45ea5e#egg=django-money djangorestframework==3.5.3 django-rest-swagger==2.1.1 -factory-boy==2.5.2 Pillow==2.9.0 pluggy==0.3.0 py==1.4.30 py-moneyed==0.5.0 -pyflakes==0.8.1 six==1.9.0 -tox==2.1.1 requests==2.8.1 pytz==2015.7 -psycopg2==2.6.1 raven==5.8.1 diff --git a/requirements/local.txt b/requirements/local.txt new file mode 100644 index 0000000..ec3dfab --- /dev/null +++ b/requirements/local.txt @@ -0,0 +1,3 @@ +-r test.txt +Django==1.10.5 +django-debug-toolbar==1.6 diff --git a/requirements/production.txt b/requirements/production.txt new file mode 100644 index 0000000..fe5162e --- /dev/null +++ b/requirements/production.txt @@ -0,0 +1,3 @@ +-r base.txt +Django==1.10.5 +psycopg2==2.6.1 diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..32d5219 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,6 @@ +-r base.txt +django-factory-boy==0.1.6 +factory-boy==2.5.2 +tox==2.1.1 +pyflakes==0.8.1 +flake8==3.3.0