pymmcore-plus / useq-schema

An implementation agnostic schema for describing a sequence of events during a multi-dimensional imaging acquisition.
https://pymmcore-plus.github.io/useq-schema/
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

refactor: normalize `WellPlate.selected_wells` #180

Closed tlambert03 closed 2 months ago

tlambert03 commented 2 months ago

This PR changes the two of WellPlate.selected_wells from the very lax IndexExpression

Index = Union[int, List[int], Annotated[slice, _SliceType]]
IndexExpression = Union[Tuple[Index, ...], Index]

to a strict:

Tuple[Tuple[int, ...], Tuple[int, ...]]

The primary reason is that it makes checking equality between two plate plans easier.

it also modifies __repr_args__ to simplify the representation when possible

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 93.93939% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.69%. Comparing base (7fd1744) to head (bed820b).

Files Patch % Lines
src/useq/_plate.py 93.93% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #180 +/- ## ========================================== - Coverage 93.77% 93.69% -0.08% ========================================== Files 18 18 Lines 1188 1221 +33 ========================================== + Hits 1114 1144 +30 - Misses 74 77 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.