Refactor requirements

This commit is contained in:
Daniel Egger 2022-02-02 12:29:17 +01:00
parent 594eca5971
commit 0735a21dd5
10 changed files with 592 additions and 72 deletions

View File

@ -23,7 +23,7 @@ DEBUG = env.bool("DJANGO_DEBUG", False)
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# though not all of them may be available with every OS. # though not all of them may be available with every OS.
# In Windows, this must be set to your system time zone. # In Windows, this must be set to your system time zone.
TIME_ZONE = "UTC" TIME_ZONE = "Europe/Zurich"
# https://docs.djangoproject.com/en/dev/ref/settings/#language-code # https://docs.djangoproject.com/en/dev/ref/settings/#language-code
LANGUAGE_CODE = "en-us" LANGUAGE_CODE = "en-us"
# https://docs.djangoproject.com/en/dev/ref/settings/#site-id # https://docs.djangoproject.com/en/dev/ref/settings/#site-id

View File

@ -7,6 +7,7 @@ volumes:
services: services:
django: django:
build: build:
- ./.envs/.local/.postgres
context: . context: .
dockerfile: ./compose/local/django/Dockerfile dockerfile: ./compose/local/django/Dockerfile
image: vbv_lernwelt_local_django image: vbv_lernwelt_local_django

12
requirements/README.md Normal file
View File

