Skip to content

FORM Apply Same Tests to RNTuple and TTree#740

Open
aolivier23 wants to merge 5 commits into
Framework-R-D:mainfrom
aolivier23:form_rntuple_unify_storage_test
Open

FORM Apply Same Tests to RNTuple and TTree#740
aolivier23 wants to merge 5 commits into
Framework-R-D:mainfrom
aolivier23:form_rntuple_unify_storage_test

Conversation

@aolivier23

@aolivier23 aolivier23 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

FORM's testing infrastructure has accumulated some test cases that only run for either TTree or RNTuple. This PR updates RNTuple to match how TTree behaves in all but one of these tests. The last RNTuple-only test case will be dealt with in its own PR soon.

  • Code

    • Unified RNTuple field/view creation and type validation in a new createView() helper.
    • Updated RNTuple prime() to locate matching views and validate requested field types.
    • Added explicit errors when entries() requests a nonexistent RNTuple field.
  • Tests

    • Reused matching prime() and storage-layer entries() tests across TTree and RNTuple backends.
    • Removed obsolete backend-specific skips and redundant RField-only test cases.
    • Retained one RNTuple-specific test for a follow-up change.

…e and TTree backends. The RNTuple backend now also searches for a matching view when prime() is called.
…ple now verifies that the field it's reading from exists in its entries() function. Now, TTree and RNTuple backends are tested by the same test cases.
@aolivier23
aolivier23 requested review from gemmeren and wwuoneway July 21, 2026 14:53
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 32dc2abd-a95c-473d-9c3a-aa2e1e3c2985

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

ROOT RField view creation and type validation are centralized in a private helper. Missing-field checks are added to entries(), while storage tests run across more backends and obsolete RField-specific cases are removed.

Changes

ROOT RField storage

Layer / File(s) Summary
Centralize RNTuple view initialization
form/root_storage/root_rfield_read_container.hpp, form/root_storage/root_rfield_read_container.cpp
prime, read, and entries use shared lazy reader/view creation, streamer fallback, field validation, and dictionary-based type checking.
Broaden ROOT storage test coverage
test/form/form_storage_test.cpp
Selected persistence and ROOT branch tests no longer skip backends, and obsolete RField-specific test cases are removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: gemmeren, wwuoneway

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: aligning FORM tests between RNTuple and TTree backends.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aolivier23

Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions

Copy link
Copy Markdown
Contributor

Format Fixes Applied

✅ clang-format fixes pushed (commit 817c1e4)

⚠️ Note: Some issues may require manual review.

@gemmeren gemmeren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Andrew.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
form/root_storage/root_rfield_read_container.cpp 96.15% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main     #740      +/-   ##
==========================================
- Coverage   83.84%   83.80%   -0.04%     
==========================================
  Files         172      172              
  Lines        7198     7205       +7     
  Branches      845      848       +3     
==========================================
+ Hits         6035     6038       +3     
- Misses        882      884       +2     
- Partials      281      283       +2     
Flag Coverage Δ
scripts 80.13% <ø> (ø)
unittests 85.64% <96.15%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/root_storage/root_rfield_read_container.cpp 85.50% <96.15%> (-1.59%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 852ff88...817c1e4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants