Repository navigation
Conversation
This was referenced Nov 6, 2026
ariostas
marked this pull request as ready for review
November 6, 2026 14:48
ariostas
force-pushed
the
test/enforce-coverage
branch
from
November 6, 2026 15:03
3267b3b to
a58f12a
Compare
These were found by the tests of scikit-hep#1814, which are the regression tests here. The fixes are to containers (std::map, C arrays, AsDynamic and AsArray equality and hashing), strided and object arrays, the Awkward and Pandas libraries, string baskets, typename parsing, Float16/Double32 titles, TLeafG, TRef, TBasket.array, and model pickling. The reset_classes fixture now puts the original model classes back after the test, so that tests running after it in the same process (with pytest-xdist) compare against the classes they looked up. Assisted-by: Claude Code:claude-opus-5-5
These were found by the tests of scikit-hep#1814, which are the regression tests here. The fixes are to HTTP and XRootD sources (closing responses, empty requests, readline at the end of a stream), the deflate decompressor, streamer dependencies, TBranch steps inside already-read baskets, paths into RNTuples, files without streamers, cuts that aren't strings, and grouped TBranches in uproot.dask. Assisted-by: Claude Code:claude-opus-5-5
These were found by the tests of scikit-hep#1814, which are the regression tests here. The fixes are to keys that move or grow past 2 GB, streamers added after others, TTree type specifications and categorical strings, TArray classes from dtypes, histogram conversion, directory listings of names without cycles, copying directories, and extending TTrees with branches that Uproot can't interpret, which includes custom interpretations without a dtype: the methods of the Interpretation base class raise NotImplementedError, naming the subclass, instead of a bare AssertionError. Assisted-by: Claude Code:claude-opus-5-5
Like ROOT's TH1::GetBinError, the variance of a bin without fSumw2 is the absolute value of its content, rather than 0 when the content is negative. TProfile gets _values_variances, which the histogram conversions use. Found by the tests of scikit-hep#1814. Assisted-by: Claude Code:claude-opus-5-5
These were found by the tests of scikit-hep#1814, which are the regression tests here. The fixes are to columns of narrower representations (zigzag, delta and truncated or quantized floats), GPU reads of uncompressed and multi-page columns, split columns of unsupported widths, unknown field roles, field paths, linked attribute sets, anchors past 2 GB, and writing empty and masked arrays. Assisted-by: Claude Code:claude-opus-5-5
Changes to existing tests from scikit-hep#1814 that don't depend on its fixes: they check values instead of only running, restore checks that had been dropped, close the files they open, and run concurrently (each XRootD server has its own admin path and waits until it accepts connections, and reset_classes puts the original model classes back). Assisted-by: Claude Code:claude-opus-5-5
ariostas
force-pushed
the
test/enforce-coverage
branch
from
November 6, 2026 15:10
a58f12a to
12c2405
Compare
update_streamers rejected an object that isn't a streamer in the middle of its loop, after the streamers before it had been recorded but before space was made for them. A retry then skipped those streamers as already known, and the file's list of streamers couldn't be read back. Assisted-by: Claude Code:claude-opus-5-5
numpy.abs keeps the dtype, and the absolute value of the lowest integer of a dtype doesn't fit in it, so a TH1C bin of -128 had a variance of -128 (and TH1S, TH1I, TH2 and TH3 likewise). Assisted-by: Claude Code:claude-opus-5-5
ariostas
force-pushed
the
test/enforce-coverage
branch
from
November 6, 2026 15:21
12c2405 to
3da3c16
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
|
WritableDirectory.values() returned every cycle of each name, while keys(), items() and classnames() without cycles, and the values() of a ReadOnlyDirectory, return each name once, as its highest cycle. Assisted-by: Claude Code:claude-opus-5-5
mktree (and the cascade under it) silently left out a branch whose name was
already taken, including fields of records whose flattened names collided
with another branch: {"r_x": ..., "r": {"x": ..., "y": ...}} made a
TTree with only r_x and r_y, which could never be extended. Now a name
defined twice raises a ValueError. A scalar integer branch may still name
the counter of a jagged branch defined before it.
Assisted-by: Claude Code:claude-opus-5-5
Version 3 of TStreamerElement writes fXmin, fXmax and fFactor after its type name (later versions take the range from the title instead), and reading one stopped before them, so a file with version 3 elements failed to deserialize. The format for them was defined but unused. Assisted-by: Claude Code:claude-opus-5-5
Children after the first were indented two spaces less than the first. Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
The ROOT fixture also declared writers that only the tests of scikit-hep#1832 use, and if any of them didn't compile with some ROOT version, the tests here would fail too. The fixture also restores gErrorIgnoreLevel if a declaration fails. Assisted-by: Claude Code:claude-opus-5-5
Six tests (of Future.result timeouts, ThreadPoolExecutor.shutdown, the order of LRUCache, and Library equality) were deleted here in favor of tests in scikit-hep#1829, scikit-hep#1830 and scikit-hep#1832, which are based on this PR; until those are merged nothing else would cover them. They are now deleted together with the tests that replace them. A comment no longer points to a file of scikit-hep#1828. Assisted-by: Claude Code:claude-opus-5-5
New tests from scikit-hep#1814, apart from the regression tests of its fixes. Assisted-by: Claude Code:claude-opus-5-5
MET_pt is in one TBasket, so with steps of 15 entries the later steps of a file had nothing to request, and the XRootD source then sent an empty vector read, which failed now and then. scikit-hep#1825 stops sending it; until then, these tests iterate in one step per file. Assisted-by: Claude Code:claude-opus-5-5
The check that a sequence isn't equal to a string passed for anything but True. The test of Node.__str__ expected its wrong indentation, which scikit-hep#1824 fixes; it is now there, with the right one. The test of Library equality in test_0016 is deleted here, as test_names_and_equality covers it. Assisted-by: Claude Code:claude-opus-5-5
New tests from scikit-hep#1814, apart from the regression tests of its fixes. Assisted-by: Claude Code:claude-opus-5-5
New tests from scikit-hep#1814, apart from the regression tests of its fixes. Assisted-by: Claude Code:claude-opus-5-5
The test of closing an fsspec source with failing workarounds now checks that both were tried, and the test of splitting XRootD ranges checks the sizes of the vector-read elements. The local HTTP server polls for shutdown every 0.01 s instead of 0.5 s, which every test waited for. The two tests of test_1654 that test_1830_cov_io_futures.py replaces are deleted here. Assisted-by: Claude Code:claude-opus-5-5
The edges of the variable-width axis spanned exactly fXmin to fXmax, so the test couldn't tell the mean of the widths from (fXmax - fXmin) / fNbins. The files that Rewritable opens are now closed after each test. The test of a version 3 TStreamerElement leaves for scikit-hep#1824, which reads its range. Assisted-by: Claude Code:claude-opus-5-5
New tests from scikit-hep#1814, apart from the regression tests of its fixes. Assisted-by: Claude Code:claude-opus-5-5
New tests from scikit-hep#1814, apart from the regression tests of its fixes. Assisted-by: Claude Code:claude-opus-5-5
The ROOT fixture also declared classes and writers that only the tests of scikit-hep#1828 use; if any of them didn't compile with some ROOT version, the tests here would fail too. gErrorIgnoreLevel is now restored if something fails while it's lowered. The four LRUCache tests of test_1661 that test_1832_cov_api_cache.py replaces are deleted here. Assisted-by: Claude Code:claude-opus-5-5
…files Four tests skipped without ROOT before checking anything with uproot; now only their ROOT checks need it. The test of updating a file object closes both files. The test that the first of two branches with the same name was kept leaves for scikit-hep#1827, which rejects such names instead. Assisted-by: Claude Code:claude-opus-5-5
With the tests of the previous PRs, every reachable line and branch is covered. Codecov now requires 100% of the project and of each patch, with branch coverage. Code that can't be reached is marked with "# pragma: no cover (reason)" or "# pragma: no branch (reason)", ends impossible elif chains with "raise AssertionError" (excluded from coverage), or is removed when it was dead, including the dead code that dev/make-models.py generated after unconditional raises. Assisted-by: Claude Code:claude-opus-5-5
ariostas
force-pushed
the
test/enforce-coverage
branch
from
November 6, 2026 16:25
3da3c16 to
4c57e39
Compare
This branch has not been deployed
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.
🤖 AI text below 🤖
The last PR of the split of #1814, to merge after all the others. Until then, it targets main and contains their commits. Its own change is the last commit, "test: enforce 100% line and branch coverage on Codecov":
codecov.ymlrequires 100% of the project and of each patch, andpyproject.tomlturns on branch coverage. Codecov counts the CPU job plus the CUDA 13 GPU job (after_n_builds: 2), since some RNTuple code only runs on the GPU.# pragma: no cover (reason)or# pragma: no branch (reason). Impossibleelifchains end withraise AssertionError(...), which coverage excludes. That exclusion also covers about 30raise AssertionErrorlines that were already insrc/; the review of this PR checked the ones that could matter (the abstract placeholders ofAsContainer,Container,InterpretationandLibrary, the_length_byteschecks, and TBranch basket ranges) and found none reachable.dev/make-models.pygenerated after an unconditional raise. The generator is changed too, so it doesn't come back.AGENTS.mddescribes the coverage rule, and the README gets a coverage badge.With all the PRs below, the full suite has 100% line and branch coverage in a container that mirrors the coverage job (apart from the GPU-only code, which the CUDA job covers).
test/existing-testsby mistake)The fix PRs and #1823 are independent of each other, and the five test PRs only need #1823, which is merged, so they now target main.