-
-
Notifications
You must be signed in to change notification settings - Fork 4
Switch CI and docs build to UV #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2139f75 to
c97aeb2
Compare
There was a problem hiding this 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's dependency management and CI infrastructure from pip to UV (Astral's fast Python package installer). The changes introduce UV across all CI workflows and the documentation build process, while also restructuring the dependency definitions in pyproject.toml to use UV's dependency-groups feature.
Key Changes:
- Migrated from pip-based installation to UV's
uv runanduvxcommands across all CI jobs - Restructured pyproject.toml to use PEP 735 dependency-groups (dev, test, docs) instead of only optional-dependencies
- Updated ReadTheDocs build configuration to use UV for documentation builds
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
| pyproject.toml | Introduced dependency-groups section for dev, test, and docs; reorganized optional-dependencies for wagtail and postgres |
| .readthedocs.yaml | Replaced pip-based Python installation with UV installation script and UV-based mkdocs build |
| .gitignore | Added uv.lock to ignored files |
| .github/workflows/ci.yml | Replaced setup-python and pip commands with setup-uv action and UV commands across dist, docs, SQLite, Wagtail, and PostgreSQL jobs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yml
Outdated
| - run: sudo apt-get update && sudo apt-get install -y gettext | ||
| - run: python -m pip install -e ".[test,postgres]" | ||
| - uses: astral-sh/setup-uv@v7 | ||
| - run: uv run --extra prosgres pytest |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test dependencies are not being installed. The command should include '--group test' to install the test dependency group that includes pytest and pytest-cov. It should be 'uv run --group test --extra postgres pytest'.
| - run: uv run --extra prosgres pytest | |
| - run: uv run --group test --extra postgres pytest |
.github/workflows/ci.yml
Outdated
| - run: sudo apt-get update && sudo apt-get install -y gettext | ||
| - run: python -m pip install -e ".[test,postgres]" | ||
| - uses: astral-sh/setup-uv@v7 | ||
| - run: uv run --extra prosgres pytest |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pytest command is executed before the PostgreSQL citext extension is created. The 'uv run' command on line 97 should be moved after line 103 (after the PGHOST, PGPORT, PGUSER, and PGPASSWORD environment variables are set) so that the database extension is available during test execution.
.github/workflows/ci.yml
Outdated
| with: | ||
| python-version: ${{ matrix.python-version }} |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The python-version parameter is set but the setup-python action was removed. With setup-uv, the python-version should be specified using the 'python-version' parameter of astral-sh/setup-uv action, not as a 'with' parameter at the wrong indentation level. This will cause a YAML syntax error.
.github/workflows/ci.yml
Outdated
| - run: python -m pip install -e ".[test,wagtail]" | ||
| - run: python -m pip install wagtail~=${{ matrix.wagtail-version }}.0 | ||
| - run: python -m pytest | ||
| - run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two spaces between '--extra wagtail --with' instead of one. This should be '--extra wagtail --with wagtail~=...' with a single space between flags.
| - run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest | |
| - run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest |
.readthedocs.yaml
Outdated
| html: | ||
| - $HOME/.local/bin/uv run mkdocs build |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build configuration structure appears incorrect. The 'build' section should contain 'html' as a command, not nested under 'build'. According to ReadTheDocs custom build job structure, the 'install' and 'build' jobs should be at the same level under 'jobs', and the commands should be directly under those job names. This should likely be:
jobs:
install:
- curl -LsSf https://astral.sh/uv/install.sh | sh
build:
- uv run mkdocs build| html: | |
| - $HOME/.local/bin/uv run mkdocs build | |
| - uv run mkdocs build |
.github/workflows/ci.yml
Outdated
| - run: python -m pip install -e ".[test,wagtail]" | ||
| - run: python -m pip install wagtail~=${{ matrix.wagtail-version }}.0 | ||
| - run: python -m pytest | ||
| - run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test dependencies are not being installed. The command should include '--group test' to install the test dependency group that includes pytest and pytest-cov. It should be 'uv run --group test --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest'.
| - run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest | |
| - run: uv run --group test --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.