Skip to content

Conversation

@ivanzati
Copy link
Contributor

@ivanzati ivanzati commented Oct 20, 2025

Switching lib-lint-and-test.yaml workflow to uv from tox

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

🚀 Integration Run Summary

  • Last Commit: Merge branch 'develop' into ivanzati/uv-lib-lint-workflow
  • Result: ⚠️ SKIPPED
  • Workflow Run: View Run

Copilot AI review requested due to automatic review settings October 20, 2025 16:20
@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM BUILD labels Oct 20, 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 CI/CD workflow from tox to uv for library linting and testing, aiming to streamline dependency management and improve build performance.

Key Changes:

  • Replaced tox-based testing with uv for dependency management and test execution
  • Updated Python version support to require Python 3.10+ (from 3.8+)
  • Removed setuptools version constraint and reorganized dependency specifications

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
library/pyproject.toml Updated dependency constraints, added uv configuration with extra conflicts, changed minimum Python target to 3.10
.github/workflows/lib-lint-and-test.yaml Replaced tox with uv for all CI jobs, simplified test execution, added Codecov action for coverage uploads

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 20, 2025

Docker Image Sizes

Image Size
geti-tune-pr-4932 2.8G
geti-tune-sha-f226ef2 2.8G

@github-actions
Copy link

github-actions bot commented Oct 20, 2025

📊 Test coverage report

Metric Coverage
Lines 40.2%
Functions 34.9%
Branches 84.8%
Statements 40.2%

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ivanzati ivanzati changed the title [WIP] Switch lib-lint-and-test workflow to uv [WIP - testing integration] Switch lib-lint-and-test workflow to uv Oct 21, 2025
branches:
- develop
- releases/**
- release/**
Copy link
Contributor

Choose a reason for hiding this comment

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

In other workflows we use releases/**, although in branch names we use release (e.g. https://github.com/open-edge-platform/training_extensions/tree/release/2.6)

Leonardo, could you please clarify what we plan to use? @leoll2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have intention to change this to "release/**" for other workflows as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. I'd opt for release for compatibility with the existing release branches. The other workflows have to be updated accordingly.

curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${{ secrets.CODECOV_TOKEN }} --sha $COMMIT_ID -U $HTTP_PROXY -f .tox/coverage_unit-test-${{ matrix.tox-env }}.xml -F ${{ matrix.tox-env }}
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
Copy link
Contributor

Choose a reason for hiding this comment

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

This step will fail for PR from fork (by design, GH token for pull_request trigger has read-only permissions).
I would propose to add condition to skip this step for PR from forks (something like https://github.com/open-edge-platform/training_extensions/blob/develop/.github/workflows/ui-lint-and-test.yaml#L259)

description = "OpenVINO™ Training Extensions: Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.10,<3.13"
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

OTX supports Python 3.13, so <3.13 is wrong here. I would leave this line unchanged: ">=3.10".

"typeguard>=4.3,<4.5",
# TODO(ashwinvaidya17): https://github.com/openvinotoolkit/anomalib/issues/2126
"setuptools<70",
"setuptools",
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose to firstly merge this PR #4903, as there are some chages in toml as well, e.g.
"setuptools==78.1.1"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, indeed. Also this would help to integration test with adaptive batch size to succeed I reckon.

Comment on lines 75 to 79
run: |
pip install '.[dev]'
- name: Code quality checks
run: uv sync --locked --extra dev --extra cuda --no-extra xpu
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the extra cuda necessary for the tests to pass? Does it even work on the standard GPU-less Github runners?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, indeed the cuda is not required to pass the quality check. Wanted to keep it the same as next tests. Though would revert back. Thanks!

- name: Run pre-commit checks
working-directory: library
run: tox r -vv -e pre-commit
run: uv run --frozen --extra dev --extra cuda --no-extra xpu pre-commit run --all-files
Copy link
Contributor

Choose a reason for hiding this comment

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

You already install the dependencies in the previous step, I think --frozen --extra dev --extra cuda --no-extra xpu is redundant.

@ivanzati
Copy link
Contributor Author

/run instance_segmentation

pip install '.[dev]'
- name: Run Integration Test
uv lock --check
uv sync --frozen --extra cuda --no-extra xpu
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI I have just merged a CPU only mode (--extra cpu, #4972). I don't know if the integration tests require a GPU to pass, probably yes; if not, you may consider switching to this CPU installation.

matrix:
include:
- task: "multi_class_cls"
python-version: "3.12"
Copy link
Contributor

Choose a reason for hiding this comment

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

We are setting python-version to 3.12 for all of matrix builds wouldn't it be better to set single env for whole job?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants