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!: change axis_order type to Tuple[str, ...] #140

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Sep 23, 2023

fixes #138

Changes:

MDASequence:
    # this 
    axis_order: str = "".join(AXES)
    # to this
    axis_order: Tuple[str, ...] = AXES

the typing of MDASequence.axis_order was too strict. It's fine to accept a string as input, but it should also be able to accept a sequence of strings, each of which may be more than a single character

@ianhi, can you think of anywhere you're assuming axis_order is a literal string, rather than generic sequence of strings?

@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a269e66) 98.28% compared to head (b07287c) 98.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #140   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          14       14           
  Lines         877      877           
=======================================
  Hits          862      862           
  Misses         15       15           
Files Changed Coverage Δ
src/useq/_mda_sequence.py 98.63% <100.00%> (ø)

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

@tlambert03 tlambert03 changed the title refactor: change axis_order type to Tuple[str, ...] refactor!: change axis_order type to Tuple[str, ...] Sep 23, 2023
@tlambert03 tlambert03 merged commit e80c0d1 into pymmcore-plus:main Sep 26, 2023
24 checks passed
@tlambert03 tlambert03 deleted the axis-order-str branch September 26, 2023 20:10
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.

Todo: make axis order Sequence[str] not str
1 participant