Uh oh!
There was an error while loading. Please reload this page.
Refactor of flow tools - Verification of XZCorrections objects - #385
Conversation
| shift = 0 | ||
| measured_layers = reversed(self.partial_order_layers[shift:]) | ||
| layer_idx = len(self.partial_order_layers) - 1 |
There was a problem hiding this comment.
Should this be
layer_idx=len(self.partial_order_layers) -shift?
There was a problem hiding this comment.
mmm, I don't think so... shift removes the first element of self.partial_order_layers if it contains output nodes. We initialize layer_idx to the last layer index (that is, the length of the list minus 1, whether we removed the first element or not) to keep track of the layer index when iterating in reverse order. I added a comment in 095a2de.
mgarnier59
left a comment
There was a problem hiding this comment.
Nothing to add! Thanks for the work.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #385 +/- ##
==========================================
- Coverage 85.99% 85.90% -0.10%
==========================================
Files 45 45 Lines 6471 6540 +69 ==========================================
+ Hits 5565 5618 +53 - Misses 906 922 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
thierry-martinez
left a comment
There was a problem hiding this comment.
Nice work! Thanks.
Uh oh!
There was an error while loading. Please reload this page.
This PR adds a new method
:func: XZCorrections.check_well_formedto verify the correctness of XZ-corrections objects.A correct$O^c$ .
XZCorrectionsinstance verifies the following properties:- Keys of the correction dictionaries are measured nodes, i.e., a subset of
- Corrections respect the partial order.
- The first layer of the partial order contains all the output nodes if there are any.
- The partial order contains all the nodes (without duplicates) and it does not have empty layers.
This PR builds on the exception classes introduced in #378. We detail next the full exception landscape.
Arrows indicate inheritance (from parent to child).
"Reasons" (
XZCorrectionsOrderErrorReason, etc.) areEnumclasses.New error subclasses:
XZCorrectionsOrderErrornodecorrection_setpast_and_present_nodesXZCorrectionsGenericError