Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
10 changes: 5 additions & 5 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 10 additions & 10 deletions {{ cookiecutter.project_slug }}/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
gunicorn>=25.1.0,<26.0
10 changes: 5 additions & 5 deletions {{ cookiecutter.project_slug }}/requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions {{ cookiecutter.project_slug }}/requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading