diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index cf24cce..e2b48fb 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,7 +5,7 @@ ## Architecture Overview ### Core Stack -- **Web Framework**: Django 5.2.x (LTS) - NOT compatible with Django 6.0 +- **Web Framework**: Django 6.0.x - **API Layer**: Django Ninja (type-hinted async-ready), NOT Django REST Framework - **Task Queue**: Celery 5.x with Redis broker/backend - **Auth**: JWT (SimpleJWT) + OAuth2 (django-oauth-toolkit) + Social auth @@ -136,7 +136,7 @@ tox -e lint # flake8 + black + isort checks ## Known Constraints & Gotchas -1. **Django version**: Locked to 5.2.x - Django 6.0 incompatibility tracked in base.txt comment +1. **Django version**: Using Django 6.x 2. **NinjaAPI single instance**: Must be created in urls.py (not app-level routers) 3. **Celery settings namespace**: All Celery config must use `CELERY_` prefix (e.g., `CELERY_BROKER_URL`) 4. **PostgreSQL required**: No SQLite for production; psycopg2-binary ensures no compilation diff --git a/.github/workflows/test-template.yml b/.github/workflows/test-template.yml index 86b4ef3..36eac3d 100644 --- a/.github/workflows/test-template.yml +++ b/.github/workflows/test-template.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -43,7 +43,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | @@ -53,3 +53,27 @@ jobs: - name: Run comprehensive tests run: | tox -e all-tests + + dependency-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + + - name: Install cookiecutter + run: pip install cookiecutter + + - name: Generate template + run: | + cookiecutter . --no-input --output-dir /tmp/test-project project_name="Test Project" project_slug="test_project" + + - name: Check dependencies compatibility + run: | + cd /tmp/test-project/test_project + pip install -r requirements/local.txt + pip check diff --git a/test-requirements.txt b/test-requirements.txt index fb329d9..faaacc0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ # Test dependencies for cookiecutter template -pytest>=8.4.0 -cookiecutter>=2.6.0 -pytest-cov>=6.3.0 -pytest-mock>=3.15.0 -tox>=4.30.0 +pytest>=9.0.2 +cookiecutter>=2.7.1 +pytest-cov>=7.0.0 +pytest-mock>=3.15.1 +tox>=4.49.1 diff --git a/tox.ini b/tox.ini index bdea6bf..67b60f8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311,validate,all-tests +envlist = py312,py313,validate,all-tests skipsdist = true skip_missing_interpreters = true diff --git a/{{ cookiecutter.project_slug }}/requirements/base.txt b/{{ cookiecutter.project_slug }}/requirements/base.txt index e75d9f3..5202c22 100644 --- a/{{ cookiecutter.project_slug }}/requirements/base.txt +++ b/{{ cookiecutter.project_slug }}/requirements/base.txt @@ -1,15 +1,15 @@ # Base requirements for {{ cookiecutter.project_name }} # Django framework -django>=5.2.9,<5.3 # Use Django 5.2.x (latest stable LTS - Django 6.0 not yet compatible with django-celery-beat) +django>=6.0.0,<7.0 # Use Django 6.x # API Framework -django-ninja>=1.5.1,<2.0 +django-ninja>=1.6.0,<2.0 # Celery and related packages -celery>=5.6.0,<6.0 -redis>=7.1.0,<8.0 # Python client for Redis (used by Celery) -django-celery-beat>=2.8.1,<3.0 # Database-backed periodic task scheduler +celery>=5.6.2,<6.0 +redis>=7.3.0,<8.0 # Python client for Redis (used by Celery) +django-celery-beat>=2.9.0,<3.0 # Database-backed periodic task scheduler django-celery-results>=2.6.0,<3.0 # Celery result backend using Django ORM # Database driver (PostgreSQL) @@ -22,17 +22,17 @@ django-redis>=6.0.0,<7.0 djangorestframework-simplejwt>=5.5.1,<6.0 # OAuth2 Authentication -django-oauth-toolkit>=3.1.0,<4.0 # OAuth2 provider and consumer +django-oauth-toolkit>=3.2.0,<4.0 # OAuth2 provider and consumer requests-oauthlib>=2.0.0,<3.0 # OAuth2 client library -social-auth-app-django>=5.6.0,<6.0 # Social authentication (Google, GitHub, etc.) +social-auth-app-django>=5.7.0,<6.0 # Social authentication (Google, GitHub, etc.) # Object-level Permissions -django-guardian>=3.2.0,<4.0 +django-guardian>=3.3.0,<4.0 # Environment variable management python-decouple>=3.8,<4.0 # Optional: For parsing DATABASE_URL format easily -dj-database-url>=3.0.1,<4.0 +dj-database-url>=3.1.2,<4.0 # WSGI server for production -gunicorn>=23.0.0,<24.0 \ No newline at end of file +gunicorn>=25.1.0,<26.0 \ No newline at end of file diff --git a/{{ cookiecutter.project_slug }}/requirements/local.txt b/{{ cookiecutter.project_slug }}/requirements/local.txt index 0702946..327e376 100644 --- a/{{ cookiecutter.project_slug }}/requirements/local.txt +++ b/{{ cookiecutter.project_slug }}/requirements/local.txt @@ -6,15 +6,15 @@ # Useful Django extensions (runserver_plus, shell_plus, etc.) django-extensions>=4.1,<5.0 # For debugging in the browser -django-debug-toolbar>=6.1.0,<7.0 +django-debug-toolbar>=6.2.0,<7.0 # Werkzeug might be needed by runserver_plus or debug toolbar in some cases -Werkzeug>=3.1.4,<4.0 +Werkzeug>=3.1.6,<4.0 # Testing libraries pytest>=9.0.2,<10.0 -pytest-django>=4.11.1,<5.0 +pytest-django>=4.12.0,<5.0 # Code formatting and linting -black>=25.12.0,<26.0 -isort>=7.0.0,<8.0 +black>=26.3.1,<27.0 +isort>=8.0.1,<9.0 flake8>=7.3.0,<8.0 \ No newline at end of file diff --git a/{{ cookiecutter.project_slug }}/requirements/production.txt b/{{ cookiecutter.project_slug }}/requirements/production.txt index c1ef24e..273185f 100644 --- a/{{ cookiecutter.project_slug }}/requirements/production.txt +++ b/{{ cookiecutter.project_slug }}/requirements/production.txt @@ -4,10 +4,10 @@ -r base.txt # Simplified static file serving for production -whitenoise[brotli]>=6.11.0,<7.0 # Includes brotli compression support +whitenoise[brotli]>=6.12.0,<7.0 # Includes brotli compression support # Production monitoring and logging -sentry-sdk[django]>=2.48.0,<3.0 # Error tracking and performance monitoring +sentry-sdk[django]>=2.54.0,<3.0 # Error tracking and performance monitoring # Add any other production-specific dependencies here # e.g., monitoring agents, specific logging libraries \ No newline at end of file