diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abf542c..46b0a12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.10", "3.11"] # Service containers to run with `container-job` services: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf065a6..27fc9af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,13 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks exclude: "docs|node_modules|migrations|.git|.tox" +# default_language_version: +# python: python3.11 default_stages: [commit] # fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -13,18 +15,18 @@ repos: - id: check-added-large-files - repo: https://github.com/psf/black - rev: 22.6.0 + rev: 23.3.0 hooks: - id: black - - repo: https://github.com/timothycrosley/isort - rev: 5.10.1 + - repo: https://github.com/pycqa/isort + rev: 5.12.0 hooks: - id: isort args: ["--profile", "black"] - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 hooks: - id: flake8 args: ["--config=tox.ini"] diff --git a/Dockerfile b/Dockerfile index 0f2a3f9..0f3dec4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.10-slim-buster +ARG PYTHON_VERSION=3.11-slim-buster FROM node:18-slim as client-builder diff --git a/apps/users/admin.py b/apps/users/admin.py index 0dafeaa..991b122 100644 --- a/apps/users/admin.py +++ b/apps/users/admin.py @@ -10,7 +10,6 @@ @admin.register(User) class UserAdmin(auth_admin.UserAdmin): - form = UserChangeForm add_form = UserCreationForm fieldsets = ( diff --git a/config/settings/base.py b/config/settings/base.py index d4f993b..22849b0 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -32,9 +32,11 @@ GOOGLE_ANALYTICS_ID = env.str("GOOGLE_ANALYTICS_ID", "G-6XRLBC4TMR") SECRET_KEY = env.str("DJANGO_SECRET_KEY", "django-insecure-xlb*ys8xwb04c&=y_z") + ############################################################################### # FILE SYSTEM AND MISC ############################################################################### + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent.parent @@ -68,6 +70,7 @@ "allauth.socialaccount", "compressor", "crispy_forms", + "crispy_bootstrap5", "django_extensions", "django_filters", "knox", @@ -304,6 +307,15 @@ } +############################################################################### +# CRISPY FORMS +############################################################################### + +CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4" + +CRISPY_TEMPLATE_PACK = "bootstrap4" + + ############################################################################### # OTHER ############################################################################### diff --git a/requirements/base.txt b/requirements/base.txt index 2708107..892c90a 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,24 +1,25 @@ argon2-cffi~=21.3.0 argon2-cffi-bindings~=21.2.0 channels~=4.0.0 -django-allauth~=0.51.0 +crispy-bootstrap5~=0.7 +django-allauth~=0.54.0 django-compressor~=4.1 -django-cors-headers~=3.13.0 -django-crispy-forms~=1.14.0 +django-cors-headers~=3.14.0 +django-crispy-forms~=2.0 django-extensions~=3.2.1 -django-filter~=22.1 +django-filter~=23.1 django-rest-knox~=4.2.0 django-storages~=1.13.1 -Django~=4.1.2 +Django~=4.2 djangorestframework~=3.14.0 environs~=9.5.0 -google-auth~=2.12.0 -google-cloud-pubsub~=2.13.10 -openpyxl~=3.0.10 -psycopg2~=2.9.4 +google-auth~=2.17.1 +google-cloud-pubsub~=2.15.2 +openpyxl~=3.1.2 +psycopg2~=2.9.5 pyexcel-io~=0.6.6 pyexcel-xlsx~=0.6.0 pyexcel~=0.7.0 toml~=0.10.2 -typing-extensions~=4.4.0 -whitenoise~=6.2.0 +typing-extensions~=4.5.0 +whitenoise~=6.4.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 34c6957..7494522 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,4 +1,4 @@ -r test.txt -ipython~=8.5.0 -pre-commit~=2.20.0 +ipython~=8.12.0 +pre-commit~=3.2.1 diff --git a/requirements/production.txt b/requirements/production.txt index 732786a..69663d8 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -2,22 +2,22 @@ # Google # ----------------------------------------------------------------------------- -google-api-core~=2.10.2 -google-api-python-client~=2.64.0 +google-api-core~=2.11.0 +google-api-python-client~=2.83.0 google-auth-httplib2~=0.1.0 -google-cloud-secret-manager~=2.12.6 -google-cloud-storage~=2.5.0 +google-cloud-secret-manager~=2.16.1 +google-cloud-storage~=2.8.0 google-crc32c~=1.5.0 google-resumable-media~=2.4.0 -googleapis-common-protos~=1.56.4 +googleapis-common-protos~=1.59.0 grpc-google-iam-v1~=0.12.4 -grpcio-status==1.49.1 -grpcio~=1.49.1 +grpcio-status~=1.53.0 +grpcio~=1.53.0 # Others # ----------------------------------------------------------------------------- gunicorn~=20.1.0 -sentry-sdk~=1.9.10 -uvicorn~=0.18.3 +sentry-sdk~=1.18.0 +uvicorn~=0.21.1 diff --git a/requirements/test.txt b/requirements/test.txt index 8e6e26a..584a60d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -2,35 +2,35 @@ # Code quality checks/Linting # ----------------------------------------------------------------------------- -black~=22.10.0 -flake8-isort~=5.0.0 -flake8~=5.0.4 -isort~=5.10.1 -mypy-extensions~=0.4.3 -pyright~=1.1.275 +black~=23.3.0 +flake8-isort~=6.0.0 +flake8~=6.0.0 +isort~=5.12.0 +mypy-extensions~=1.0.0 +pyright~=1.1.301 # Stubs # ----------------------------------------------------------------------------- -django-stubs-ext~=0.5.0 -django-stubs~=1.12.0 +django-stubs-ext~=0.8.0 +django-stubs~=1.16.0 # Testing # ----------------------------------------------------------------------------- factory-boy~=3.2.1 -Faker~=15.1.1 -model-bakery~=1.8.0 +Faker~=18.3.2 +model-bakery~=1.10.3 pytest-cov~=4.0.0 pytest-django~=4.5.2 -pytest-forked~=1.4.0 +pytest-forked~=1.6.0 pytest-sugar~=0.9.5 -pytest-xdist~=2.5.0 -pytest~=7.1.3 -tox~=3.26.0 +pytest-xdist~=3.2.1 +pytest~=7.2.2 +tox~=4.4.8 # Coverage # ----------------------------------------------------------------------------- coverage~=6.5.0 coveralls~=3.3.1 -django-coverage-plugin~=2.0.3 +django-coverage-plugin~=3.0.0 diff --git a/tox.ini b/tox.ini index 2bb0097..0fea5e7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] -envlist = py39, py310, coveralls +envlist = py310, py311, coveralls ignore_basepython_conflict = true -minversion = 3.9 +minversion = 3.10 skip_missing_interpreters = true skipsdist = true @@ -14,8 +14,8 @@ max_complexity = 7 [gh-actions] python = - 3.9: py39 - 3.10: py310, coveralls + 3.10: py310 + 3.11: py311, coveralls [testenv] @@ -56,6 +56,6 @@ commands = [testenv:coveralls] commands = coveralls --service=github -depends = py310 +depends = py311 passenv = GITHUB_*