-
Notifications
You must be signed in to change notification settings - Fork 10
chore: Drop test against pyside2 in napari repo workflow #1352
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
base: develop
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates tox environments and CI workflow to stop running full napari-repo tests with PySide2 and to add Python 3.13 coverage for napari-repo, while keeping widget-only tests for released napari versions across all backends. Flow diagram for updated tox environments and backend coverageflowchart TD
start["Start tox invocation"] --> select_env["Select tox environment"]
subgraph released_napari["Widget tests for released napari"]
select_env --> env_widgets
env_widgets --> choose_py_version["Python version py39, py310, py311, py312, py313"]
choose_py_version --> choose_backend["Qt backend PyQt5, PySide2, PyQt6, PySide6"]
choose_backend --> choose_napari_version["napari version 0.4.19 or 0.5.4"]
choose_napari_version --> install_released["Install napari from PyPI"]
install_released --> run_widgets_pytest["Run pytest on test_napari_widgets with JSON report"]
end
subgraph napari_repo["Full tests for napari repo"]
select_env --> env_repo
env_repo --> choose_py_version_repo["Python version py310, py311, py312, py313"]
choose_py_version_repo --> choose_backend_repo["Qt backend PyQt5, PyQt6, PySide6"]
choose_backend_repo --> install_repo["Install napari from GitHub napari/napari"]
install_repo --> run_full_pytest["Run pytest on package/tests with JSON report"]
end
run_widgets_pytest --> end_widgets["End widget test env"]
run_full_pytest --> end_repo["End repo test env"]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
📝 WalkthroughWalkthroughUpdates CI and test configuration: adds Python 3.13 to the napari test matrix, splits napari repo tests into a dedicated tox environment, and defers showing the napari Viewer until after initialization in one GUI module. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- In the new
[testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo]you dropped the-vflag from the pytest invocation compared to the other napari testenvs; if that wasn’t intentional, consider adding-vfor consistent output across environments. - The pytest command and JSON report options are now duplicated between the napari widget env and the new
napari_repoenv; consider extracting the common command into a factor or a sharedcommandssnippet to keep the tox config DRY and easier to maintain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the new `[testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo]` you dropped the `-v` flag from the pytest invocation compared to the other napari testenvs; if that wasn’t intentional, consider adding `-v` for consistent output across environments.
- The pytest command and JSON report options are now duplicated between the napari widget env and the new `napari_repo` env; consider extracting the common command into a factor or a shared `commands` snippet to keep the tox config DRY and easier to maintain.
## Individual Comments
### Comment 1
<location> `tox.ini:84` </location>
<code_context>
+ python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs}
+
+
+[testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo]
+deps =
+ {[testenv]deps}
</code_context>
<issue_to_address>
**question (testing):** The napari_repo env drops PySide2 and py39; confirm this reduction in matrix is intentional.
Previously, `napari_repo` ran on `py{39,310,311,312,313}-{PyQt5,PySide2,PyQt6,PySide6}`; now it’s only `py{310,311,312,313}-{PyQt5,PyQt6,PySide6}`. Unless this is due to an intentional upstream drop of py39/PySide2 support, consider keeping those combos so we don’t silently lose coverage for configurations users may still depend on.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} | ||
|
|
||
|
|
||
| [testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (testing): The napari_repo env drops PySide2 and py39; confirm this reduction in matrix is intentional.
Previously, napari_repo ran on py{39,310,311,312,313}-{PyQt5,PySide2,PyQt6,PySide6}; now it’s only py{310,311,312,313}-{PyQt5,PyQt6,PySide6}. Unless this is due to an intentional upstream drop of py39/PySide2 support, consider keeping those combos so we don’t silently lose coverage for configurations users may still depend on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tox.ini`:
- Around line 84-89: The napari git dependency in the testenv named
testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo is unpinned;
replace the deps entry git+https://github.com/napari/napari.git with a pinned
reference to a tag or commit (e.g.
git+https://github.com/napari/napari.git@vX.Y.Z or
git+https://github.com/napari/napari.git@<commit-hash>#egg=napari) to ensure CI
reproducibility, updating the deps line in that testenv block (keep the env name
and other deps identical).
| [testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo] | ||
| deps = | ||
| {[testenv]deps} | ||
| git+https://github.com/napari/napari.git | ||
| commands = | ||
| python -m pytest package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
PyQt5 Python 3.13 wheels support
💡 Result:
PyQt5 does support Python 3.13 via wheels, but not as “cp313” wheels.
- The latest PyQt5 release on PyPI (5.15.11, uploaded Jul 19, 2024) publishes
cp38-abi3wheels for Windows (x86/x64), macOS (x86_64/arm64), and Linux x86_64 (manylinux glibc ≥ 2.17). Because they’reabi3wheels, they are usable on CPython 3.8+ (including 3.13). [1] - If your install pulls in Qt libraries via
PyQt5-Qt5/pyqt5-qt5, note that its wheels exist for Linux x86_64 and macOS, and (at least for recent versions like 5.15.18, Nov 9 2025) do not include Windows wheels. [2] (On Windows, PyQt5’s own wheel is the one you’ll typically rely on.) - On non-x86_64 Linux (e.g., Raspberry Pi), you may need platform-specific wheels from third parties (example:
pyqt5-siphas cp313 wheels on piwheels), or build from source / use conda. [3]
What to do: on Python 3.13, try pip install PyQt5—if you’re on a supported platform above, pip should select the abi3 wheel automatically. [1]
Sources: PyQt5 on PyPI [1], pyqt5-qt5 on PyPI [2], piwheels pyqt5-sip builds [3].
🌐 Web query:
PyQt5 version 5.15 Python 3.13 compatibility
💡 Result:
PyQt5 5.15.x is compatible with Python 3.13, as long as you install a recent PyQt5 5.15 release and its current dependencies:
- PyQt5 (latest 5.15.11) on PyPI declares “Requires: Python >=3.8” and ships
cp38-abi3wheels, which are intended to work on CPython 3.8+ (including 3.13). (pypi.org) - PyQt5-sip provides CPython 3.13 (
cp313) wheels in recent releases (e.g., 12.18.0, uploaded Jan 13, 2026), which is important because PyQt5 depends on it. (pypi.org)
Practical guidance:
- Use
pip install PyQt5(don’t pin an old PyQt5-sip), so pip can pick up a cp313 PyQt5-sip wheel automatically. (pypi.org)
Citations:
- 1: https://pypi.org/project/PyQt5/
- 2: https://pypi.org/project/pyqt5-sip/?utm_source=openai
- 3: https://pypi.org/project/pyqt5-sip/?utm_source=openai
Pin the napari git dependency to a tag/commit for CI reproducibility.
Using an unpinned git+ dependency makes builds non-deterministic and can break on upstream changes. Pin to a specific tag or commit hash.
PyQt5 supports Python 3.13 via cp38-abi3 wheels (PyQt5 5.15.11+) and its pyqt5-sip dependency provides cp313 wheels, so py313-PyQt5 does not need exclusion on supported platforms (Windows x86/x64, macOS, Linux x86_64).
🔧 Suggested pinning for reproducibility
deps =
{[testenv]deps}
- git+https://github.com/napari/napari.git
+ git+https://github.com/napari/napari.git@<tag-or-commit>🤖 Prompt for AI Agents
In `@tox.ini` around lines 84 - 89, The napari git dependency in the testenv named
testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo is unpinned;
replace the deps entry git+https://github.com/napari/napari.git with a pinned
reference to a tag or commit (e.g.
git+https://github.com/napari/napari.git@vX.Y.Z or
git+https://github.com/napari/napari.git@<commit-hash>#egg=napari) to ensure CI
reproducibility, updating the deps line in that testenv block (keep the env name
and other deps identical).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow is intentionally to check if there is some napari incompatibility before the release of the next version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Czaki, thank you for the clarification! You're absolutely right—testing against the latest napari development version is a great practice for catching compatibility issues early. The unpinned dependency is appropriate for this pre-release testing workflow.
I appreciate the context and apologize for the noise on this one.
✏️ Learnings added
Learnt from: Czaki
Repo: 4DNucleome/PartSeg PR: 1352
File: tox.ini:84-89
Timestamp: 2026-02-06T10:35:06.033Z
Learning: In the PartSeg repository, the testenv:py{310,311,312,313}-{PyQt5,PyQt6,PySide6}-napari_repo in tox.ini intentionally uses an unpinned git dependency (git+https://github.com/napari/napari.git) to test against the latest napari development version and catch incompatibilities before napari releases.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: Czaki
Repo: 4DNucleome/PartSeg PR: 1206
File: .github/workflows/test_napari_widgets.yml:30-30
Timestamp: 2024-10-17T12:19:43.905Z
Learning: In the CI configuration, `napari54` corresponds to napari version `0.5.4`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1352 +/- ##
===========================================
- Coverage 93.17% 93.15% -0.02%
===========================================
Files 210 210
Lines 33253 33254 +1
===========================================
- Hits 30983 30979 -4
- Misses 2270 2275 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



Add testing napari repo against python 3.13
Summary by Sourcery
Update napari testing configuration to separate repo-based tests from pinned napari versions and expand CI coverage to Python 3.13.
Enhancements:
CI:
Summary by CodeRabbit