From 3ff450f47110a81b4a1746de0caf678f95d8364d Mon Sep 17 00:00:00 2001 From: Oliver Stolpe Date: Thu, 1 Feb 2024 16:27:31 +0100 Subject: [PATCH] Django update to 3.2, Python 3.10 --- .github/workflows/ci.yml | 4 +--- requirements/base.txt | 40 ++++++++++++++++++------------------- requirements/production.txt | 6 +++--- requirements/test.txt | 24 +++++++++++----------- utils/docker/Dockerfile | 2 +- 5 files changed, 37 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa905ce..9fffe40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: with: conda-channels: defaults,bioconda,conda-forge - name: Install mamba. - run: conda install -y mamba python=3.8 + run: conda install -y mamba - name: Install the cadd-scripts package from bioconda run: mamba install -y cadd-scripts @@ -21,9 +21,7 @@ jobs: uses: actions/checkout@v2 - name: Install project Python dependencies run: | - pip install -r requirements/base.txt pip install -r requirements/test.txt - pip install -r requirements/production.txt - name: Run tests run: | coverage run --rcfile=.coveragerc manage.py test -v 2 --settings=config.settings.test diff --git a/requirements/base.txt b/requirements/base.txt index 18d3605..d423a98 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,27 +1,27 @@ -pytz==2019.2 # https://github.com/stub42/pytz -python-slugify==3.0.3 # https://github.com/un33k/python-slugify -Pillow==6.1.0 # https://github.com/python-pillow/Pillow -argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi -redis==3.3.8 # https://github.com/antirez/redis -celery==4.3.1 # pyup: < 5.0 # https://github.com/celery/celery -django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat +pytz +python-slugify +Pillow +argon2-cffi +redis +celery +django-celery-beat -Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug -Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx +Werkzeug +Sphinx # Django # ------------------------------------------------------------------------------ -django<2.0 # pyup: < 3.0 # https://www.djangoproject.com/ -django-environ==0.4.5 # https://github.com/joke2k/django-environ -django-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils -django-allauth==0.40.0 # https://github.com/pennersr/django-allauth -django-crispy-forms==1.7.2 # https://github.com/django-crispy-forms/django-crispy-forms -django-redis==4.10.0 # https://github.com/niwinz/django-redis -django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar +django==3.2 +django-environ +django-model-utils +django-allauth +django-crispy-forms +django-redis +django-debug-toolbar # Django REST Framework -djangorestframework==3.10.3 # https://github.com/encode/django-rest-framework -coreapi==2.3.3 # https://github.com/core-api/python-client +djangorestframework +coreapi -jsonfield==2.1.1 -ipdb==0.12.2 # https://github.com/gotcha/ipdb +jsonfield +ipdb diff --git a/requirements/production.txt b/requirements/production.txt index 9458ed3..9c120bf 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -2,9 +2,9 @@ -r ./base.txt -gunicorn==19.9.0 # https://github.com/benoitc/gunicorn -Collectfast==1.0.0 # https://github.com/antonagestam/collectfast +gunicorn +Collectfast # Django # ------------------------------------------------------------------------------ -django-anymail[mailgun]==6.1.0 # https://github.com/anymail/django-anymail +django-anymail[mailgun] diff --git a/requirements/test.txt b/requirements/test.txt index 7bb3074..a137aae 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -2,22 +2,22 @@ # Testing # ------------------------------------------------------------------------------ -mypy==0.720 # https://github.com/python/mypy -pytest==5.1.2 # https://github.com/pytest-dev/pytest -pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar +mypy +pytest +pytest-sugar # Code quality # ------------------------------------------------------------------------------ -flake8==3.7.8 # https://github.com/PyCQA/flake8 -coverage==4.5.4 # https://github.com/nedbat/coveragepy -black==22.3.0 # https://github.com/ambv/black -pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django -pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery +flake8 +coverage +black +pylint-django +pylint-celery # Django # ------------------------------------------------------------------------------ -factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy +factory-boy -django-extensions==2.2.1 # https://github.com/django-extensions/django-extensions -django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django +django-extensions +django-coverage-plugin +pytest-django diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile index 3862097..51c9809 100644 --- a/utils/docker/Dockerfile +++ b/utils/docker/Dockerfile @@ -4,7 +4,7 @@ # Base # --------------------------------------------------------------------------- -FROM python:3.8 AS base +FROM python:3.10-bookworm AS base ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8