Skip to content

Commit a404c85

Browse files
committed
Phase 13.58.ADF: T11 subframe-column lazy-draw boundary test + committed calibITS slim fixture (279 KB)
T11 documents the real boundary: read_tree_lazy recovers subframe names (names-only, ROOT-free) but does not register lazy subframes (no index columns), so a subframe-column draw fails loud, never silent. Runs ROOT-free on the slim fixture (5/5 calibITS tests pass). Subframe-column lazy draw (index-column recovery) is deferred to 13.60/13.61.
1 parent 6d4f5ea commit a404c85

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

279 KB
Binary file not shown.

UTILS/dfextensions/AliasDataFrame/tests/test_phase1358_lazy_calibITS.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,32 @@ def test_calibITS_hist_exact_load():
111111
assert lazy._lazy_reader.loaded_branches == {Y2}
112112

113113

114+
@pytest.mark.invariance
115+
def test_calibITS_subframe_column_lazy_draw():
116+
"""T11 — subframe-column lazy draw boundary (documents the current limit; locks loud failure).
117+
118+
calibITS has two ADF subframes ('R', 'AlignDzITS5'). read_tree_lazy recovers their NAMES
119+
(names-only metadata reconstruction from the sibling __subframe__ trees — ROOT-free) but
120+
does NOT register them as lazy subframes: names-only recovery carries no index columns,
121+
and register_subframe_lazy needs them. So a subframe-column lazy draw is not yet supported
122+
and must FAIL LOUD (a clear error), never silently render an empty figure.
123+
124+
This is the real 13.58 boundary, not a ROOT artifact: read_tree_lazy reads metadata via
125+
uproot regardless of host ROOT, so the behaviour is identical everywhere. Making
126+
subframe-column lazy draw work (recovering index columns from the subframe schema) is
127+
lazy-subframe scope (13.60/13.61).
128+
"""
129+
lazy = AliasDataFrame.read_tree_lazy(CALIB_ITS, TREE)
130+
meta = getattr(lazy._lazy_reader, "adf_metadata", None) or {}
131+
# names ARE recovered (from the sibling __subframe__ trees) ...
132+
assert set(meta.get("subframes") or []) >= {"R", "AlignDzITS5"}
133+
# ... but NOT registered as lazy subframes (no index columns in names-only recovery)
134+
assert lazy.list_subframes() == []
135+
# a subframe-column draw therefore fails LOUD, not silently
136+
lazy.draw_lazy = True
137+
with pytest.raises(ValueError):
138+
lazy.draw(expr="AlignDzITS5.dz_ITS5T_rms_AITS5:firstTForbit", type="profile", bins=10)
139+
140+
114141
if __name__ == "__main__":
115142
sys.exit(pytest.main([__file__, "-v"]))

0 commit comments

Comments
 (0)