Skip to content

Fixes for ophyd async types mega merge - #593

Merged
rtuck99 merged 20 commits into
mainfrom
fixes_for_ophyd_async_mega_merge
Nov 5, 2024
Merged

rtuck99 merged 20 commits into
mainfrom
fixes_for_ophyd_async_mega_merge

Conversation

@rtuck99

@rtuck99 rtuck99 commented Oct 24, 2024

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Oct 24, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.02%. Comparing base (78a31cc) to head (2e4c18a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #593      +/-   ##
==========================================
+ Coverage   80.00%   80.02%   +0.01%     
==========================================
  Files          97       97              
  Lines        6806     6807       +1     
==========================================
+ Hits         5445     5447       +2     
+ Misses       1361     1360       -1     
Components Coverage Δ
i24 SSX 60.20% <ø> (ø)
hyperion 96.76% <100.00%> (+0.03%) ⬆️
other 94.96% <100.00%> (ø)

@rtuck99
rtuck99 force-pushed the fixes_for_ophyd_async_mega_merge branch from 7827da8 to 2a3e1cb Compare October 29, 2024 15:44
@rtuck99
rtuck99 marked this pull request as ready for review October 30, 2024 12:09
@rtuck99 rtuck99 changed the title DNM Fixes for ophyd async types mega merge Fixes for ophyd async types mega merge Oct 30, 2024

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks. Minor comment

)
else:
return (tip_x_px, tip_y_px)
return (int(tip_xy_px[0]), int(tip_xy_px[1]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to do this cast? If I remove it the type checker is happy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should: Can we add coverage for this line please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I added it was because move_pin_into_view is defined as returning Pixel which is tuple[int, int]
whereas trigger_and_return_pin_tip() now returns an instance of Tip which is defined as Array1D[np.int32] and whilst they are interchangeable for most purposes they aren't exactly the same type.
Notably == operator does not work the same for them, but I have also been bitten in the past when numpy primitives get laundered into variables that should be python natives.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test added

@rtuck99
rtuck99 force-pushed the fixes_for_ophyd_async_mega_merge branch from 1d448fa to cf9e272 Compare November 5, 2024 11:16
@rtuck99
rtuck99 force-pushed the fixes_for_ophyd_async_mega_merge branch from e03fdef to 309e5ce Compare November 5, 2024 11:43
@rtuck99
rtuck99 merged commit df73eb4 into main Nov 5, 2024
@rtuck99
rtuck99 deleted the fixes_for_ophyd_async_mega_merge branch November 5, 2024 13:32
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.

2 participants