Skip to content

[test] Move RooParametricHist test to CTest#1228

Draft
guitargeek wants to merge 1 commit intocms-analysis:mainfrom
guitargeek:test_parametrichist
Draft

[test] Move RooParametricHist test to CTest#1228
guitargeek wants to merge 1 commit intocms-analysis:mainfrom
guitargeek:test_parametrichist

Conversation

@guitargeek
Copy link
Copy Markdown
Collaborator

@guitargeek guitargeek commented Feb 19, 2026

Let's see if it works now.

Summary by CodeRabbit

  • Tests

    • Enabled the parametric histogram test in the test suite.
  • Chores

    • Updated CI workflow configuration (workflow step adjusted) and standardized test data shape references.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Walkthrough

Removed the RooParametricHist CI workflow step from GitHub Actions, enabled the RooParametricHist (parametric_hist) test in CMake, and standardized shape-file references and parameter declarations in the datacard to use relative paths.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/cvmfs-ci.yml
Deleted the RooParametricHist workflow step that ran text2workspace.py and combine -M MultiDimFit.
CMake test
test/CMakeLists.txt
Re-enabled the parametric_hist ADD_COMBINE_TEST entry (uncommented/activated test that copies shapes_RooParametricHist.root, runs text2workspace.py, then combine).
Datacard updates
data/ci/datacard_RooParametricHist.txt
Rewrote shape references to shapes_RooParametricHist.root:shapes2016 (removed data/ci/ prefix), and explicitly declared param lines for tf2016_MCtempl_deco0/1/2; uniformized shape-systematic entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I nudged the test from GitHub light,
To CMake burrows, snug and bright,
Shapes trimmed short, paths tidy and neat,
Parametric dreams now skip a beat,
Hooray — the rabbit hops, complete! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the RooParametricHist test from a GitHub workflow to CMake's CTest infrastructure, which matches the key modifications across three files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/CMakeLists.txt (1)

257-257: Nitpick: inconsistent indentation of text2workspace.py after T2W_COMMAND.

Every other ADD_COMBINE_TEST block in this file indents the command body by 4 spaces relative to the keyword (e.g., lines 151, 173, 186, 195). Here text2workspace.py sits at the same indent level as T2W_COMMAND.

♻️ Proposed fix
   T2W_COMMAND
-  text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel  --PO verbose --PO map=.*/*hcc*:r[1,-500,500] --PO map=.*/zcc:z[1,-5,5] ${REPO}/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
+    text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel --PO verbose --PO map=.*/*hcc*:r[1,-500,500] --PO map=.*/zcc:z[1,-5,5] ${REPO}/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/CMakeLists.txt` at line 257, Fix the indentation for the
text2workspace.py line in the ADD_COMBINE_TEST block so it matches other blocks:
make the text2workspace.py command line (the long command starting with
"text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel
...") indented by 4 spaces relative to the T2W_COMMAND keyword, consistent with
the indentation style used in other ADD_COMBINE_TEST blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@test/CMakeLists.txt`:
- Line 257: Fix the indentation for the text2workspace.py line in the
ADD_COMBINE_TEST block so it matches other blocks: make the text2workspace.py
command line (the long command starting with "text2workspace.py -P
HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel ...") indented by 4
spaces relative to the T2W_COMMAND keyword, consistent with the indentation
style used in other ADD_COMBINE_TEST blocks.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/CMakeLists.txt`:
- Around line 254-260: The T2W_COMMAND line inside the ADD_COMBINE_TEST block
for parametric_hist is mis-indented (2 spaces) compared to other blocks; open
the ADD_COMBINE_TEST for parametric_hist and adjust the indentation of the
text2workspace.py line so it is aligned with the other command-body lines (4
spaces under T2W_COMMAND) — ensure the text2workspace.py invocation and its
continuation variables (${REPO}/data/ci/datacard_RooParametricHist.txt,
ws_RooParametricHist.root) remain unchanged.

Comment on lines +254 to +260
ADD_COMBINE_TEST(parametric_hist
COPY_TO_BUILDDIR ${REPO}/data/ci/shapes_RooParametricHist.root
T2W_COMMAND
text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel --PO verbose --PO map=.*/*hcc*:r[1,-500,500] --PO map=.*/zcc:z[1,-5,5] ${REPO}/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
COMBINE_COMMANDS
"combine -M MultiDimFit ws_RooParametricHist.root --algo singles"
)
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the referenced data files exist
echo "=== Checking for data files ==="
fd -t f "shapes_RooParametricHist.root" 2>/dev/null || echo "shapes_RooParametricHist.root NOT FOUND"
fd -t f "datacard_RooParametricHist.txt" 2>/dev/null || echo "datacard_RooParametricHist.txt NOT FOUND"

# Also check if data/ci/ directory exists and list its contents
echo -e "\n=== Listing data/ci/ directory ==="
if [ -d "data/ci" ]; then
  ls -la data/ci/ | head -20
else
  echo "data/ci/ directory does not exist"
fi

Repository: cms-analysis/HiggsAnalysis-CombinedLimit

Length of output: 1702


🏁 Script executed:

#!/bin/bash
# Verify indentation consistency in test/CMakeLists.txt
# Extract surrounding test blocks to compare indentation patterns
echo "=== Indentation pattern check ==="
sed -n '240,280p' test/CMakeLists.txt | cat -A

Repository: cms-analysis/HiggsAnalysis-CombinedLimit

Length of output: 2323


Fix indentation inconsistency in T2W_COMMAND body.

The text2workspace.py command on line 257 is indented 2 spaces while all other ADD_COMBINE_TEST blocks in this file indent the command body 4 spaces under its keyword. Both referenced data files (data/ci/shapes_RooParametricHist.root and data/ci/datacard_RooParametricHist.txt) exist and are accessible.

Suggested indentation fix
 ADD_COMBINE_TEST(parametric_hist
   COPY_TO_BUILDDIR ${REPO}/data/ci/shapes_RooParametricHist.root
   T2W_COMMAND
-  text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel  --PO verbose --PO map=.*/*hcc*:r[1,-500,500] --PO map=.*/zcc:z[1,-5,5] ${REPO}/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
+    text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel  --PO verbose --PO map=.*/*hcc*:r[1,-500,500] --PO map=.*/zcc:z[1,-5,5] ${REPO}/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
   COMBINE_COMMANDS
     "combine -M MultiDimFit ws_RooParametricHist.root --algo singles"
 )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/CMakeLists.txt` around lines 254 - 260, The T2W_COMMAND line inside the
ADD_COMBINE_TEST block for parametric_hist is mis-indented (2 spaces) compared
to other blocks; open the ADD_COMBINE_TEST for parametric_hist and adjust the
indentation of the text2workspace.py line so it is aligned with the other
command-body lines (4 spaces under T2W_COMMAND) — ensure the text2workspace.py
invocation and its continuation variables
(${REPO}/data/ci/datacard_RooParametricHist.txt, ws_RooParametricHist.root)
remain unchanged.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.86%. Comparing base (41415b8) to head (e417959).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1228   +/-   ##
=======================================
  Coverage   20.86%   20.86%           
=======================================
  Files         195      195           
  Lines       26217    26217           
  Branches     3932     3932           
=======================================
  Hits         5469     5469           
  Misses      20748    20748           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guitargeek
Copy link
Copy Markdown
Collaborator Author

Marked as draft because the differences between ROOT versions need to be understood.

@guitargeek guitargeek marked this pull request as draft February 20, 2026 08:48
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.

1 participant