Skip to content

Commit 1f5ba81

Browse files
chore: remove experimental MDARunner (#235)
* ci(pre-commit.ci): autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.9 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.9...v0.11.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.0](pre-commit/mirrors-mypy@v1.15.0...v1.16.0) * remove experimental * remove test * remove uv.lock --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
1 parent d3df2b7 commit 1f5ba81

File tree

12 files changed

+19
-2989
lines changed

12 files changed

+19
-2989
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,5 @@ dmypy.json
129129
.pyre/
130130
.vscode/settings.json
131131
useq/_version.py
132+
133+
uv.lock

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ repos:
1212
- id: validate-pyproject
1313

1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.11.9
15+
rev: v0.12.0
1616
hooks:
17-
- id: ruff
17+
- id: ruff-check
1818
args: [--fix, --unsafe-fixes]
1919
- id: ruff-format
2020

2121
- repo: https://github.com/pre-commit/mirrors-mypy
22-
rev: v1.15.0
22+
rev: v1.16.1
2323
hooks:
2424
- id: mypy
2525
files: "^src/"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dev = [
5858
"ipython>=8.18.1",
5959
"mypy>=1.15.0",
6060
"pdbpp>=0.11.6 ; sys_platform != 'win32'",
61-
"pre-commit>=4.2.0",
61+
"pre-commit-uv>=4.1.0",
6262
"rich>=14.0.0",
6363
"ruff>=0.11.9",
6464
"types-pyyaml>=6.0.12.20250402",

src/useq/_grid.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ def num_positions(self) -> int:
112112
size. If no field of view size is provided, the number of positions will be 1.
113113
"""
114114
if isinstance(self, (GridFromEdges, GridWidthHeight)) and (
115-
# type ignore is because mypy thinks self is Never here...
116-
self.fov_width is None or self.fov_height is None # type: ignore [attr-defined]
115+
self.fov_width is None or self.fov_height is None
117116
):
118117
raise ValueError(
119118
"Retrieving the number of positions in a GridFromEdges or "

src/useq/_mda_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class MDASequence(UseqModel):
181181
axis_order: tuple[str, ...] = AXES
182182
# note that these are BOTH just `Sequence[Position]` but we retain the distinction
183183
# here so that WellPlatePlans are preserved in the model instance.
184-
stage_positions: Union[WellPlatePlan, tuple[Position, ...]] = Field( # type: ignore
184+
stage_positions: Union[WellPlatePlan, tuple[Position, ...]] = Field(
185185
default_factory=tuple, union_mode="left_to_right"
186186
)
187187
grid_plan: Optional[MultiPointPlan] = Field(

src/useq/_point_visiting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _rect_indices(
8787
c[1::2, :] = c[1::2, :][:, ::-1]
8888
else:
8989
r[:, 1::2] = r[:, 1::2][::-1, :]
90-
return zip(r.ravel(), c.ravel()) if row_wise else zip(r.T.ravel(), c.T.ravel())
90+
return zip(r.ravel(), c.ravel()) if row_wise else zip(r.T.ravel(), c.T.ravel()) # pyright: ignore
9191

9292

9393
IndexGenerator = Callable[[int, int], Iterator[tuple[int, int]]]

src/useq/experimental/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
"""MDARunner class for running an Iterable[MDAEvent]."""
1+
"""Experimental features for useq."""
22

3-
from useq.experimental._runner import MDARunner
4-
from useq.experimental.protocols import PMDAEngine
53

6-
__all__ = ["MDARunner", "PMDAEngine"]
4+
def __getattr__(name: str) -> object:
5+
"""Get an attribute from the module."""
6+
if name in {"MDARunner", "PMDAEngine"}:
7+
raise AttributeError(
8+
f"{name!r} is no longer available in {__name__}. "
9+
"Please depend on pymmcore-plus instead. (You can still use MDARunner "
10+
"and PMDAEngine without any other micro-manager dependencies.)"
11+
)
12+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")

0 commit comments

Comments
 (0)