Skip to content

Commit

Permalink
Simplified project setup and reorganised dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe committed Feb 8, 2017
1 parent df132dc commit efdf70e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ python:
- "3.4"

install:
- pip install -r requirements.txt
- pip install flake8
- pip install -r requirements/test.txt

env:
matrix:
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
.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 .

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
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Django==1.10.5
-r requirements/common.txt
-r requirements/production.txt
5 changes: 0 additions & 5 deletions requirements/common.txt → requirements/base.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r test.txt
Django==1.10.5
django-debug-toolbar==1.6
3 changes: 3 additions & 0 deletions requirements/production.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r base.txt
Django==1.10.5
psycopg2==2.6.1
6 changes: 6 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit efdf70e

Please sign in to comment.