Skip to content

feat: new iteration pattern/rewrite (take 2)#232

Closed
tlambert03 wants to merge 92 commits into
pymmcore-plus:mainfrom
tlambert03:refactor/multi-axis-sequence
Closed

feat: new iteration pattern/rewrite (take 2)#232
tlambert03 wants to merge 92 commits into
pymmcore-plus:mainfrom
tlambert03:refactor/multi-axis-sequence

Conversation

@tlambert03

Copy link
Copy Markdown
Member

No description provided.

This commit refactors the AxisIterator and TimePlan classes in the example.py file. The changes include:
- Adding type hints and annotations to improve code readability and maintainability.
- Renaming the `length` method in AxisIterator to `num_timepoints` for clarity.
- Adding a new `deltas` method to TimePlan to iterate over the time deltas between timepoints.
- Handling the case of an infinite sequence in the `num_timepoints` method of TimePlan.

These changes improve the overall structure and functionality of the code.
@codecov

codecov Bot commented May 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.53779% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.78%. Comparing base (1f5ba81) to head (56fd774).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
src/useq/v2/_importable_object.py 64.10% 14 Missing ⚠️
src/useq/v2/_axes_iterator.py 92.79% 8 Missing ⚠️
src/useq/v2/_position.py 85.41% 7 Missing ⚠️
src/useq/v2/_grid.py 96.05% 6 Missing ⚠️
src/useq/v2/_mda_sequence.py 96.47% 5 Missing ⚠️
src/useq/v2/_stage_positions.py 86.48% 5 Missing ⚠️
src/useq/v2/_transformers.py 94.82% 3 Missing ⚠️
src/useq/_mda_event.py 94.44% 2 Missing ⚠️
src/useq/_time.py 94.44% 2 Missing ⚠️
src/useq/v2/_multi_point.py 92.59% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   97.18%   95.78%   -1.40%     
==========================================
  Files          19       33      +14     
  Lines        1383     2207     +824     
==========================================
+ Hits         1344     2114     +770     
- Misses         39       93      +54     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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