From 268012f3142191abd4a09af3fd42634ff4e28c3b Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sun, 21 Jul 2024 15:16:29 +0200 Subject: [PATCH 1/4] cli: fix downloading the correct version on arm64 mac --- paquo/_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paquo/_utils.py b/paquo/_utils.py index 638620f..ad7e319 100644 --- a/paquo/_utils.py +++ b/paquo/_utils.py @@ -136,6 +136,13 @@ def download_qupath( else: _sys = "Mac-x64" name = f"QuPath-{version}-{_sys}" + elif Version(version) > Version("0.3.2"): + if system == "Darwin": + if platform.machine() == "arm64": + _sys = "Mac-arm64" + else: + _sys = "Mac" + name = f"QuPath-{version[1:]}-{_sys}" else: if "rc" not in version: name = f"QuPath-{version[1:]}-{_sys}" From 57c9c7078e15a61813b2faef397176a8bba16adb Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sun, 21 Jul 2024 15:18:49 +0200 Subject: [PATCH 2/4] docs: fix readthedocs --- .readthedocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1d254d0..33860f8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,4 +1,6 @@ version: 2 +build: + os: ubuntu-22.04 sphinx: configuration: docs/source/conf.py python: From 33e8d1700b1f5b4c69b3c0b23c5bfe069ecc0997 Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sun, 21 Jul 2024 15:19:49 +0200 Subject: [PATCH 3/4] docs: fix readthedocs python version --- .readthedocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 33860f8..fe2cccb 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,10 +1,11 @@ version: 2 build: os: ubuntu-22.04 + tools: + python: "3.8" sphinx: configuration: docs/source/conf.py python: - version: "3.8" install: - method: pip path: . From 0daca7b23a7d7eae9ca26046d2f20d6e16222022 Mon Sep 17 00:00:00 2001 From: Andreas Poehlmann Date: Sun, 21 Jul 2024 15:29:59 +0200 Subject: [PATCH 4/4] typing: ignore update_callback typing issue --- paquo/pathobjects.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paquo/pathobjects.py b/paquo/pathobjects.py index f724ea2..37a380b 100644 --- a/paquo/pathobjects.py +++ b/paquo/pathobjects.py @@ -226,7 +226,7 @@ def update_path_class(self: PathROIObjectType, pc: Optional[QuPathPathClass], pr pc = pc if pc is None else pc.java_object self.java_object.setPathClass(pc, probability) if self._update_callback: - self._update_callback(self) + self._update_callback(self) # type: ignore[arg-type] @property def locked(self) -> bool: @@ -237,7 +237,7 @@ def locked(self) -> bool: def locked(self: PathROIObjectType, value: bool) -> None: self.java_object.setLocked(value) if self._update_callback: - self._update_callback(self) + self._update_callback(self) # type: ignore[arg-type] @property def is_editable(self) -> bool: @@ -263,7 +263,7 @@ def name(self: PathROIObjectType, name: Union[str, None]) -> None: name = String(name) self.java_object.setName(name) if self._update_callback: - self._update_callback(self) + self._update_callback(self) # type: ignore[arg-type] @property def parent(self: PathROIObjectType) -> Optional[PathROIObjectType]: @@ -285,7 +285,7 @@ def update_roi(self: PathROIObjectType, geometry: BaseGeometry) -> None: roi = _shapely_geometry_to_qupath_roi(geometry) self.java_object.setROI(roi) if self._update_callback: - self._update_callback(self) + self._update_callback(self) # type: ignore[arg-type] @cached_property def measurements(self):