From b9df77bc5325e3842457f60adfa6ec0b3a122e77 Mon Sep 17 00:00:00 2001 From: Merlin Buczek Date: Tue, 30 Apr 2019 17:59:21 +0200 Subject: [PATCH] Dependency workflow setup --- requirements/Makefile | 13 ++++++++ requirements/README.md | 6 ++++ requirements/base.in | 6 ++++ requirements/base.txt | 34 +++++++++++++++---- requirements/dev.in | 9 +++++ requirements/dev.txt | 66 +++++++++++++++++++++++++++++++++++++ requirements/local.txt | 21 ------------ requirements/production.in | 3 ++ requirements/production.txt | 34 ++++++++++++++++++- requirements/test.in | 9 +++++ requirements/test.txt | 44 +++++++++++++++++++++++++ 11 files changed, 217 insertions(+), 28 deletions(-) create mode 100644 requirements/Makefile create mode 100644 requirements/README.md create mode 100644 requirements/base.in create mode 100644 requirements/dev.in create mode 100644 requirements/dev.txt delete mode 100644 requirements/local.txt create mode 100644 requirements/production.in create mode 100644 requirements/test.in create mode 100644 requirements/test.txt diff --git a/requirements/Makefile b/requirements/Makefile new file mode 100644 index 0000000..35c769a --- /dev/null +++ b/requirements/Makefile @@ -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 \ No newline at end of file diff --git a/requirements/README.md b/requirements/README.md new file mode 100644 index 0000000..aab53b5 --- /dev/null +++ b/requirements/README.md @@ -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`. + diff --git a/requirements/base.in b/requirements/base.in new file mode 100644 index 0000000..d966ab7 --- /dev/null +++ b/requirements/base.in @@ -0,0 +1,6 @@ +# Django +Django +django-environ + +wagtail +wagtail-modeltranslation diff --git a/requirements/base.txt b/requirements/base.txt index e90def5..c9b41b5 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -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 diff --git a/requirements/dev.in b/requirements/dev.in new file mode 100644 index 0000000..00cd27c --- /dev/null +++ b/requirements/dev.in @@ -0,0 +1,9 @@ +-r ./test.txt + +ipdb +psycopg2-binary +pip-tools + +# Django +factory-boy +django-debug-toolbar diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..dfe5002 --- /dev/null +++ b/requirements/dev.txt @@ -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 diff --git a/requirements/local.txt b/requirements/local.txt deleted file mode 100644 index 2d28b7d..0000000 --- a/requirements/local.txt +++ /dev/null @@ -1,21 +0,0 @@ --r ./base.txt - -ipdb==0.12 # https://github.com/gotcha/ipdb -psycopg2-binary==2.8.2 # https://github.com/psycopg/psycopg2 - -# Testing -# ------------------------------------------------------------------------------ -pytest==4.4.1 # https://github.com/pytest-dev/pytest - -# Code quality -# ------------------------------------------------------------------------------ -flake8==3.7.7 # https://github.com/PyCQA/flake8 -coverage==4.5.3 # https://github.com/nedbat/coveragepy - -# Django -# ------------------------------------------------------------------------------ -factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy - -django-debug-toolbar==1.11 # https://github.com/jazzband/django-debug-toolbar -django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.4.8 # https://github.com/pytest-dev/pytest-django diff --git a/requirements/production.in b/requirements/production.in new file mode 100644 index 0000000..d2e532e --- /dev/null +++ b/requirements/production.in @@ -0,0 +1,3 @@ +-r ./base.txt + +python-ldap diff --git a/requirements/production.txt b/requirements/production.txt index bdedda3..16cb43b 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -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 diff --git a/requirements/test.in b/requirements/test.in new file mode 100644 index 0000000..7a330c3 --- /dev/null +++ b/requirements/test.in @@ -0,0 +1,9 @@ +-r ./base.txt + +pytest +pytest-django + +# Code quality +flake8 +coverage +django-coverage-plugin diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..ee09dcd --- /dev/null +++ b/requirements/test.txt @@ -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