Skip to content

Conversation

@alexvalentine94
Copy link
Collaborator

@alexvalentine94 alexvalentine94 commented Sep 27, 2025

Description

OpenMC YAML file prepared to used ITER 1D OpenMC in JADE/

Limited tally set currently based on OpenMC capabilities. First b'mark for demonstration of use of compiled source terms end to end.

Type of change

Please select what type of change this is.

  • Bug fix (non-breaking change which fixes an issue)
  • New benchmark
    • Non-breaking change which entirely uses existing classes, structure etc
    • Breaking change which has implemented new/modified classes etc
  • New feature
    • Non-breaking change which adds functionality
    • Breaking change fix or feature that would cause existing functionality to not work as expected

Other changes

  • This change requires a documentation update
  • (If Benchmark) This requires additional data that can be obtained from:
    • Benchmark data 1
    • Benchmark data 2

Testing

Addition of tests of raw data processing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • General testing
    • New and existing unit tests pass locally with my changes
    • Coverage is >80%

Summary by CodeRabbit

  • New Features
    • Added ITER_1D benchmark support for OpenMC with configured neutron/photon heating and flux outputs.
    • Introduced reusable radius-based cell mappings to streamline flux data setup.
  • Tests
    • Added a test for OpenMC ITER_1D raw processing (runs only when OpenMC is available).
  • Chores
    • Included benchmark metadata for ITER_1D (name, version, code, library) to improve run traceability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 27, 2025

Walkthrough

Adds a new OpenMC 1D benchmark YAML with reusable radius-based cell mappings and flux replacements, introduces corresponding test metadata for a dummy OpenMC run, and extends the post-processing test suite with an OpenMC-specific raw processing test guarded by availability.

Changes

Cohort / File(s) Summary of Changes
OpenMC ITER_1D benchmark config
src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/ITER_1D.yaml
New YAML defining a radii anchor mapping cell IDs to radii; applies replace directives to four Fluxes subsections (rows 16, 26, 204, 214) setting Cells from the anchor with no_action concat.
Test fixture: OpenMC metadata
tests/dummy_structure/simulations/.../_openmc_-_FENDL 3.2b_/ITER_1D/ITER_1D/metadata.json
New metadata descriptor for the OpenMC ITER_1D benchmark run (name, version, jade_run_version, library, code).
Test case: RawProcessor OpenMC
tests/post/test_raw_processor.py
Adds test_ITER1D_raw_openmc: conditionally runs RawProcessor on the new OpenMC ITER_1D config and dummy structure; skipped if OpenMC unavailable.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor PyTest as PyTest
  participant Test as test_ITER1D_raw_openmc
  participant RawProc as RawProcessor
  participant FS as File System

  PyTest->>Test: Run (if OMC_AVAIL)
  Test->>FS: Load ITER_1D.yaml and metadata.json
  Test->>RawProc: process_raw(temp_dir, config_path)
  RawProc->>FS: Read YAML (OpenMC/ITER_1D)
  RawProc->>RawProc: Resolve radii anchor
  RawProc->>RawProc: Apply replace directives to Fluxes (rows 16, 26, 204, 214)
  RawProc->>FS: Write processed outputs
  RawProc-->>Test: Result/Status
  Test-->>PyTest: Assert success
  note over RawProc: Changed interaction: uses shared radii anchor for multiple flux sections
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I mapped the rings by tidy YAML light,
Four fluxes blink—replace, replace—just right.
A metadata crumb, a test to run,
OpenMC hums, the parsing’s done.
I twitch my ears, approve the flow—
Hop, hop, ship it; onward we go! 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Addition of ITER 1D OpenMC” clearly and concisely describes the primary change of adding a new OpenMC benchmark for the ITER 1D case, matching the pull request’s focus on integrating an ITER 1D OpenMC YAML configuration.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch iter1d_openmc_addition

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e582c66 and f723a55.

⛔ Files ignored due to path filters (1)
  • tests/dummy_structure/simulations/_openmc_-_FENDL 3.2b_/ITER_1D/ITER_1D/tallies.out is excluded by !**/*.out
📒 Files selected for processing (3)
  • src/jade/resources/default_cfg/benchmarks_pp/raw/openmc/ITER_1D.yaml (1 hunks)
  • tests/dummy_structure/simulations/_openmc_-_FENDL 3.2b_/ITER_1D/ITER_1D/metadata.json (1 hunks)
  • tests/post/test_raw_processor.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/post/test_raw_processor.py (2)
src/jade/config/raw_config.py (2)
  • ConfigRawProcessor (11-34)
  • from_yaml (23-34)
src/jade/post/raw_processor.py (2)
  • RawProcessor (15-110)
  • process_raw_data (61-95)
⏰ 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). (6)
  • GitHub Check: test (ubuntu-latest, 3.12, false)
  • GitHub Check: test (windows-latest, 3.10, false)
  • GitHub Check: test (ubuntu-latest, 3.11, false)
  • GitHub Check: test (ubuntu-latest, 3.10, false)
  • GitHub Check: test (windows-latest, 3.12, false)
  • GitHub Check: test (windows-latest, 3.11, false)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

@codecov
Copy link

codecov bot commented Sep 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

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

@alexvalentine94
Copy link
Collaborator Author

alexvalentine94 commented Sep 29, 2025

Not sure why the Windows tests are not passing now, seems to be a developing issue as Martas PR having same problem.

@dodu94 dodu94 merged commit 25f2e82 into developing Sep 30, 2025
14 checks passed
@dodu94 dodu94 deleted the iter1d_openmc_addition branch September 30, 2025 13:57
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.

3 participants