8000 DEV: revise release action to address python 3.13.4 bug by GavinHuttley · Pull Request #2355 · cogent3/cogent3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DEV: revise release action to address python 3.13.4 bug #2355

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

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

GavinHuttley
Copy link
Collaborator
@GavinHuttley GavinHuttley commented Jun 13, 2025

[CHANGED] pinned to 3.13.3. Also now just test the lowest
and highest supported python versions.

Summary by Sourcery

Revise the release workflow to address Python 3.13.4 by pinning supported versions and adopting UV-managed environment and test steps.

CI:

  • Pin test matrix to Python 3.10 and 3.13.3 to work around the Python 3.13.4 issue
  • Add astral-sh/setup-uv@v6 for virtual environment setup and dependency caching
  • Replace direct pip install and nox commands with UV-managed venv creation, tool installation, and test execution

[CHANGED] pinned to 3.13.3. Also now just test the lowest
    and highest supported python versions.
Copy link
Contributor
sourcery-ai bot commented Jun 13, 2025

Reviewer's Guide

Refactor the release workflow by pinning Python to 3.13.3 and limiting tests to the lowest and highest supported versions, while migrating environment setup and test execution to the uv tool for improved caching and consistency.

Sequence Diagram for Updated CI Build Job Steps

sequenceDiagram;
    participant Runner as GitHub Actions Runner;
    participant Checkout as actions/checkout;
    participant SetupPython as actions/setup-python;
    participant SetupUV as astral-sh/setup-uv;
    participant UV as uv CLI;
    participant Nox as nox CLI;

    Runner ->> Checkout: Execute (fetch code);
    Checkout -->> Runner: Code available;

    Runner ->> SetupPython: Execute (setup Python from matrix: 3.10, 3.13.3);
    SetupPython -->> Runner: Specific Python version ready;

    Runner ->> SetupUV: Execute (install uv, enable cache based on pyproject.toml);
    SetupUV -->> Runner: uv CLI available;

    Runner ->> UV: Create venv (uv venv venv -p python${{ matrix.python-version }});
    UV -->> Runner: Virtual environment 'venv' created;

    Runner ->> UV: Install nox (uv tool install -p venv nox);
    UV -->> Runner: nox installed in 'venv';

    Runner ->> Nox: Run tests (nox -db uv --force-python python -s test);
    Nox -->> Runner: Test results;
Loading

File-Level Changes

Change Details Files
Update Python version matrix
  • Pin python-version to 3.13.3
  • Limit matrix to lowest (3.10) and highest versions
.github/workflows/release.yml
Introduce uv tool for environment setup and caching
  • Add astral-sh/setup-uv step with cache enabled
  • Replace pip install with "uv venv venv" and "uv tool install"
.github/workflows/release.yml
Simplify test commands using uv backend
  • Remove old nox test step
  • Add unified nox -db uv --force-python python -s test invocation
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@GavinHuttley GavinHuttley merged commit 6014877 into cogent3:develop Jun 13, 2025
13 of 14 checks passed
Copy link
Contributor
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @GavinHuttley - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `.github/workflows/release.yml:37` </location>
<code_context>
+      - name: "Run nox for ${{ matrix.python-version }}"
+        shell: bash
+        run: |
+          nox  -db uv --force-python python -s test

-      - name: "Run nox for Python ${{ matrix.python-version }}"
</code_context>

<issue_to_address>
The `-db uv` flag likely misgroups options

Use `nox -d uv --force-python python -s test` to avoid misinterpreting `-db uv` as `-d b`. This ensures the correct driver is specified.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

- name: "Run nox for ${{ matrix.python-version }}"
shell: bash
run: |
nox -db uv --force-python python -s test
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): The -db uv flag likely misgroups options

Use nox -d uv --force-python python -s test to avoid misinterpreting -db uv as -d b. This ensures the correct driver is specified.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 15645889132

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 90.752%

Totals Coverage Status
Change from base Build 15644983727: 0.006%
Covered Lines: 30118
Relevant Lines: 33187

💛 - Coveralls

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
0