Skip to content

Commit 32b3b50

Browse files
committed
use newest version (v0.6.1) of gertils
1 parent 94bbab7 commit 32b3b50

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [v0.3.5] - 2025-10-30
8+
9+
### Changed
10+
* Depend on newest version (v0.6.1) of `gertils`, and adapt code accordingly.
11+
712
## [v0.3.4] - 2025-04-01
813

914
### Changed

looptrace_loci_vis/point_record.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Union
66

77
import numpy as np
8-
from gertils.geometry import ImagePoint3D, LocatableXY, LocatableZ, ZCoordinate
8+
from gertils.geometry import ImagePoint3D
99
from gertils.types import TimepointFrom0 as Timepoint
1010
from gertils.types import TraceIdFrom0 as TraceId
1111
from numpydoc_decorator import doc # type: ignore[import-untyped]
@@ -23,7 +23,7 @@
2323
),
2424
)
2525
@dataclasses.dataclass(frozen=True, kw_only=True)
26-
class PointRecord(LocatableXY, LocatableZ): # noqa: D101
26+
class PointRecord: # noqa: D101
2727
trace_id: TraceId
2828
region_time: Timepoint
2929
timepoint: Timepoint
@@ -50,23 +50,14 @@ def flatten(self) -> FlatPointRecord:
5050
self.trace_id.get,
5151
self.region_time.get,
5252
self.timepoint.get,
53-
self.get_z_coordinate(),
54-
self.get_y_coordinate(),
55-
self.get_x_coordinate(),
53+
self.point.z,
54+
self.point.y,
55+
self.point.x,
5656
]
5757

58-
def get_x_coordinate(self) -> float: # noqa: D102
59-
return self.point.x
60-
61-
def get_y_coordinate(self) -> float: # noqa: D102
62-
return self.point.y
63-
64-
def get_z_coordinate(self) -> ZCoordinate: # noqa: D102
65-
return self.point.z
66-
6758
@doc(summary="Round point position to nearest z-slice")
6859
def with_truncated_z(self) -> "PointRecord": # noqa: D102
69-
new_z: int = floor(self.get_z_coordinate())
60+
new_z: int = floor(self.point.z)
7061
result: PointRecord = self.with_new_z(new_z)
7162
return result
7263

@@ -98,7 +89,7 @@ def expand_along_z( # noqa: D103
9889
raise TypeError(f"Bad type for z_max: {type(z_max).__name__}")
9990

10091
r = r.with_truncated_z()
101-
z_center: int = int(r.get_z_coordinate())
92+
z_center: int = int(r.point.z)
10293
z_max: int = floor(z_max) # type: ignore[no-redef]
10394
if not isinstance(z_center, int) or not isinstance(z_max, int):
10495
raise TypeError(

looptrace_loci_vis/reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def records_to_qcpass_layer_data(
187187
records: list[PointRecord],
188188
) -> tuple[list[PointRecord], list[bool], LayerParams]:
189189
"""Extend the given records partially through a z-stack, designate appropriately as central-plane or not."""
190-
max_z = max(r.get_z_coordinate() for r in records)
190+
max_z = max(r.point.z for r in records)
191191
points: list[PointRecord] = []
192192
center_flags: list[bool] = []
193193
for rec in records:
@@ -202,7 +202,7 @@ def records_to_qcfail_layer_data(
202202
record_qc_pairs: list[tuple[PointRecord, QCFailReasons]],
203203
) -> tuple[list[PointRecord], list[bool], LayerParams]:
204204
"""Extend the given records partially through a z-stack, designate appropriately as central-plane or not; also set fail codes text."""
205-
max_z = max(r.get_z_coordinate() for r, _ in record_qc_pairs)
205+
max_z = max(r.point.z for r, _ in record_qc_pairs)
206206
points: list[PointRecord] = []
207207
center_flags: list[bool] = []
208208
codes: list[QCFailReasons] = []

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "looptrace-loci-vis"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
description = "This project facilitates viewing, in `napari`, locus-specific spots from `looptrace`."
55
authors = ["Vince Reuter"]
66
license = "MIT"
@@ -30,7 +30,7 @@ looptrace-loci-vis = "looptrace_loci_vis:napari.yaml"
3030
[tool.poetry.dependencies]
3131
python = ">=3.10,<3.13"
3232
expression = ">=5.0.2"
33-
gertils = { git = "https://github.com/gerlichlab/gertils.git", tag = "v0.6.0" }
33+
gertils = { git = "https://github.com/gerlichlab/gertils.git", tag = "v0.6.1" }
3434
numpy = "*"
3535
numpydoc_decorator = ">=2.2.1"
3636
pandas = "*"

0 commit comments

Comments
 (0)