Skip to content

Conversation

@matrixise
Copy link
Contributor

Reverts #174

matrixise and others added 8 commits December 23, 2025 20:42
Update all documentation and scripts to use `uv` instead of `pip` for installing dependencies. This provides significant performance improvements and better dependency resolution.

Changes:
- Update CLAUDE.md local development setup instructions
- Update README.md installation steps
- Update DEVELOPMENT.md dependency installation
- Update CONTRIBUTING.md setup instructions
- Update vagrant/provision.sh to use uv
- Add uv 0.9.18 to .tool-versions

Note: Dockerfile and GitHub Actions workflows already use uv.

Refs #171
…ect.toml

Complete migration from pip-tools workflow to modern uv-based dependency management:

- Replace requirements/main.in, dev.in, production.in with pyproject.toml
- Use PEP 735 dependency-groups for dev and production dependencies
- Generate uv.lock as universal lock file (102 packages)
- Auto-generate requirements.txt for Heroku compatibility
- Centralize tool configurations (ruff, coverage, isort) in pyproject.toml
- Use Hatchling as build backend
- Update all tooling (Taskfile, toast.yml, Dockerfile, CI/CD)
- Update documentation (CLAUDE.md, README.md, DEVELOPMENT.md, CONTRIBUTING.md)

New workflow:
- `uv lock` - Update lock file
- `uv sync` - Install dependencies
- `task dependencies:export` - Generate requirements.txt

Benefits:
- Single source of truth (pyproject.toml)
- Faster dependency resolution with uv
- Modern Python packaging standards (PEP 621, PEP 735)
- Simplified dependency management commands

Fixes #171
The tests were failing because uv sync creates a virtual environment
but the test command was using the system Python. Using 'uv run'
ensures the tests run in the correct virtual environment with all
dependencies installed.
Django 6.0 was inadvertently installed due to missing version
constraints in pyproject.toml. This pins Django to 5.2.x series
(latest: 5.2.9) and Wagtail to 7.2.x for compatibility.

Changes:
- pyproject.toml: Add Django>=5.2.0,<5.3 constraint
- pyproject.toml: Add wagtail>=7.2.0,<7.3 constraint
- uv.lock: Regenerated with Django 5.2.9
- requirements.txt: Regenerated with Django 5.2.9
- requirements-dev.txt: Regenerated with Django 5.2.9

All 33 tests pass with Django 5.2.9.
…ibility

- Create requirements/main.txt with base dependencies (no dev, no production groups)
- Create requirements/production.txt with production-specific dependencies (psycopg)
- Update requirements.txt to reference both files (-r requirements/main.txt -r requirements/production.txt)

This maintains Heroku compatibility while using the modern pyproject.toml + uv workflow.
The requirements files are auto-generated from uv.lock using:
- uv export --no-dev --no-group production -o requirements/main.txt
- uv export --only-group production -o requirements/production.txt

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add README.md to COPY command (required by Hatchling build backend)
- Add --no-install-project flag to uv sync to install only dependencies
  without installing the pythonie package itself at this stage

This fixes the Docker build errors:
- "OSError: Readme file does not exist: README.md"
- "ValueError: Unable to determine which files to ship inside the wheel"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update Django constraint from `>=5.2.0,<5.3` to `>=5.2.0,<7` to allow Django 6.x
- Update Wagtail comment to reflect Django 6.0 support (already supported since Wagtail 7.2)
- Add Django 6.0 classifier to project metadata
- Upgrade Django from 5.2.9 to 6.0 via `uv lock --upgrade`
- Update boto3 (1.42.15 -> 1.42.16) and botocore (1.42.15 -> 1.42.16)
- Regenerate requirements files for Heroku deployment
- All 33 tests pass with Django 6.0

Wagtail 7.2.x supports Django 6.0: wagtail/wagtail#13622

Closes #173

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
@matrixise matrixise changed the base branch from feature/migrate-to-uv-171 to master December 24, 2025 11:16
@matrixise
Copy link
Contributor Author

Closing this revert PR as it's not necessary.

PR #174 was merged into the feature branch (feature/migrate-to-uv-171), not into master, so no revert is needed on master. The feature branch will be cleaned up separately with a force push.

The correct Django 6.0 upgrade for master is in PR #179.

@matrixise matrixise closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants