Skip to content

Conversation

@codingjoe
Copy link
Owner

@codingjoe codingjoe commented Dec 17, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 17, 2025 18:31
@codingjoe codingjoe self-assigned this Dec 17, 2025
@codingjoe codingjoe force-pushed the uv branch 2 times, most recently from 2139f75 to c97aeb2 Compare December 17, 2025 18:34
@codingjoe codingjoe changed the title uv Switch CI and docs build to UV Dec 17, 2025
Copy link
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'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 run and uvx commands 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.

- 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
Copy link

Copilot AI Dec 17, 2025

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'.

Suggested change
- run: uv run --extra prosgres pytest
- run: uv run --group test --extra postgres pytest

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Dec 17, 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 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.

Copilot uses AI. Check for mistakes.
Comment on lines 74 to 75
with:
python-version: ${{ matrix.python-version }}
Copy link

Copilot AI Dec 17, 2025

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.

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Dec 17, 2025

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.

Suggested change
- run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest
- run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 pytest

Copilot uses AI. Check for mistakes.
Comment on lines 15 to 16
html:
- $HOME/.local/bin/uv run mkdocs build
Copy link

Copilot AI Dec 17, 2025

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
Suggested change
html:
- $HOME/.local/bin/uv run mkdocs build
- uv run mkdocs build

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Dec 17, 2025

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'.

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

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 17, 2025 18:39
Copy link
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

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.

Copilot AI review requested due to automatic review settings December 17, 2025 18:49
Copy link
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

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.

@codingjoe codingjoe merged commit d0a10ae into main Dec 17, 2025
45 checks passed
@codingjoe codingjoe deleted the uv branch December 17, 2025 18:57
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