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
14 stars 5 forks source link

refactor!: change axis_order type to `Tuple[str, ...]` #140

Closed tlambert03 closed 9 months ago

tlambert03 commented 10 months ago

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[bot] commented 10 months ago

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 ```diff @@ Coverage Diff @@ ## main #140 +/- ## ======================================= Coverage 98.28% 98.28% ======================================= Files 14 14 Lines 877 877 ======================================= Hits 862 862 Misses 15 15 ``` | [Files Changed](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus) | Coverage Δ | | |---|---|---| | [src/useq/\_mda\_sequence.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/140?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX21kYV9zZXF1ZW5jZS5weQ==) | `98.63% <100.00%> (ø)` | |

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