Skip to content
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

Paquo arm installation #117

Merged
merged 4 commits into from
Jul 21, 2024
Merged
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
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
Loading