-
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
Adjust to new DirectoryProvider structure #376
Conversation
Requires bluesky/ophyd-async#86 and a release of ophyd-async |
70d2071
to
0bc8e90
Compare
Noting that this will need to be moved: #353 |
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.
Build not passing
) | ||
directory_info: DirectoryInfo = provider() | ||
yield from bpp.inject_md_wrapper(plan, md={DATA_SESSION: directory_info.prefix}) | ||
provider.clear() |
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.
Won't this mean that detectors subsequently calling provider()
will try to write to None
?
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.
Yes, I think the issue is actually that update() should always fetch a new instance rather than only the first time.
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.
It was intended to be a caching thing, where update()
would generate a brand new scan number and save location, so you would end up with this:
If it fetches a new instance every time, wouldn't the detectors each write to a different scan number, which would be different in turn from the resource doc?
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.
Yes, you're right (and update() doesn't hold onto the previous one as I thought it did in the previous comment), I was confused by the change to no longer swallow the Exception in update() [as required merge into Bluesky had occured], which previously made sure the prior collection was None but no longer does! ⚡
429df84
to
5ce6ac2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #376 +/- ##
==========================================
+ Coverage 89.96% 90.16% +0.19%
==========================================
Files 43 41 -2
Lines 1814 1708 -106
==========================================
- Hits 1632 1540 -92
+ Misses 182 168 -14 ☔ View full report in Codecov by Sentry. |
IMPORTANT: Must also now unpin dependency on dodal |
f6e8692
to
3dd6fa9
Compare
950d315
to
9ce79fd
Compare
af8d1dd
to
80f61c6
Compare
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.
As it is this is fine, all the code seems to be replaced in DiamondLightSource/dodal#445. Except there are tests in this PR that have no correspondent in dodal
. Could you make a PR on dodal
that moves the appropriate tests over?
I've been working on it today: the FakeDetector structure wasn't correct for how a StandardDetector actually uses a DirectoryProvider |
Tests have been merged in dodal now
Allows us to unpin our dependency on dodal (through it, ophyd-async)