Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_napari_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
platform: [ ubuntu-24.04 ]
python: ['3.10', '3.11', '3.12']
python: ['3.10', '3.11', '3.12', '3.13']
napari_version: ['repo']
steps:
- uses: actions/checkout@v6
Expand Down
5 changes: 4 additions & 1 deletion package/PartSeg/common_gui/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ def get_colormaps(self) -> list[Optional[colormap.Colormap]]:
return [self.settings.colormap_dict[name][0] for name in colormaps_name]

def napari_viewer_show(self):
viewer = Viewer(title="Additional output", settings=self.settings, partseg_viewer_name=self.channel_info)
viewer = Viewer(
title="Additional output", settings=self.settings, partseg_viewer_name=self.channel_info, show=False
)
viewer.scale_bar.unit = "nm"
viewer.theme = self.settings.theme_name
viewer.create_initial_layers(image=True, roi=True, additional_layers=False, points=True)
viewer.show()
self.viewer_list.append(viewer)
viewer.window.qt_viewer.destroyed.connect(lambda _x: self.close_viewer(viewer))

Expand Down
16 changes: 12 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,23 @@ deps=
pytest-json-report
lxml_html_clean

[testenv:py{39,310,311,312,313}-{PyQt5,PySide2,PyQt6,PySide6}-napari_{419,54,repo}]

[testenv:py{39,310,311,312,313}-{PyQt5,PySide2,PyQt6,PySide6}-napari_{419,54}]
deps =
{[testenv]deps}
napari_419: napari==0.4.19.post1
napari_54: napari==0.5.4
napari_repo: git+https://github.com/napari/napari.git
commands =
!napari_repo: python -m pytest -v package/tests/test_PartSeg/test_napari_widgets.py --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs}
napari_repo: python -m pytest package/tests --json-report --json-report-file={toxinidir}/report-{envname}-{sys_platform}.json {posargs}
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]
Copy link
Contributor

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.

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}
Comment on lines +84 to +89
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 6, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 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-abi3 wheels for Windows (x86/x64), macOS (x86_64/arm64), and Linux x86_64 (manylinux glibc ≥ 2.17). Because they’re abi3 wheels, 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-sip has 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-abi3 wheels, 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:


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).

Copy link
Collaborator Author

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

Copy link
Contributor

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`.



[testenv:py{39,310,311,312,313}-PyQt5-coverage]
deps =
Expand Down
Loading