Skip to content

Commit

Permalink
Dependency workflow setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin Buczek committed Apr 30, 2019
1 parent 2ba9fba commit b9df77b
Show file tree
Hide file tree
Showing 11 changed files with 217 additions and 28 deletions.
13 changes: 13 additions & 0 deletions requirements/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
objects = $(wildcard *.in)
outputs := $(objects:.in=.txt)

.PHONY: all
all: $(outputs)

%.txt: %.in
pip-compile -v --output-file $@ $<

# Dependency chain
test.txt: base.txt
production.txt: base.txt
dev.txt: test.txt
6 changes: 6 additions & 0 deletions requirements/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Requirements

Dependencies are set up using [pip-tools](https://github.com/jazzband/pip-tools).
All general dependencies in `*.in` files are pinned to `*.txt` files with `make`.
Dependencies are split into `base`, `test`, `dev` and `production`.

6 changes: 6 additions & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Django
Django
django-environ

wagtail
wagtail-modeltranslation
34 changes: 28 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
# Django
#-------------------------------------------------------------------------------
Django==2.2
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --upgrade base.in
#
beautifulsoup4==4.6.0 # via wagtail
certifi==2019.3.9 # via requests
chardet==3.0.4 # via requests
django-environ==0.4.5

wagtail==2.5
django-modelcluster==4.4 # via wagtail
django-modeltranslation==0.13.1 # via wagtail-modeltranslation
django-taggit==0.24.0 # via wagtail
django-treebeard==4.3 # via wagtail
django==2.2
djangorestframework==3.9.3 # via wagtail
draftjs-exporter==2.1.5 # via wagtail
html5lib==1.0.1 # via wagtail
idna==2.8 # via requests
pillow==5.4.1 # via wagtail
pytz==2019.1 # via django, django-modelcluster, wagtail
requests==2.21.0 # via wagtail
six==1.12.0 # via html5lib, wagtail
sqlparse==0.3.0 # via django
unidecode==1.0.23 # via wagtail
urllib3==1.24.2 # via requests
wagtail-modeltranslation==0.10.1
python-ldap==3.2.0
wagtail==2.5
webencodings==0.5.1 # via html5lib
willow==1.1 # via wagtail
9 changes: 9 additions & 0 deletions requirements/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-r ./test.txt

ipdb
psycopg2-binary
pip-tools

# Django
factory-boy
django-debug-toolbar
66 changes: 66 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile -v --output-file dev.txt dev.in
#
atomicwrites==1.3.0
attrs==19.1.0
backcall==0.1.0 # via ipython
beautifulsoup4==4.6.0
certifi==2019.3.9
chardet==3.0.4
click==7.0 # via pip-tools
coverage==4.5.3
decorator==4.4.0 # via ipython, traitlets
django-coverage-plugin==1.6.0
django-debug-toolbar==1.11
django-environ==0.4.5
django-modelcluster==4.4
django-modeltranslation==0.13.1
django-taggit==0.24.0
django-treebeard==4.3
django==2.2
djangorestframework==3.9.3
draftjs-exporter==2.1.5
entrypoints==0.3
factory-boy==2.11.1
faker==1.0.5 # via factory-boy
flake8==3.7.7
html5lib==1.0.1
idna==2.8
ipdb==0.12
ipython-genutils==0.2.0 # via traitlets
ipython==7.5.0 # via ipdb
jedi==0.13.3 # via ipython
mccabe==0.6.1
more-itertools==7.0.0
parso==0.4.0 # via jedi
pexpect==4.7.0 # via ipython
pickleshare==0.7.5 # via ipython
pillow==5.4.1
pip-tools==3.6.1
pluggy==0.9.0
prompt-toolkit==2.0.9 # via ipython
psycopg2-binary==2.8.2
ptyprocess==0.6.0 # via pexpect
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1
pygments==2.3.1 # via ipython
pytest-django==3.4.8
pytest==4.4.1
python-dateutil==2.8.0 # via faker
pytz==2019.1
requests==2.21.0
six==1.12.0
sqlparse==0.3.0
text-unidecode==1.2 # via faker
traitlets==4.3.2 # via ipython
unidecode==1.0.23
urllib3==1.24.2
wagtail-modeltranslation==0.10.1
wagtail==2.5
wcwidth==0.1.7 # via prompt-toolkit
webencodings==0.5.1
willow==1.1
21 changes: 0 additions & 21 deletions requirements/local.txt

This file was deleted.

3 changes: 3 additions & 0 deletions requirements/production.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r ./base.txt

python-ldap
34 changes: 33 additions & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
-r ./base.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile -v --output-file production.txt production.in
#
beautifulsoup4==4.6.0
certifi==2019.3.9
chardet==3.0.4
django-environ==0.4.5
django-modelcluster==4.4
django-modeltranslation==0.13.1
django-taggit==0.24.0
django-treebeard==4.3
django==2.2
djangorestframework==3.9.3
draftjs-exporter==2.1.5
html5lib==1.0.1
idna==2.8
pillow==5.4.1
pyasn1-modules==0.2.5
pyasn1==0.4.5
python-ldap==3.2.0
pytz==2019.1
requests==2.21.0
six==1.12.0
sqlparse==0.3.0
unidecode==1.0.23
urllib3==1.24.2
wagtail-modeltranslation==0.10.1
wagtail==2.5
webencodings==0.5.1
willow==1.1
9 changes: 9 additions & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-r ./base.txt

pytest
pytest-django

# Code quality
flake8
coverage
django-coverage-plugin
44 changes: 44 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile -v --output-file test.txt test.in
#
atomicwrites==1.3.0 # via pytest
attrs==19.1.0 # via pytest
beautifulsoup4==4.6.0
certifi==2019.3.9
chardet==3.0.4
coverage==4.5.3
django-coverage-plugin==1.6.0
django-environ==0.4.5
django-modelcluster==4.4
django-modeltranslation==0.13.1
django-taggit==0.24.0
django-treebeard==4.3
django==2.2
djangorestframework==3.9.3
draftjs-exporter==2.1.5
entrypoints==0.3 # via flake8
flake8==3.7.7
html5lib==1.0.1
idna==2.8
mccabe==0.6.1 # via flake8
more-itertools==7.0.0 # via pytest
pillow==5.4.1
pluggy==0.9.0 # via pytest
py==1.8.0 # via pytest
pycodestyle==2.5.0 # via flake8
pyflakes==2.1.1 # via flake8
pytest-django==3.4.8
pytest==4.4.1
pytz==2019.1
requests==2.21.0
six==1.12.0
sqlparse==0.3.0
unidecode==1.0.23
urllib3==1.24.2
wagtail-modeltranslation==0.10.1
wagtail==2.5
webencodings==0.5.1
willow==1.1

0 comments on commit b9df77b

Please sign in to comment.