Skip to content

ci: bump action versions, enable runner triggers, update pre-commit and deps - #184

Open
atong01 wants to merge 1 commit into
mainfrom
ci-updates
Open

ci: bump action versions, enable runner triggers, update pre-commit and deps#184
atong01 wants to merge 1 commit into
mainfrom
ci-updates

Conversation

@atong01

@atong01 atong01 commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Updates CI configuration: bumps outdated action versions, enables the runner test workflow, updates pre-commit hooks, and unpins outdated dependencies.

Changes

GitHub Actions versions

  • python-publish.yml: actions/checkout@v3@v5, actions/setup-python@v3@v6
  • test.yaml: codecov-action@v3@v5
  • test_runner.yaml: codecov-action@v3@v5; uncommented the trigger block (was fully commented out, so runner tests never ran on push/PR). Trigger pattern aligned with test.yaml and code-quality.yaml: push: [main], pull_request: [main, release/*].

Pre-commit

  • .pre-commit-config.yaml: pyupgrade --py38-plus--py39-plus (CI tests Python 3.9–3.13, so 3.8 floor was too conservative); ruff v0.5.5v0.6.9

Dependencies

  • runner-requirements.txt:
    • Drop torch<2.0.0 upper bound (torch 2.x has been stable for a long time)
    • pytorch-lightning==1.8.3.post2lightning (the pytorch-lightning package name was deprecated in favor of the unified lightning package; 1.8.x is EOL)
    • torchmetrics==0.11.0torchmetrics (unpinned to allow compatible updates)
  • .github/dependabot.yml: removed the ignore: block that suppressed patch updates for pytorch-lightning and torchmetrics. With the migration to lightning, the old ignore rules no longer apply and would block useful updates.

Motivation

Several CI workflow versions and pins were outdated. The runner test workflow triggers were fully commented out, so runner/ tests never actually ran in CI. pytorch-lightning 1.8.x is EOL and the package was renamed. These updates bring CI back in line with current action versions and unblock future dependency updates.

Validation

  • All YAML files validated as syntactically correct (yaml.safe_load)
  • Grep confirms no stale codecov-action@v3, actions/checkout@v3, actions/setup-python@v3, ==1.8.3, ==0.11.0, <2.0.0, --py38-plus, or v0.5.5 remain in any in-scope file
  • This PR is part of a 4-PR batch (community-docs, add-tests, bugfixes, ci-updates) with disjoint file sets

Notes

  • The pypa/gh-action-pypi-publish@<SHA> pin in python-publish.yml was left untouched (SHA-pinning is intentional for supply-chain security on publish workflows)
  • The runner/ source files still reference pytorch-lightning in places (runner/tests/helpers/run_if.py, runner/configs/, runner/README.md) — these are out of scope for this CI-config PR and would be addressed separately if/when the runner is migrated to lightning

Summary by Sourcery

Update CI workflows, pre-commit configuration, and runner dependencies to use current tooling and ensure runner tests execute in CI.

Enhancements:

  • Raise the pyupgrade minimum version target to Python 3.9 and update the Ruff pre-commit hook to a newer release.
  • Relax runner dependency pins by adopting the lightning package, unpinning torchmetrics, and dropping the Torch <2.0 upper bound.

Build:

  • Remove Dependabot ignore rules that previously suppressed patch updates for pytorch-lightning and torchmetrics.

CI:

  • Enable the runner test GitHub Actions workflow on push to main and pull requests to main and release branches.
  • Upgrade GitHub Actions usages to newer versions, including checkout@v5, setup-python@v6, and codecov-action@v5.

…nd deps

- python-publish.yml: actions/checkout@v3 -> v5, actions/setup-python@v3 -> v6
- test_runner.yaml: uncomment trigger block (aligned with test.yaml/code-quality.yaml pattern: push on main, PR on main + release/*), codecov-action@v3 -> v5
- test.yaml: codecov-action@v3 -> v5
- .pre-commit-config.yaml: pyupgrade --py38-plus -> --py39-plus, ruff v0.5.5 -> v0.6.9
- runner-requirements.txt: drop torch<2.0.0 upper bound, pytorch-lightning==1.8.3.post2 -> lightning, torchmetrics==0.11.0 -> torchmetrics
- dependabot.yml: remove ignore rules for pytorch-lightning/torchmetrics patch updates (lightning 1.x is EOL)
@sourcery-ai

sourcery-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates CI workflows, pre-commit configuration, and runner dependencies to current versions while re-enabling the runner test workflow and removing outdated pins/ignore rules that blocked dependency updates.

Flow diagram for updated CI workflows and runner test triggers

flowchart TD
    subgraph GitHub_Events
        A[push to main]
        B[pull_request to main or release/*]
    end

    subgraph Workflows
        T[test.yaml workflow]
        R[test_runner.yaml workflow]
        P[python-publish.yml workflow]
    end

    subgraph External_Services
        C["codecov-action@v5"]
        PyPI[pypa/gh-action-pypi-publish]
    end

    A --> T
    B --> T

    A --> R
    B --> R

    T --> C
    R --> C

    A --> P
    P --> PyPI
Loading

File-Level Changes

Change Details Files
Modernize GitHub Actions versions and re-enable runner tests in CI.
  • Update actions/checkout from v3 to v5 in the python publish workflow.
  • Update actions/setup-python from v3 to v6 in the python publish workflow.
  • Update codecov/codecov-action from v3 to v5 in test.yaml.
  • Update codecov/codecov-action from v3 to v5 in test_runner.yaml.
  • Uncomment and align test_runner.yaml triggers so runner tests run on push to main and PRs to main and release/* branches.
.github/workflows/python-publish.yml
.github/workflows/test.yaml
.github/workflows/test_runner.yaml
Tighten pre-commit tooling to match supported Python versions and bump linter version.
  • Raise pyupgrade target from --py38-plus to --py39-plus to reflect the project’s Python 3.9+ support.
  • Bump ruff-pre-commit hook from v0.5.5 to v0.6.9.
.pre-commit-config.yaml
Relax and modernize runner dependency constraints and allow Dependabot to update them.
  • Remove the torch<2.0.0 upper bound to allow torch 2.x.
  • Replace the deprecated pytorch-lightning==1.8.3.post2 pin with the lightning package name.
  • Unpin torchmetrics==0.11.0 so it can receive compatible updates.
  • Delete Dependabot ignore rules that prevented patch updates for pytorch-lightning and torchmetrics.
runner-requirements.txt
.github/dependabot.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

@sourcery-ai sourcery-ai Bot 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.

Hey - I've left some high level feedback:

  • For the relaxed torch and torchmetrics constraints in runner-requirements.txt, consider using compatible version ranges (e.g., torch>=2,<3, torchmetrics>=x,<y) instead of fully unpinning to reduce the risk of unexpected breaking changes in the runner.
  • Now that pytorch-lightning is replaced by lightning in runner-requirements.txt, it may be worth adding a brief TODO or issue reference near the remaining pytorch-lightning references (noted in the PR description) so the eventual code/config migration is easier to track.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- For the relaxed `torch` and `torchmetrics` constraints in `runner-requirements.txt`, consider using compatible version ranges (e.g., `torch>=2,<3`, `torchmetrics>=x,<y`) instead of fully unpinning to reduce the risk of unexpected breaking changes in the runner.
- Now that `pytorch-lightning` is replaced by `lightning` in `runner-requirements.txt`, it may be worth adding a brief TODO or issue reference near the remaining `pytorch-lightning` references (noted in the PR description) so the eventual code/config migration is easier to track.

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.

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.

1 participant