-
Notifications
You must be signed in to change notification settings - Fork 11
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
add i18 beamline definition - WITH device_factory #722
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #722 +/- ##
==========================================
+ Coverage 97.51% 97.57% +0.06%
==========================================
Files 152 159 +7
Lines 6351 6523 +172
==========================================
+ Hits 6193 6365 +172
Misses 158 158 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Stan! Why are there so many skipped devices here?
@DominicOram the devices are skipped as we don't need all of them at the moment, as we roll out the devices following the plans we make, so it's gradual and agile |
The more agile way to do it would be don't put the devices in at all until you need them otherwise we now have code in that never runs and we don't know if it works. |
we need them for the plans in a different repo. also aren't devices skipped all the time depending if they are off or taken out of a beamline physically? |
lint error
FAILED tests/devices/i22/test_dcm.py::test_configuration - AssertionError: Expected dcm to produce @iain-hall I'll try tackling the second one |
I would not use the Ophyd (i.e. not ophyd-async) SynAxis |
the |
that is because in ophyd-async h5py was added only as a dev dependency |
@DiamondJoseph how do I ask for the ophyd-async to be installed with the [sim] dependencies? the error in question: |
I'll answer on sSlack to avoid everyone getting emails |
waiting until pydantic 2 |
d9dc74a
to
033aec4
Compare
I still think a smoke test would be good for them. i.e. go through and instantiate every device as a mock. I think we have similar code that does this for MX beamlins. |
We do have that, it just is respecting skip_device so isn't checking the devices that are skipped. Removing the skips from the devices that are functional will help get the numbers back up. There's also 2 missed lines in the ThorLabs table set method, the other new device classes have tests but that does not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The device_factory suggestions are nits, but unskipping the devices will
a. get the code coverage up
b. mean you don't have to document why they are skipped when they are fully functional
c. give you a wider range of devices when you get to test on the beamline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gotta get the i22 changes that snuck in with the rebase out again then it should be ready
src/dodal/beamlines/i18.py
Outdated
|
||
|
||
@device_factory(skip=True) | ||
# VFM uses different IOC than HFM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link the issue for it #1009
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Co-authored-by: Joseph Ware <53935796+DiamondJoseph@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the test coverage is fixed this can go in- as discussed, can either add tests to the set methods on those classes, or (since they're not marked as Movables, and the axes are still available as children devices) remove the set method altogether.
seriously? |
Seriously- the target is a moving target that only goes up. All new code has to be at least as tested as everything already in. |
that's very perfectionist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must: tests need asserts.
rebasing manually atm |
superceded by #1030 |
Fixes #709
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}