Skip to content

Use UV for CI and docs builds#519

Merged
codingjoe merged 1 commit intomasterfrom
uv
Dec 19, 2025
Merged

Use UV for CI and docs builds#519
codingjoe merged 1 commit intomasterfrom
uv

Conversation

@codingjoe
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 19, 2025 10:14
@codingjoe codingjoe self-assigned this Dec 19, 2025
@codingjoe codingjoe merged commit 3fc96ad into master Dec 19, 2025
12 checks passed
@codingjoe codingjoe deleted the uv branch December 19, 2025 10:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-uv and 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.

Comment thread .readthedocs.yaml
Comment on lines +13 to +14
html:
- $HOME/.local/bin/uv run --group docs sphinx-build -b html docs $READTHEDOCS_OUTPUT/html
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
- 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
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
- 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
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- run: uv run --with Django~=${{ matrix.django-version }}.0 pytest
- run: uv run --group test --with Django~=${{ matrix.django-version }}.0 pytest

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
- run: uvx --from build pyproject-build --sdist --wheel
- run: uvx twine check dist/*
- uses: actions/upload-artifact@v6
with:
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
with:
with:
name: dist

Copilot uses AI. Check for mistakes.
codingjoe added a commit that referenced this pull request Feb 5, 2026
* Enable default support for X-forwarded headers to handle HTTPS redirects.
* Add more error handling to descritive outputs to support user debugging effors.
codingjoe added a commit that referenced this pull request Feb 5, 2026
* Enable default support for X-forwarded headers to handle HTTPS
redirects.
* Add more error handling to descriptive outputs to support user
debugging errors.
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