Repository navigation
fix: let an explicit null in Props.add_to override - #62
Merged
Merged
Conversation
Since gipert#48, add_to read props_b with .get(), so an explicit null was treated like a missing key and the old value was kept. Overlay files that set a key to null to switch something off (e.g. `muon_config: null` in the LEGEND dataprod configs) silently stopped working. Only a key absent from props_b now keeps the value from props_a, as before gipert#48. Assisted-by: Generative AI
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 91.72% 92.46% +0.73%
==========================================
Files 6 6
Lines 568 597 +29
==========================================
+ Hits 521 552 +31
+ Misses 47 45 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #48,
Props.add_toreadsprops_bwith.get(), so an explicitnulllooks the same as a missing key and the old value is kept. Before #48 (dbetto ≤ 1.3.4), anullin the overlay replaced the value.LEGEND's dataprod configs rely on this: category overlays set
tier_evt: inputs: muon_config: nullto switch off the muon evt step for cal/fft/pzc/bkg/hvs. With dbetto ≥ 1.3.5 those runs silently get the muon evt step again.This PR restores the old rule: only a key absent from
props_bkeeps theprops_avalue. It addstest_props_add_to_null_overrides, which fails onmain.Validation.
pytest(31 passed),pre-commit run -aandnox -s pylint(10.00/10) all pass. I also resolvedTextDB.on()for all 3,643 (validity timestamp × category) lookups in the LEGENDdataprod/config,dataprod/overrides/*,datasets/statusesandhardware/configuration/channelmapsDBs. With this branchdataprod/configis identical to dbetto 1.2.4, and against 1.4.0 the only change is themuon_configkey above. Channel maps and statuses are unchanged.Related: legend-exp/legend-dataflow#173 (callers discarding the new
add_toreturn value).🤖 Generated with Claude Code