Skip to content

docs: clarify max_num_elements behavior - #1682

Open
sapunyangkut wants to merge 2 commits into
scikit-hep:mainfrom
sapunyangkut:codex/issue-1429-max-num-elements-docs
Open

docs: clarify max_num_elements behavior#1682
sapunyangkut wants to merge 2 commits into
scikit-hep:mainfrom
sapunyangkut:codex/issue-1429-max-num-elements-docs

Conversation

@sapunyangkut

Copy link
Copy Markdown
Contributor

Summary

  • clarify that max_num_elements limits byte ranges in one XRootD vector read
  • point readers to entry_stop when they want to limit the number of TTree entries read

Closes #1429.

Validation

  • python -m compileall -q src/uproot/reading.py
  • imported uproot.open and asserted that the rendered docstring contains the new clarification and cross-reference
  • built a focused Sphinx autodoc page for uproot.open; the patched docstring produced the same 14 pre-existing warnings as the unmodified baseline and no new warning

The full repository Sphinx build was also attempted. On Windows it stops in the existing docs-sphinx/prepare_docstrings.py path handling because it searches for uproot/ in a backslash-based __file__ path; this is unrelated to the documentation change.

AI assistance

OpenAI Codex was used to investigate the issue, draft the wording, and run local validation. The final diff and validation evidence were reviewed by the contributor before submission.

Comment thread src/uproot/reading.py Outdated
@ariostas

Copy link
Copy Markdown
Member

Thank you @sapunyangkut! I suggested a small tweak. Also, please make the similar modifications to uproot.interate and uproot.concatenate.

@TaiSakuma TaiSakuma added the type/docs PR title type: docs (set automatically) label Aug 14, 2026
@ariostas

Copy link
Copy Markdown
Member

Sorry @sapunyangkut, I should have merged this earlier. #1702 touched the same parts of the code, so now there are some conflicts. Let me know if you can resolve the conflicts so we can merge this.

sapunyangkut and others added 2 commits August 23, 2026 19:22
Apply review feedback consistently to open, iterate, concatenate, dask, TTree, and RNTuple documentation.

Developed and checked with OpenAI Codex assistance.
@sapunyangkut
sapunyangkut force-pushed the codex/issue-1429-max-num-elements-docs branch from 3b8153f to ed7849c Compare August 23, 2026 11:32
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.88%. Comparing base (eb4e261) to head (ed7849c).

Additional details and impacted files
Files with missing lines Coverage Δ
src/uproot/_dask.py 78.78% <ø> (ø)
src/uproot/behaviors/RNTuple.py 74.77% <ø> (ø)
src/uproot/behaviors/TBranch.py 84.71% <ø> (ø)
src/uproot/reading.py 80.90% <ø> (ø)

@sapunyangkut
sapunyangkut marked this pull request as ready for review August 23, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs PR title type: docs (set automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage of options like max_num_elements with uproot.open()

3 participants