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

feat: add Actions to MDA event, and add autofocus events #96

Closed tlambert03 closed 1 year ago

tlambert03 commented 1 year ago

here ya go @fdrgsp :) ended up being only a few line change in iter_sequence. have a look and we can talk about it soon. I updated the test patterns too. I didn't fully reimplement all of your scenarios, but I'm confident they'll work, since at this point, all we're really testing is just the logic of the very simple def should_autofocus(self, event: MDAEvent) -> bool: method.

closes #91, closes #94

this includes most of #94, and a little cleanup is still needed

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 96.15% and project coverage change: +0.07 :tada:

Comparison is base (64bdd61) 96.33% compared to head (4fd7f43) 96.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #96 +/- ## ========================================== + Coverage 96.33% 96.40% +0.07% ========================================== Files 10 12 +2 Lines 654 724 +70 ========================================== + Hits 630 698 +68 - Misses 24 26 +2 ``` | [Impacted Files](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?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/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX21kYV9zZXF1ZW5jZS5weQ==) | `98.35% <92.30%> (-0.76%)` | :arrow_down: | | [src/useq/\_hardware\_autofocus.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX2hhcmR3YXJlX2F1dG9mb2N1cy5weQ==) | `96.96% <96.96%> (ø)` | | | [src/useq/\_\_init\_\_.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | | [src/useq/\_actions.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX2FjdGlvbnMucHk=) | `100.00% <100.00%> (ø)` | | | [src/useq/\_grid.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX2dyaWQucHk=) | `100.00% <100.00%> (ø)` | | | [src/useq/\_mda\_event.py](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL3VzZXEvX21kYV9ldmVudC5weQ==) | `87.27% <100.00%> (+0.48%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/pymmcore-plus/useq-schema/pull/96/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.