Skip to content

Conversation

anigamova
Copy link
Collaborator

@anigamova anigamova commented Aug 11, 2025

Summary by CodeRabbit

  • New Features

    • Adds a grid-based RooMultiPdf scan and produces a 1D scan plot for review.
    • Publishes the generated scan plot as a downloadable artifact.
  • Chores

    • Updates the CI workflow to create an artifacts area, run the additional grid scan, generate the plot, and upload the plot artifact.

Copy link
Contributor

coderabbitai bot commented Aug 11, 2025

Walkthrough

Adds CI steps to run a grid-based combine scan for RooMultiPdf, generate a 1D scan PDF from the grid output, and upload the PDF as a GitHub Actions artifact.

Changes

Cohort / File(s) Summary of Changes
CI: RooMultiPdf grid scan and artifact
.github/workflows/cvmfs-ci.yml
Added creation of an artifacts dir; added a second combine invocation using -n RooMultiPdfGrid --algo grid --setParameterRanges r=-1,2 --points 80 -P r; added plot1DScan.py to produce scan_RooMultiPdf.pdf; copy the PDF to the artifacts dir and added an actions/upload-artifact@v4 step named "Scan for RooMultiPdf".

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions Runner
    participant CS as Combine (singles)
    participant CG as Combine (RooMultiPdf grid)
    participant P as plot1DScan.py
    participant U as Artifact Uploader

    Dev->>GH: Push / PR triggers cvmfs-ci workflow
    GH->>CS: Run existing combine (singles)
    GH->>CG: Run combine -n RooMultiPdfGrid --algo grid --setParameterRanges r=-1,2 --points 80 -P r
    CG-->>GH: Produce RooMultiPdfGrid.MultiDimFit...root
    GH->>P: Run plot1DScan.py on grid output
    P-->>GH: scan_RooMultiPdf.pdf
    GH->>U: Upload artifact "Scan for RooMultiPdf"
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Poem

I hopped through YAML fields at night,
Tweaked the grid to scan just right.
A tiny PDF sprang into sight,
RooMultiPdf bathed in CI light.
I bundled it up—artifact delight. 🐇📄

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

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd89aac and ffb4319.

📒 Files selected for processing (1)
  • .github/workflows/cvmfs-ci.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/cvmfs-ci.yml

[error] 171-171: trailing spaces

(trailing-spaces)

Copy link
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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd89aac and ffb4319.

📒 Files selected for processing (1)
  • .github/workflows/cvmfs-ci.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/cvmfs-ci.yml

[error] 171-171: trailing spaces

(trailing-spaces)

anigamova and others added 3 commits August 11, 2025 18:36
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
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

♻️ Duplicate comments (1)
.github/workflows/cvmfs-ci.yml (1)

171-174: Gate artifact upload to CMSSW_14 and fix trailing space; add fail-fast on missing file

To avoid running the upload on non-CMSSW_14 matrices and to fix YAMLlint’s trailing space (Line 173). It’s also safer to error out if the file is unexpectedly missing.

Apply this diff:

-      - name: Upload scan_RooMultiPdf.pdf
+      - name: Upload scan_RooMultiPdf.pdf
+        if: ${{ startsWith(matrix.CMSSW_VERSION, 'CMSSW_14') }}
         uses: actions/upload-artifact@v4
         with:
-          name: Scan for RooMultiPdf 
-          path: ${{ github.workspace }}/artifacts/scan_RooMultiPdf.pdf
+          name: Scan for RooMultiPdf
+          path: ${{ github.workspace }}/artifacts/scan_RooMultiPdf.pdf
+          if-no-files-found: error
🧹 Nitpick comments (1)
.github/workflows/cvmfs-ci.yml (1)

53-53: Avoid creating artifacts dir in a container that doesn’t mount the workspace

This mkdir targets the host path, but the Build Combine container doesn’t mount ${{ github.workspace }}; it creates a directory in the container FS that isn’t visible to the host and is discarded after the step. Create the directory in the step where you actually copy the PDF (RooMultiPdf), after mounting the workspace.

Apply this diff to remove the ineffective mkdir:

-            mkdir -p ${{ github.workspace }}/artifacts

You already create the directory in the RooMultiPdf step per the proposed fix.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 30a601a and f2bd4ac.

📒 Files selected for processing (1)
  • .github/workflows/cvmfs-ci.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/cvmfs-ci.yml

