From cd3163af598fc062ba321fedfa62d9647cf34037 Mon Sep 17 00:00:00 2001 From: 0xRizzo <42082827+crypto-rizzo@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:16:52 -0500 Subject: [PATCH] DX Minor Cleanup (#1041) * bump extensions -django-anymail -django-extensions * remove django-fsm-log * dependabot limit * disable dependabot labels * delete pre-commit * bump django-debug-toolbar * remove Pillow * remove comments * remove runtime.txt (use DO defaults for security purposes) * requirements - bump all code_quality - remove types-requests --- .github/dependabot.yml | 5 ++--- .pre-commit-config.yaml | 20 ------------------- backend/apps/root/admin.py | 2 -- backend/config/requirements/_code_quality.txt | 11 +++++----- backend/config/requirements/base.txt | 2 -- backend/config/requirements/local.txt | 2 +- backend/config/requirements/production.txt | 2 +- backend/config/requirements/test.txt | 2 +- backend/config/settings/base.py | 1 - backend/runtime.txt | 1 - 10 files changed, 10 insertions(+), 38 deletions(-) delete mode 100644 .pre-commit-config.yaml delete mode 100644 backend/runtime.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c5cf925f0..156324d95 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,8 @@ -# Basic set up for three package managers version: 2 updates: - # Python / Django Backend - package-ecosystem: "pip" directory: "/backend" schedule: interval: "weekly" - day: "saturday" \ No newline at end of file + open-pull-requests-limit: 10 + labels: [ ] \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index af85dc25a..000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,20 +0,0 @@ -default_stages: [commit] - -repos: - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.262' - hooks: - - id: ruff - args: [--fix, --line-length=91, --exit-non-zero-on-fix] - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 - hooks: - - id: trailing-whitespace - - id: check-yaml - - - repo: https://github.com/psf/black - rev: 22.3.0 - hooks: - - id: black - args: [--line-length=91] diff --git a/backend/apps/root/admin.py b/backend/apps/root/admin.py index 6a9e0ce3a..cf0b51730 100644 --- a/backend/apps/root/admin.py +++ b/backend/apps/root/admin.py @@ -1,7 +1,6 @@ from django.contrib import admin, messages from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin -from django_fsm_log.admin import StateLogInline from apps.root.models import ( CheckoutItem, CheckoutSession, @@ -119,7 +118,6 @@ def transition_to_live(modeladmin, request, queryset): "user", "team" ] - inlines = [StateLogInline] readonly_fields = ["state"] actions = [transition_to_draft, transition_to_live] # type: ignore diff --git a/backend/config/requirements/_code_quality.txt b/backend/config/requirements/_code_quality.txt index 62de2337d..344f42a3b 100644 --- a/backend/config/requirements/_code_quality.txt +++ b/backend/config/requirements/_code_quality.txt @@ -1,8 +1,7 @@ # Code quality # ------------------------------------------------------------------------------ -black==23.3.0 # https://github.com/psf/black -django-stubs[compatible-mypy]==1.11.0 # https://github.com/typeddjango/django-stubs -pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django -mypy==0.950 # https://github.com/python/mypy -ruff==0.0.270 # https://github.com/charliermarsh/ruff -types-requests +black==24.2.0 # https://github.com/psf/black +django-stubs[compatible-mypy]==4.2.7 # https://github.com/typeddjango/django-stubs +pylint-django==2.5.5 # https://github.com/PyCQA/pylint-django +mypy==1.7.1 # https://github.com/python/mypy +ruff==0.2.2 # https://github.com/charliermarsh/ruff diff --git a/backend/config/requirements/base.txt b/backend/config/requirements/base.txt index 2e1c35ba8..78bc54c8f 100644 --- a/backend/config/requirements/base.txt +++ b/backend/config/requirements/base.txt @@ -5,7 +5,6 @@ boto3==1.28.73 # https://github.com/boto/boto3 eth-account==0.9.0 # https://github.com/ethereum/eth-account eth-utils==2.2.1 # https://github.com/ethereum/eth-utils google-api-python-client==2.99.0 # https://github.com/googleapis/google-api-python-client -Pillow==10.0.1 # https://github.com/python-pillow/Pillow qrcode==7.4.2 # https://github.com/lincolnloop/python-qrcode rollbar==1.0.0 #https://github.com/rollbar/pyrollbar/ stripe==5.5.0 #https://github.com/stripe/stripe-python/ @@ -22,7 +21,6 @@ django-allauth==0.61.1 # https://github.com/pennersr/django-allauth django-crispy-forms==2.1 # https://github.com/django-crispy-forms/django-crispy-forms/stargazers django-environ==0.11.2 # https://github.com/joke2k/django-environ django-fsm==2.8.1 # https://github.com/viewflow/django-fsm -django-fsm-log==3.1.0 # https://github.com/jazzband/django-fsm-log django-model-utils==4.4.0 # https://github.com/jazzband/django-model-utils django-storages[boto3]==1.14.2 # https://github.com/jschneier/django-storages django-money==3.3.0 # https://github.com/django-money/django-money diff --git a/backend/config/requirements/local.txt b/backend/config/requirements/local.txt index a9c57c298..b129857f7 100644 --- a/backend/config/requirements/local.txt +++ b/backend/config/requirements/local.txt @@ -7,5 +7,5 @@ psycopg==3.1.9 # https://github.com/psycopg/psycopg # Django # ------------------------------------------------------------------------------ -django-debug-toolbar==4.0.0 # https://github.com/jazzband/django-debug-toolbar +django-debug-toolbar==4.3.0 # https://github.com/jazzband/django-debug-toolbar django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions \ No newline at end of file diff --git a/backend/config/requirements/production.txt b/backend/config/requirements/production.txt index 36a908462..6d7c7e3be 100644 --- a/backend/config/requirements/production.txt +++ b/backend/config/requirements/production.txt @@ -7,4 +7,4 @@ psycopg==3.1.18 # https://github.com/psycopg/psycopg # Django # ------------------------------------------------------------------------------ -django-anymail[mailgun]==10.1 # https://github.com/anymail/django-anymail +django-anymail[mailgun]==10.2 # https://github.com/anymail/django-anymail diff --git a/backend/config/requirements/test.txt b/backend/config/requirements/test.txt index 2ac421b6b..e20b2a97c 100644 --- a/backend/config/requirements/test.txt +++ b/backend/config/requirements/test.txt @@ -7,4 +7,4 @@ psycopg2-binary==2.9.6 # https://github.com/psycopg/psycopg2 # Django # ------------------------------------------------------------------------------ -django-extensions==3.2.0 # https://github.com/django-extensions/django-extensions \ No newline at end of file +django-extensions==3.2.3 # https://github.com/django-extensions/django-extensions \ No newline at end of file diff --git a/backend/config/settings/base.py b/backend/config/settings/base.py index e8e8574c4..6291952f5 100644 --- a/backend/config/settings/base.py +++ b/backend/config/settings/base.py @@ -90,7 +90,6 @@ "allauth.socialaccount", "crispy_forms", "crispy_bootstrap5", - "django_fsm_log", "django_quill", "djmoney", "storages", diff --git a/backend/runtime.txt b/backend/runtime.txt deleted file mode 100644 index fefae710d..000000000 --- a/backend/runtime.txt +++ /dev/null @@ -1 +0,0 @@ -python-3.11.4 \ No newline at end of file