Skip to content

Add new input uv-operations to Python test workflow - #66

Merged
Fr3dric0 merged 5 commits into
mainfrom
uv-operations
Sep 10, 2026
Merged

Fr3dric0 merged 5 commits into
mainfrom
uv-operations

Conversation

@SondreODahl

Copy link
Copy Markdown
Contributor

Jeg jobber med å oppgradere alternative-transport-realtime-processing til nye pipelines og ser behovet for å kunne spesifisere test-operasjoner. Vi har en del trege tester som vi kun kjører lokalt ved behov og bruker derfor run: uv run --frozen pytest -m "not slow" når vi kjører testene i CI.

I tillegg la jeg merke til at det er inkonsekvent bruk av python_version vs python-version i test vs build, så jeg retter opp i dette.

Copilot AI lite review requested due to automatic review settings September 10, 2026 08:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The python_versionpython-version input rename is a breaking API change for existing @v2 consumers unless a backward-compatible alias/fallback is added.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the shared Python reusable workflows in platform-actions to make the test step configurable via a new input, and to standardize Python version input naming across workflows.

Changes:

  • Add a new optional uv-operations input to test.python.yml to control what uv run ... executes.
  • Rename build.python.yml input python_versionpython-version and pin actions/setup-python to a commit SHA.

Changed files:

  • .github/workflows/test.python.yml — What changed: adds a new workflow_call input and uses it in the uv run command. Validation result: ⚠️ Warning
    • Issue: uv-operations is described as generic “UV operations” but is actually arguments to uv run.
  • .github/workflows/build.python.yml — What changed: renames the Python version input and updates setup-python usage. Validation result: ❌ Error
    • Issue: Renaming python_version to python-version is a breaking change for external @v2 consumers; add a deprecated alias and make setup-python accept either input name.

Overall verdict: Issues found

File summaries
File Description
.github/workflows/test.python.yml Adds configurable uv run arguments for Python test runs.
.github/workflows/build.python.yml Standardizes Python version input naming and pins setup-python.
Review details

Suppressed comments (2)

.github/workflows/build.python.yml:54

  • actions/setup-python currently reads only inputs.python-version, so callers using the legacy python_version input would still be ignored. Use a fallback expression so either input name works.
        with:
          python-version: ${{ inputs.python-version }}

.github/workflows/build.python.yml:10

  • Renaming the workflow_call input from python_version to python-version is a breaking change for existing @v2 consumers that still pass python_version. Keep the old input as a deprecated alias to preserve backward compatibility.

This issue also appears on line 53 of the same file.

      python-version:
        required: false
        type: string
        description: "What Python version to use."
        default: "3.13"
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/test.python.yml Outdated
Comment thread .github/workflows/build.python.yml Outdated
workflow_call:
inputs:
python_version:
python-version:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Einig at denne er irriterande, men trur det er litt for risky. Vi lanserer endringane under @v2, så dette vil knekke pipelinen for dei som har spesifisert python_version.

Då må vi eventuelt ha ein overgong med både python-version og python_version under @v2

@SondreODahl SondreODahl Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Endte med å fjerne da det er lettere å ta det i ny major

Copilot AI review requested due to automatic review settings September 10, 2026 10:27
Comment thread .github/workflows/build.python.yml Outdated
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ inputs.python_version }}
python-version: ${{ inputs.python-version }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
python-version: ${{ inputs.python-version }}
python-version: ${{ inputs.python_version }}

Hugs å reverter denne også

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

build.python.yml references an undefined input (inputs.python-version) even though the workflow declares python_version, which will break Python setup for callers.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/build.python.yml Outdated
Copilot AI review requested due to automatic review settings September 10, 2026 10:31
@Fr3dric0
Fr3dric0 merged commit 8465488 into main Sep 10, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The functional changes are backward-compatible (optional input with default) and the action pinning is an improvement; only a minor PR-description mismatch was noted.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +52 to 55
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ inputs.python_version }}

@SondreODahl
SondreODahl deleted the uv-operations branch September 10, 2026 10:36
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.

3 participants