Conversation
85ddc25 to
0246ec1
Compare
96dd6af to
d260aad
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #408 +/- ##
==========================================
+ Coverage 72.76% 73.14% +0.37%
==========================================
Files 35 35
Lines 6136 6248 +112
==========================================
+ Hits 4465 4570 +105
- Misses 1671 1678 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Rebased on top of |
takluyver
left a comment
There was a problem hiding this comment.
Is the goal to replace CalibrationData.module_details and .detector_name with a DetectorData object? If so, we might need to do something about the .from_correction(..., use_calcat=False) case, where we don't have most of the info this assumes, just the bare minimum of detector name, aggregator names and PDU names.
I suppose that would be neat, but quite the refactor around |
|
In the context of using Another option would be to keep |
2dceec9 to
835b220
Compare
|
Apart from addressing the comments, I tried to base the I tried to do this in a minimalistic approach by preserving all business logic and only emulating Technically there are some differences in obscure fields like |
b7cd956 to
427cceb
Compare
|
I cleaned up the history now, could you please have a look at the remaining discussions on whether they're actionable? |
| module_number=pdu.module_number, | ||
| module_number_at_ccv_begin_at=pdu.module_number, |
There was a problem hiding this comment.
Let's not guess here. Either we preserve two separate values from what CalCat returns so we can return them separately, or else just return a single module_number field. It just creates confusion otherwise.
There was a problem hiding this comment.
Oops, this was probably a preliminary measure when trying out the compatibility layer.
Does it ever make sense to look at module numbers different from when the CCV was taken?
There was a problem hiding this comment.
As discussed, I removed module_number_at_ccv_begin_at for now.
93146aa to
caeac0c
Compare
|
The cassette files for the tests seem to have ~doubled in size (or more):
I think EXtra/tests/test_calibration.py Lines 22 to 25 in c4e8708 |
caeac0c to
7868e3e
Compare
|
Hmm I see, I tried to clean up by deleting and generating them again from scratch. Does this look better? |
|
Thanks, indeed it now looks like the cassette files stay roughly the same size. LGTM |
7868e3e to
830bfc7
Compare
|
I've rebased onto master to resolve some conflicts. I think this is ready to be merged. |
| def from_id(cls, detector_id, pdu_snapshot_at=None, client=None): | ||
| """Look up a detector and its modules by CalCat numerical ID. |
There was a problem hiding this comment.
Nitpicking, but having both from_id and from_identifier feels like setting up ongoing low-level confusion, and the one people probably want more often is the longer one.
How about we call this one from_calcat_id()?
There was a problem hiding this comment.
Yeah, I can see that confusion.
How about from_numerical_id() as already written in the docstring?
There was a problem hiding this comment.
That's OK by me. I think 'numeric' also works if you want to shorten it slightly.
There was a problem hiding this comment.
Good idea. I'll take your earlier LGTM then once the pipeline finishes.
830bfc7 to
8767ba3
Compare

As the CAL team has been refactoring the injection code away from the legacy
calibrationDBRemoteAPI, we noticed that handling PDU details is somewhat cumbersome and requires replicating non-obvious RESTful requests in many places. As we do not want to add further auxiliary functions toCalCatAPIClient, this PR adds an API accompanyingCalibrationDatabyDetectorData.