[error] 167-167: trailing spaces

(trailing-spaces)


[error] 169-169: trailing spaces

(trailing-spaces)


[error] 173-173: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Compile (py3.10, root6.32.2)
  • GitHub Check: Compile (py3.12, root6.34.4)
  • GitHub Check: Compile (py3.10, root6.26.4)
  • GitHub Check: Compile (py3.8, root6.22)
  • GitHub Check: Test with CMSSW_14_0_0_pre1 and ROOT v6.26/11
  • GitHub Check: Test with CMSSW_14_2_0_pre2_ROOT632 and ROOT v6.32/06
  • GitHub Check: Test with CMSSW_14_1_0_pre4 and ROOT v6.30
  • GitHub Check: Test with CMSSW_11_3_4 and ROOT v6.22/08

Comment on lines +166 to +169
combine -M MultiDimFit -m 125.38 -n RooMultiPdfGrid --freezeParameters MH --cminDefaultMinimizerStrategy 0 --X-rtd FAST_VERTICAL_MORPH --X-rtd MINIMIZER_freezeDisassociatedParams --X-rtd MINIMIZER_multiMin_maskChannels=2 --algo grid ws_RooMultiPdf.root --setParameterRanges r=-1,2 --points 80 -P r
plot1DScan.py higgsCombineRooMultiPdfGrid.MultiDimFit.mH125.38.root -o scan_RooMultiPdf
cp scan_RooMultiPdf.pdf ${{ github.workspace }}/artifacts/.
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Mount the workspace in the RooMultiPdf container; current cp to ${{ github.workspace }} will fail

The container for this step doesn’t mount the runner workspace, so copying to ${{ github.workspace }}/artifacts will fail. Also, add -P r to plot1DScan for explicit POI and remove trailing spaces flagged by YAMLlint.

Apply this diff within the run block to create the artifacts dir on the mounted path, make the plot deterministic wrt POI, and export the PDF:

-            combine -M MultiDimFit -m 125.38 -n RooMultiPdfGrid --freezeParameters MH --cminDefaultMinimizerStrategy 0 --X-rtd FAST_VERTICAL_MORPH --X-rtd MINIMIZER_freezeDisassociatedParams --X-rtd MINIMIZER_multiMin_maskChannels=2 --algo grid ws_RooMultiPdf.root --setParameterRanges r=-1,2 --points 80 -P r
-            plot1DScan.py higgsCombineRooMultiPdfGrid.MultiDimFit.mH125.38.root -o scan_RooMultiPdf 
-            cp scan_RooMultiPdf.pdf ${{ github.workspace }}/artifacts/.
-            
+            combine -M MultiDimFit -m 125.38 -n RooMultiPdfGrid --freezeParameters MH --cminDefaultMinimizerStrategy 0 --X-rtd FAST_VERTICAL_MORPH --X-rtd MINIMIZER_freezeDisassociatedParams --X-rtd MINIMIZER_multiMin_maskChannels=2 --algo grid ws_RooMultiPdf.root --setParameterRanges r=-1,2 --points 80 -P r
+            plot1DScan.py higgsCombineRooMultiPdfGrid.MultiDimFit.mH125.38.root -o scan_RooMultiPdf -P r
+            mkdir -p /work/artifacts
+            cp scan_RooMultiPdf.pdf /work/artifacts/

Additionally, update the container options for this step to mount the runner workspace (outside this hunk):

# In the RooMultiPdf step
options: ${{ env.docker_opt_ro }} -v ${{ github.workspace }}:/work

This resolves the file export and the YAMLlint trailing-space errors on Lines 167 and 169.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 167-167: trailing spaces

(trailing-spaces)


[error] 169-169: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/cvmfs-ci.yml around lines 166-169, the RooMultiPdf
container step currently tries to cp to ${{ github.workspace }} but the runner
workspace isn't mounted and YAMLlint flags trailing spaces; update the run block
to create and use an artifacts directory on the mounted path (e.g.,
/work/artifacts), add the explicit POI flag -P r to plot1DScan, and remove
trailing spaces on the listed lines; also update the container options for that
RooMultiPdf step (outside this hunk) to mount the workspace by adding options:
${{ env.docker_opt_ro }} -v ${{ github.workspace }}:/work so the cp to
/work/artifacts succeeds.

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