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

refactor: normalize WellPlate.selected_wells #180

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Jul 11, 2024

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

@tlambert03 tlambert03 changed the title refactor: normalize selected_wells refactor: normalize WellPlate.selected_wells Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlambert03 tlambert03 merged commit e8498f9 into pymmcore-plus:main Jul 11, 2024
25 of 26 checks passed
@tlambert03 tlambert03 deleted the norm-expression branch July 11, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant