From c74ea9e6b4af97be26029334868fa3264032c2d3 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 31 Dec 2024 16:01:12 +0000 Subject: Major refactoring and removal of junk This commit includes significant refactoring, cleanup, and updates across various components of the Django project. The following changes were made: - **Database Migration Updates:** - Removed unnecessary migrations in the `alphabetlearning.contrib.sites` and `alphabetlearning.payments` apps, consolidating them into cleaner initial migration files. - Altered the `Site` model in `alphabetlearning.contrib.sites` to streamline its fields and default settings. - Introduced new models in `alphabetlearning.payments` related to email signups and verification, reflecting a shift in focus and better alignment with current business logic. - **Django Settings Changes:** - Updated the database settings to use SQLite for local development, while commenting out production-specific configurations. - Managed third-party dependencies within `requirements.txt` and `pyproject.toml`, ensuring alignment with the latest Django version (5.1.4) and removing obsolete dependencies (e.g., `celery`, `django-celery-beat`, `flower`, etc.). - **Docker and Compose Clean-up:** - Removed old Dockerfiles and unnecessary services from the `docker-compose` configuration, streamlining the local and production setups. - Updated the Dockerfile configuration for local development, focusing on essential services only. - **General Code Clean-up:** - Removed unused tasks, views, tests, and files related to the Celery and Redis frameworks. - Cleaned up various model definitions and their related migrations for consistency and clarity. - **Documentation and Comments:** - Updated comments and code documentation where necessary to reflect the changes made during this cleanup process. This major refactor aims to enhance project maintainability and streamline the development experience while preparing for future feature expansions and improvements. --- requirements/base.txt | 30 ------- requirements/local.txt | 207 -------------------------------------------- requirements/production.txt | 12 --- 3 files changed, 249 deletions(-) delete mode 100644 requirements/base.txt delete mode 100644 requirements/local.txt delete mode 100644 requirements/production.txt (limited to 'requirements') diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index 51b046e..0000000 --- a/requirements/base.txt +++ /dev/null @@ -1,30 +0,0 @@ -python-slugify==8.0.4 # https://github.com/un33k/python-slugify -pillow==10.3.0 # https://github.com/python-pillow/Pillow -argon2-cffi==23.1.0 # https://github.com/hynek/argon2_cffi -whitenoise==6.6.0 # https://github.com/evansd/whitenoise -redis==5.0.4 # https://github.com/redis/redis-py -hiredis==2.3.2 # https://github.com/redis/hiredis-py -celery==5.4.0 # pyup: < 6.0 # https://github.com/celery/celery -django-celery-beat==2.6.0 # https://github.com/celery/django-celery-beat -flower==2.0.1 # https://github.com/mher/flower - -# migrated stuff from pyblackbird -pdf2image==1.17.0 -pypdf2==3.0.1 -python-magic==0.4.27 -python-dotenv==1.0.1 -boto3==1.34.89 -sqlparse==0.5.0 - -markdown==3.6.0 - -# Django -# ------------------------------------------------------------------------------ -django-storages==1.14.3 -Django==5.0.4 # pyup: < 5.0 # https://www.djangoproject.com/ -django-environ==0.11.2 # https://github.com/joke2k/django-environ -django-model-utils==4.5.1 # https://github.com/jazzband/django-model-utils -django-allauth[mfa]==0.62.1 # https://github.com/pennersr/django-allauth -django-crispy-forms==2.1 # https://github.com/django-crispy-forms/django-crispy-forms -crispy-bootstrap5==2024.2 # https://github.com/django-crispy-forms/crispy-bootstrap5 -django-redis==5.4.0 # https://github.com/jazzband/django-redis diff --git a/requirements/local.txt b/requirements/local.txt deleted file mode 100644 index d6a27d9..0000000 --- a/requirements/local.txt +++ /dev/null @@ -1,207 +0,0 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile pyproject.toml -o requirements/local.txt -amqp==5.2.0 - # via kombu -anyio==4.4.0 - # via watchfiles -argon2-cffi==23.1.0 - # via pyblackbird-cc (pyproject.toml) -argon2-cffi-bindings==21.2.0 - # via argon2-cffi -asgiref==3.8.1 - # via - # django - # django-stubs -async-timeout==4.0.3 - # via redis -billiard==4.2.0 - # via celery -boto3==1.34.89 - # via pyblackbird-cc (pyproject.toml) -botocore==1.34.162 - # via - # pyblackbird-cc (pyproject.toml) - # boto3 - # s3transfer -celery==5.4.0 - # via - # pyblackbird-cc (pyproject.toml) - # django-celery-beat - # flower -certifi==2024.8.30 - # via requests -cffi==1.17.1 - # via argon2-cffi-bindings -charset-normalizer==3.3.2 - # via requests -click==8.1.7 - # via - # celery - # click-didyoumean - # click-plugins - # click-repl -click-didyoumean==0.3.1 - # via celery -click-plugins==1.1.1 - # via celery -click-repl==0.3.0 - # via celery -crispy-bootstrap5==2024.2 - # via pyblackbird-cc (pyproject.toml) -cron-descriptor==1.4.5 - # via django-celery-beat -django==5.0.4 - # via - # pyblackbird-cc (pyproject.toml) - # crispy-bootstrap5 - # django-allauth - # django-celery-beat - # django-crispy-forms - # django-model-utils - # django-redis - # django-storages - # django-stubs - # django-stubs-ext - # django-timezone-field -django-allauth==0.62.1 - # via pyblackbird-cc (pyproject.toml) -django-celery-beat==2.6.0 - # via pyblackbird-cc (pyproject.toml) -django-crispy-forms==2.1 - # via - # pyblackbird-cc (pyproject.toml) - # crispy-bootstrap5 -django-environ==0.11.2 - # via pyblackbird-cc (pyproject.toml) -django-model-utils==4.5.1 - # via pyblackbird-cc (pyproject.toml) -django-redis==5.4.0 - # via pyblackbird-cc (pyproject.toml) -django-storages==1.14.3 - # via pyblackbird-cc (pyproject.toml) -django-stubs==5.0.4 - # via pyblackbird-cc (pyproject.toml) -django-stubs-ext==5.0.4 - # via django-stubs -django-timezone-field==7.0 - # via django-celery-beat -flower==2.0.1 - # via pyblackbird-cc (pyproject.toml) -gunicorn==22.0.0 - # via pyblackbird-cc (pyproject.toml) -hiredis==2.3.2 - # via pyblackbird-cc (pyproject.toml) -humanize==4.10.0 - # via flower -idna==3.8 - # via - # anyio - # requests -jmespath==1.0.1 - # via - # boto3 - # botocore -kombu==5.4.1 - # via celery -markdown==3.6 - # via pyblackbird-cc (pyproject.toml) -markupsafe==2.1.5 - # via werkzeug -mypy==1.11.2 - # via django-stubs -mypy-extensions==1.0.0 - # via mypy -packaging==24.1 - # via gunicorn -pdf2image==1.17.0 - # via pyblackbird-cc (pyproject.toml) -pillow==10.3.0 - # via - # pyblackbird-cc (pyproject.toml) - # pdf2image -prometheus-client==0.20.0 - # via flower -prompt-toolkit==3.0.47 - # via click-repl -psycopg==3.1.19 - # via pyblackbird-cc (pyproject.toml) -psycopg-c==3.1.19 - # via psycopg -pycparser==2.22 - # via cffi -pypdf2==3.0.1 - # via pyblackbird-cc (pyproject.toml) -pypng==0.20220715.0 - # via qrcode -python-crontab==3.2.0 - # via django-celery-beat -python-dateutil==2.9.0.post0 - # via - # botocore - # celery - # python-crontab -python-dotenv==1.0.1 - # via pyblackbird-cc (pyproject.toml) -python-magic==0.4.27 - # via pyblackbird-cc (pyproject.toml) -python-slugify==8.0.4 - # via pyblackbird-cc (pyproject.toml) -pytz==2024.2 - # via flower -qrcode==7.4.2 - # via django-allauth -redis==5.0.4 - # via - # pyblackbird-cc (pyproject.toml) - # django-redis -requests==2.32.3 - # via stripe -s3transfer==0.10.2 - # via boto3 -six==1.16.0 - # via python-dateutil -sniffio==1.3.1 - # via anyio -sqlparse==0.5.0 - # via - # pyblackbird-cc (pyproject.toml) - # django -stripe==10.10.0 - # via pyblackbird-cc (pyproject.toml) -text-unidecode==1.3 - # via python-slugify -tornado==6.4.1 - # via flower -types-pyyaml==6.0.12.20240808 - # via django-stubs -typing-extensions==4.12.2 - # via - # django-stubs - # django-stubs-ext - # mypy - # psycopg - # qrcode - # stripe -tzdata==2024.1 - # via - # celery - # django-celery-beat -urllib3==2.2.2 - # via - # botocore - # requests -vine==5.1.0 - # via - # amqp - # celery - # kombu -watchdog==5.0.2 - # via werkzeug -watchfiles==0.21.0 - # via pyblackbird-cc (pyproject.toml) -wcwidth==0.2.13 - # via prompt-toolkit -werkzeug==3.0.2 - # via pyblackbird-cc (pyproject.toml) -whitenoise==6.6.0 - # via pyblackbird-cc (pyproject.toml) diff --git a/requirements/production.txt b/requirements/production.txt deleted file mode 100644 index 9024883..0000000 --- a/requirements/production.txt +++ /dev/null @@ -1,12 +0,0 @@ -# PRECAUTION: avoid production dependencies that aren't in development - --r base.txt - -gunicorn==22.0.0 # https://github.com/benoitc/gunicorn -psycopg[c]==3.1.19 # https://github.com/psycopg/psycopg -sentry-sdk==2.1.1 # https://github.com/getsentry/sentry-python - -# Django -# ------------------------------------------------------------------------------ -django-storages[s3]==1.14.3 # https://github.com/jschneier/django-storages -django-anymail[mailgun]==10.3 # https://github.com/anymail/django-anymail -- cgit v1.2.3