Skip to content

Commit

Permalink
Merge pull request #117 from ap--/paquo-arm-installation
Browse files Browse the repository at this point in the history
Paquo arm installation
  • Loading branch information
ap-- authored Jul 21, 2024
2 parents 835e8bf + 0daca7b commit 08ef4c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +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: .
Expand Down
7 changes: 7 additions & 0 deletions paquo/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
8 changes: 4 additions & 4 deletions paquo/pathobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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]:
Expand All @@ -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):
Expand Down

0 comments on commit 08ef4c2

Please sign in to comment.