Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the project from using pip for dependency management to UV (a fast Python package installer and resolver) for CI workflows and documentation builds. The primary goal is to modernize the build tooling and improve build performance.
Key changes:
- Migrated from
[project.optional-dependencies]to PEP 735[dependency-groups]in pyproject.toml - Updated all GitHub Actions workflows to use
astral-sh/setup-uvand UV commands - Modernized ReadTheDocs configuration to use UV for documentation builds
- Consolidated documentation by moving content from docs/readme.rst into docs/index.rst
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Migrated from optional-dependencies to dependency-groups format; added 'furo' theme to docs group and created a dev group that includes both test and docs |
| docs/readme.rst | Removed file as content was consolidated into docs/index.rst |
| docs/index.rst | Added full documentation content previously in readme.rst, making this the primary documentation entry point |
| docs/conf.py | Simplified configuration by removing sphinx_rtd_theme conditional logic and switching to furo theme |
| .readthedocs.yaml | Updated to ubuntu-24.04, added UV installation, and configured custom build commands using UV |
| .gitignore | Added uv.lock to ignore list for UV's lock file |
| .github/workflows/release.yml | Replaced pip/build with UV commands; renamed job from release-build to pypi-build |
| .github/workflows/ci.yml | Replaced all pip-based workflows with UV commands across dist, docs, and PyTest jobs; upgraded codecov action to v5 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| html: | ||
| - $HOME/.local/bin/uv run --group docs sphinx-build -b html docs $READTHEDOCS_OUTPUT/html |
There was a problem hiding this comment.
The build jobs structure is invalid for ReadTheDocs v2 configuration. The build.html key is not a valid structure. According to the ReadTheDocs v2 config schema, custom build commands should be under build.jobs.pre_build, build.jobs.post_build, etc., not under a nested build.html key. Additionally, you should use the standard sphinx configuration block to specify the docs configuration file, or use proper build.jobs structure. This configuration will likely fail when ReadTheDocs attempts to build the documentation.
| html: | |
| - $HOME/.local/bin/uv run --group docs sphinx-build -b html docs $READTHEDOCS_OUTPUT/html | |
| - $HOME/.local/bin/uv run --group docs sphinx-build -b html docs $READTHEDOCS_OUTPUT/html |
| - run: python -m pip install -e .[docs] | ||
| - run: python -m sphinx -b html -W docs docs/_build | ||
| - uses: astral-sh/setup-uv@v7 | ||
| - run: uv run --group docs sphinx-build -W -b doctest -b html docs docs/_build |
There was a problem hiding this comment.
The sphinx-build command uses two -b flags which is invalid. Sphinx only supports one builder at a time. You cannot use both -b doctest and -b html simultaneously. This should be split into two separate commands, or if you want to run both doctest and html builds, run them sequentially in separate commands.
| - run: uv run --group docs sphinx-build -W -b doctest -b html docs docs/_build | |
| - run: | | |
| uv run --group docs sphinx-build -W -b doctest docs docs/_build | |
| uv run --group docs sphinx-build -W -b html docs docs/_build |
| - run: python -m pip install Django~="${{ matrix.django-version }}.0" | ||
| - run: python -m pytest | ||
| - uses: codecov/codecov-action@v3 | ||
| - run: uv run --with Django~=${{ matrix.django-version }}.0 pytest |
There was a problem hiding this comment.
The pytest command is missing the test dependency group installation. The command uv run --with Django~=${{ matrix.django-version }}.0 pytest only adds Django but doesn't include the test dependencies (pytest, pytest-cov, pytest-django, etc.) defined in the dependency-groups. This should be uv run --group test --with Django~=${{ matrix.django-version }}.0 pytest to properly install all test dependencies.
| - run: uv run --with Django~=${{ matrix.django-version }}.0 pytest | |
| - run: uv run --group test --with Django~=${{ matrix.django-version }}.0 pytest |
| - run: uvx --from build pyproject-build --sdist --wheel | ||
| - run: uvx twine check dist/* | ||
| - uses: actions/upload-artifact@v6 | ||
| with: |
There was a problem hiding this comment.
The artifact upload is missing a name parameter. For consistency with the release workflow which uses name: release-dists, and to follow best practices for artifact management, this should have a name like name: dist or similar. This makes it easier to identify and download artifacts later.
| with: | |
| with: | |
| name: dist |
* Enable default support for X-forwarded headers to handle HTTPS redirects. * Add more error handling to descritive outputs to support user debugging effors.
No description provided.