-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add RelativePosition instead of GridPosition #169
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #169 +/- ##
==========================================
- Coverage 95.65% 95.60% -0.05%
==========================================
Files 15 15
Lines 1058 1069 +11
==========================================
+ Hits 1012 1022 +10
- Misses 46 47 +1 ☔ View full report in Codecov by Sentry. |
note @fdrgsp, this PR removes row/col from |
found it :) ________________________________________________________________________________
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymmcore_widgets/_mda/_grid_widget.py", line 554, in _move_to_row_col
if pos.row == row and pos.col == col:
^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydantic/main.py", line 827, in __getattr__
raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'RelativePosition' object has no attribute 'row' |
i added back row/col ... they're not actually used anywhere, so I'm tempted to remove them, but we can leave that for another discussion. I like how this unifies the concept of positions used across useq, so would like to get this in before release. have a look when you can @fdrgsp |
when looking at #166, I realized that
GridPosition
is pretty much only there to represent the concept of some "offset" relative to an absolute position. This PR renames GridPosition toRelativePosition
, and uses it more braodly