@ -0,0 +1,12 @@
# requirements management
The python dependencies in requirements.txt are now managed with [pip-tools](https://github.com/jazzband/pip-tools)
Only edit *.in files to add or adapt dependency
Run the following commands to compile new requirements*.txt files
```
pip-compile --output-file=requirements.txt requirements.in
pip-compile --output-file=requirements-dev.txt requirements-dev.in
```

View File

@ -1,23 +0,0 @@
pytz==2021.3 # https://github.com/stub42/pytz
python-slugify==5.0.2 # https://github.com/un33k/python-slugify
Pillow==9.0.0 # https://github.com/python-pillow/Pillow
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
whitenoise==5.3.0 # https://github.com/evansd/whitenoise
redis==4.1.2 # https://github.com/redis/redis-py
hiredis==2.0.0 # https://github.com/redis/hiredis-py
uvicorn[standard]==0.17.0.post1 # https://github.com/encode/uvicorn
# Django
# ------------------------------------------------------------------------------
django==3.2.11 # pyup: < 4.0 # https://www.djangoproject.com/
django-environ==0.8.1 # https://github.com/joke2k/django-environ
django-model-utils==4.2.0 # https://github.com/jazzband/django-model-utils
django-allauth==0.47.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.6 # https://github.com/django-crispy-forms/crispy-bootstrap5
django-redis==5.2.0 # https://github.com/jazzband/django-redis
# Django REST Framework
djangorestframework==3.13.1 # https://github.com/encode/django-rest-framework
django-cors-headers==3.11.0 # https://github.com/adamchainz/django-cors-headers
# DRF-spectacular for api documentation
drf-spectacular==0.21.1

View File

@ -1,37 +0,0 @@
-r base.txt
Werkzeug[watchdog]==2.0.2 # https://github.com/pallets/werkzeug
ipdb==0.13.9 # https://github.com/gotcha/ipdb
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2
watchgod==0.7 # https://github.com/samuelcolvin/watchgod
# Testing
# ------------------------------------------------------------------------------
mypy==0.931 # https://github.com/python/mypy
django-stubs==1.9.0 # https://github.com/typeddjango/django-stubs
pytest==6.2.5 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
djangorestframework-stubs==1.4.0 # https://github.com/typeddjango/djangorestframework-stubs
# Documentation
# ------------------------------------------------------------------------------
sphinx==4.4.0 # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
# Code quality
# ------------------------------------------------------------------------------
flake8==4.0.1 # https://github.com/PyCQA/flake8
flake8-isort==4.1.1 # https://github.com/gforcada/flake8-isort
coverage==6.3 # https://github.com/nedbat/coveragepy
black==21.12b0 # https://github.com/psf/black
pylint-django==2.5.0 # https://github.com/PyCQA/pylint-django
pre-commit==2.17.0 # https://github.com/pre-commit/pre-commit
# Django
# ------------------------------------------------------------------------------
factory-boy==3.2.1 # https://github.com/FactoryBoy/factory_boy
django-debug-toolbar==3.2.4 # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.1.5 # https://github.com/django-extensions/django-extensions
django-coverage-plugin==2.0.2 # https://github.com/nedbat/django_coverage_plugin
pytest-django==4.5.2 # https://github.com/pytest-dev/pytest-django

View File

@ -1,11 +0,0 @@
# PRECAUTION: avoid production dependencies that aren't in development
-r base.txt
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2
sentry-sdk==1.5.4 # https://github.com/getsentry/sentry-python
# Django
# ------------------------------------------------------------------------------
django-anymail==8.5 # https://github.com/anymail/django-anymail

View File

@ -0,0 +1,34 @@
-r requirements.in
Werkzeug[watchdog] # https://github.com/pallets/werkzeug
ipdb # https://github.com/gotcha/ipdb
watchgod # https://github.com/samuelcolvin/watchgod
pip-tools
pip<22
# Testing
# ------------------------------------------------------------------------------
mypy # https://github.com/python/mypy
django-stubs # https://github.com/typeddjango/django-stubs
pytest # https://github.com/pytest-dev/pytest
pytest-sugar # https://github.com/Frozenball/pytest-sugar
djangorestframework-stubs # https://github.com/typeddjango/djangorestframework-stubs
# Code quality
# ------------------------------------------------------------------------------
flake8 # https://github.com/PyCQA/flake8
flake8-isort # https://github.com/gforcada/flake8-isort
coverage # https://github.com/nedbat/coveragepy
black # https://github.com/psf/black
pylint-django # https://github.com/PyCQA/pylint-django
pre-commit # https://github.com/pre-commit/pre-commit
# Django
# ------------------------------------------------------------------------------
factory-boy # https://github.com/FactoryBoy/factory_boy
django-debug-toolbar # https://github.com/jazzband/django-debug-toolbar
django-extensions # https://github.com/django-extensions/django-extensions
django-coverage-plugin # https://github.com/nedbat/django_coverage_plugin
pytest-django # https://github.com/pytest-dev/pytest-django

View File

@ -0,0 +1,369 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile --output-file=requirements-dev.txt requirements-dev.in
#
appnope==0.1.2
# via ipython
argon2-cffi==21.3.0
# via -r requirements.in
argon2-cffi-bindings==21.2.0
# via argon2-cffi
asgiref==3.5.0
# via
# django
# uvicorn
astroid==2.9.3
# via pylint
asttokens==2.0.5
# via stack-data
attrs==21.4.0
# via
# jsonschema
# pytest
backcall==0.2.0
# via ipython
black==22.1.0
# via
# -r requirements-dev.in
# ipython
certifi==2021.10.8
# via
# requests
# sentry-sdk
cffi==1.15.0
# via
# argon2-cffi-bindings
# cryptography
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.11
# via requests
click==8.0.3
# via
# black
# pip-tools
# uvicorn
coreapi==2.3.3
# via djangorestframework-stubs
coreschema==0.0.4
# via coreapi
coverage==6.3.1
# via
# -r requirements-dev.in
# django-coverage-plugin
crispy-bootstrap5==0.6
# via -r requirements.in
cryptography==36.0.1
# via pyjwt
decorator==5.1.1
# via
# ipdb
# ipython
defusedxml==0.7.1
# via python3-openid
deprecated==1.2.13
# via redis
distlib==0.3.4
# via virtualenv
django==3.2.12
# via
# -r requirements.in
# crispy-bootstrap5
# django-allauth
# django-cors-headers
# django-debug-toolbar
# django-extensions
# django-model-utils
# django-redis
# django-stubs
# django-stubs-ext
# djangorestframework
# drf-spectacular
django-allauth==0.47.0
# via -r requirements.in
django-cors-headers==3.11.0
# via -r requirements.in
django-coverage-plugin==2.0.2
# via -r requirements-dev.in
django-crispy-forms==1.14.0
# via
# -r requirements.in
# crispy-bootstrap5
django-debug-toolbar==3.2.4
# via -r requirements-dev.in
django-environ==0.8.1
# via -r requirements.in
django-extensions==3.1.5
# via -r requirements-dev.in
django-model-utils==4.2.0
# via -r requirements.in
django-redis==5.2.0
# via -r requirements.in
django-stubs==1.9.0
# via
# -r requirements-dev.in
# djangorestframework-stubs
django-stubs-ext==0.3.1
# via django-stubs
djangorestframework==3.13.1
# via
# -r requirements.in
# drf-spectacular
djangorestframework-stubs==1.4.0
# via -r requirements-dev.in
drf-spectacular==0.21.2
# via -r requirements.in
executing==0.8.2
# via stack-data
factory-boy==3.2.1
# via -r requirements-dev.in
faker==12.0.0
# via factory-boy
filelock==3.4.2
# via virtualenv
flake8==4.0.1
# via
# -r requirements-dev.in
# flake8-isort
flake8-isort==4.1.1
# via -r requirements-dev.in
gunicorn==20.1.0
# via -r requirements.in
h11==0.13.0
# via uvicorn
hiredis==2.0.0
# via -r requirements.in
httptools==0.3.0
# via uvicorn
identify==2.4.7
# via pre-commit
idna==3.3
# via requests
inflection==0.5.1
# via drf-spectacular
iniconfig==1.1.1
# via pytest
ipdb==0.13.9
# via -r requirements-dev.in
ipython==8.0.1
# via ipdb
isort==5.10.1
# via
# flake8-isort
# pylint
itypes==1.2.0
# via coreapi
jedi==0.18.1
# via ipython
jinja2==3.0.3
# via coreschema
jsonschema==4.4.0
# via drf-spectacular
lazy-object-proxy==1.7.1
# via astroid
markupsafe==2.0.1
# via jinja2
matplotlib-inline==0.1.3
# via ipython
mccabe==0.6.1
# via
# flake8
# pylint
mypy==0.931
# via
# -r requirements-dev.in
# django-stubs
# djangorestframework-stubs
mypy-extensions==0.4.3
# via
# black
# mypy
nodeenv==1.6.0
# via pre-commit
oauthlib==3.2.0
# via requests-oauthlib
packaging==21.3
# via
# pytest
# pytest-sugar
# redis
parso==0.8.3
# via jedi
pathspec==0.9.0
# via black
pep517==0.12.0
# via pip-tools
pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pillow==9.0.0
# via -r requirements.in
pip-tools==6.4.0
# via -r requirements-dev.in
platformdirs==2.4.1
# via
# black
# pylint
# virtualenv
pluggy==1.0.0
# via pytest
pre-commit==2.17.0
# via -r requirements-dev.in
prompt-toolkit==3.0.26
# via ipython
psycopg2-binary==2.9.3
# via -r requirements.in
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
py==1.11.0
# via pytest
pycodestyle==2.8.0
# via flake8
pycparser==2.21
# via cffi
pyflakes==2.4.0
# via flake8
pygments==2.11.2
# via ipython
pyjwt[crypto]==2.3.0
# via django-allauth
pylint==2.12.2
# via
# pylint-django
# pylint-plugin-utils
pylint-django==2.5.0
# via -r requirements-dev.in
pylint-plugin-utils==0.7
# via pylint-django
pyparsing==3.0.7
# via packaging
pyrsistent==0.18.1
# via jsonschema
pytest==6.2.5
# via
# -r requirements-dev.in
# pytest-django
# pytest-sugar
pytest-django==4.5.2
# via -r requirements-dev.in
pytest-sugar==0.9.4
# via -r requirements-dev.in
python-dateutil==2.8.2
# via faker
python-dotenv==0.19.2
# via uvicorn
python-slugify==5.0.2
# via -r requirements.in
python3-openid==3.2.0
# via django-allauth
pytz==2021.3
# via
# -r requirements.in
# django
# djangorestframework
pyyaml==6.0
# via
# drf-spectacular
# pre-commit
# uvicorn
redis==4.1.2
# via
# -r requirements.in
# django-redis
requests==2.27.1
# via
# coreapi
# django-allauth
# djangorestframework-stubs
# requests-oauthlib
requests-oauthlib==1.3.1
# via django-allauth
sentry-sdk==1.5.4
# via -r requirements.in
six==1.16.0
# via
# asttokens
# django-coverage-plugin
# python-dateutil
# virtualenv
sqlparse==0.4.2
# via
# django
# django-debug-toolbar
stack-data==0.1.4
# via ipython
termcolor==1.1.0
# via pytest-sugar
testfixtures==6.18.3
# via flake8-isort
text-unidecode==1.3
# via python-slugify
toml==0.10.2
# via
# django-stubs
# ipdb
# pre-commit
# pylint
# pytest
tomli==2.0.0
# via
# black
# mypy
# pep517
traitlets==5.1.1
# via
# ipython
# matplotlib-inline
types-pytz==2021.3.4
# via django-stubs
types-pyyaml==6.0.4
# via django-stubs
typing-extensions==4.0.1
# via
# django-stubs
# django-stubs-ext
# djangorestframework-stubs
# mypy
uritemplate==4.1.1
# via
# coreapi
# drf-spectacular
urllib3==1.26.8
# via
# requests
# sentry-sdk
uvicorn[standard]==0.17.1
# via -r requirements.in
uvloop==0.16.0
# via uvicorn
virtualenv==20.13.0
# via pre-commit
watchdog==2.1.6
# via werkzeug
watchgod==0.7
# via
# -r requirements-dev.in
# uvicorn
wcwidth==0.2.5
# via prompt-toolkit
websockets==10.1
# via uvicorn
werkzeug[watchdog]==2.0.2
# via -r requirements-dev.in
wheel==0.37.1
# via pip-tools
whitenoise==5.3.0
# via -r requirements.in
wrapt==1.13.3
# via
# astroid
# deprecated
# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools

View File

@ -0,0 +1,27 @@
pytz # https://github.com/stub42/pytz
python-slugify # https://github.com/un33k/python-slugify
Pillow # https://github.com/python-pillow/Pillow
argon2-cffi # https://github.com/hynek/argon2_cffi
whitenoise # https://github.com/evansd/whitenoise
redis # https://github.com/redis/redis-py
hiredis # https://github.com/redis/hiredis-py
uvicorn[standard] # https://github.com/encode/uvicorn
# Django
# ------------------------------------------------------------------------------
django<4 # https://www.djangoproject.com/
django-environ # https://github.com/joke2k/django-environ
django-model-utils # https://github.com/jazzband/django-model-utils
django-allauth # https://github.com/pennersr/django-allauth
django-crispy-forms # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5 # https://github.com/django-crispy-forms/crispy-bootstrap5
django-redis # https://github.com/jazzband/django-redis
# Django REST Framework
djangorestframework # https://github.com/encode/django-rest-framework
django-cors-headers # https://github.com/adamchainz/django-cors-headers
# DRF-spectacular for api documentation
drf-spectacular
psycopg2-binary
gunicorn
sentry-sdk

View File

@ -0,0 +1,148 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile --output-file=requirements.txt requirements.in
#
argon2-cffi==21.3.0
# via -r requirements.in
argon2-cffi-bindings==21.2.0
# via argon2-cffi
asgiref==3.5.0
# via
# django
# uvicorn
attrs==21.4.0
# via jsonschema
certifi==2021.10.8
# via
# requests
# sentry-sdk
cffi==1.15.0
# via
# argon2-cffi-bindings
# cryptography
charset-normalizer==2.0.11
# via requests
click==8.0.3
# via uvicorn
crispy-bootstrap5==0.6
# via -r requirements.in
cryptography==36.0.1
# via pyjwt
defusedxml==0.7.1
# via python3-openid
deprecated==1.2.13
# via redis
django==3.2.12
# via
# -r requirements.in
# crispy-bootstrap5
# django-allauth
# django-cors-headers
# django-model-utils
# django-redis
# djangorestframework
# drf-spectacular
django-allauth==0.47.0
# via -r requirements.in
django-cors-headers==3.11.0
# via -r requirements.in
django-crispy-forms==1.14.0
# via
# -r requirements.in
# crispy-bootstrap5
django-environ==0.8.1
# via -r requirements.in
django-model-utils==4.2.0
# via -r requirements.in
django-redis==5.2.0
# via -r requirements.in
djangorestframework==3.13.1
# via
# -r requirements.in
# drf-spectacular
drf-spectacular==0.21.2
# via -r requirements.in
gunicorn==20.1.0
# via -r requirements.in
h11==0.13.0
# via uvicorn
hiredis==2.0.0
# via -r requirements.in
httptools==0.3.0
# via uvicorn
idna==3.3
# via requests
inflection==0.5.1
# via drf-spectacular
jsonschema==4.4.0
# via drf-spectacular
oauthlib==3.2.0
# via requests-oauthlib
packaging==21.3
# via redis
pillow==9.0.0
# via -r requirements.in
psycopg2-binary==2.9.3
# via -r requirements.in
pycparser==2.21
# via cffi
pyjwt[crypto]==2.3.0
# via django-allauth
pyparsing==3.0.7
# via packaging
pyrsistent==0.18.1
# via jsonschema
python-dotenv==0.19.2
# via uvicorn
python-slugify==5.0.2
# via -r requirements.in
python3-openid==3.2.0
# via django-allauth
pytz==2021.3
# via
# -r requirements.in
# django
# djangorestframework
pyyaml==6.0
# via
# drf-spectacular
# uvicorn
redis==4.1.2
# via
# -r requirements.in
# django-redis
requests==2.27.1
# via
# django-allauth
# requests-oauthlib
requests-oauthlib==1.3.1
# via django-allauth
sentry-sdk==1.5.4
# via -r requirements.in
sqlparse==0.4.2
# via django
text-unidecode==1.3
# via python-slugify
uritemplate==4.1.1
# via drf-spectacular
urllib3==1.26.8
# via
# requests
# sentry-sdk
uvicorn[standard]==0.17.1
# via -r requirements.in
uvloop==0.16.0
# via uvicorn
watchgod==0.7
# via uvicorn
websockets==10.1
# via uvicorn
whitenoise==5.3.0
# via -r requirements.in
wrapt==1.13.3
# via deprecated
# The following packages are considered to be unsafe in a requirements file:
# setuptools