Skip to content

Use inp::StandaloneInput for celer-sim#2428

Open
amandalund wants to merge 8 commits into
celeritas-project:developfrom
amandalund:celer-sim-inp
Open

Use inp::StandaloneInput for celer-sim#2428
amandalund wants to merge 8 commits into
celeritas-project:developfrom
amandalund:celer-sim-inp

Conversation

@amandalund

Copy link
Copy Markdown
Contributor

Following on to #2425, this updates the celer-sim app to use inp::StandaloneInput. The old input format is still supported for now.

@amandalund amandalund requested a review from sethrj June 22, 2026 23:47
@amandalund amandalund added the app Application front ends label Jun 22, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.49515% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.29%. Comparing base (d10bc05) to head (8fd2ad5).

Files with missing lines Patch % Lines
src/celeritas/setup/StandaloneInput.cc 79.41% 4 Missing and 3 partials ⚠️
src/celeritas/setup/Events.cc 76.19% 5 Missing ⚠️
src/celeritas/inp/StandaloneInputIO.json.cc 33.33% 3 Missing and 1 partial ⚠️
src/celeritas/inp/EventsIO.json.cc 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2428      +/-   ##
===========================================
- Coverage    87.32%   87.29%   -0.04%     
===========================================
  Files         1401     1402       +1     
  Lines        44444    44520      +76     
  Branches     13495    13541      +46     
===========================================
+ Hits         38809    38862      +53     
- Misses        4410     4416       +6     
- Partials      1225     1242      +17     
Files with missing lines Coverage Δ
src/celeritas/inp/ControlIO.json.cc 88.46% <100.00%> (ø)
src/celeritas/inp/Diagnostics.hh 75.00% <100.00%> (-11.67%) ⬇️
src/celeritas/inp/Events.hh 93.75% <100.00%> (+0.89%) ⬆️
src/celeritas/inp/ImportIO.json.cc 97.05% <100.00%> (+0.90%) ⬆️
src/celeritas/inp/ProblemIO.json.cc 100.00% <ø> (ø)
src/corecel/inp/GridIO.json.cc 100.00% <100.00%> (ø)
src/celeritas/inp/EventsIO.json.cc 85.10% <92.85%> (+1.13%) ⬆️
src/celeritas/inp/StandaloneInputIO.json.cc 89.47% <33.33%> (-10.53%) ⬇️
src/celeritas/setup/Events.cc 68.18% <76.19%> (+3.47%) ⬆️
src/celeritas/setup/StandaloneInput.cc 80.41% <79.41%> (-0.93%) ⬇️

... and 16 files with indirect coverage changes

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

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

Test summary

 5 701 files   9 289 suites   19m 42s ⏱️
 2 326 tests  2 283 ✅  43 💤 0 ❌
32 901 runs  32 730 ✅ 171 💤 0 ❌

Results for commit 8fd2ad5.

♻️ This comment has been updated with latest results.

Copilot AI 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.

Pull request overview

Updates the celer-sim standalone application to primarily consume inp::StandaloneInput JSON (while still accepting the deprecated RunnerInput format), aligning the app with the newer standalone input infrastructure introduced in #2425.

Changes:

  • Switch celer-sim runtime setup to use inp::StandaloneInput end-to-end, with deprecated RunnerInput parsing and conversion retained.
  • Restructure event input to an Events object with generator + merge, and update setup code accordingly.
  • Add/extend JSON I/O support for interpolation/data-selection options used by Geant import, and update tests/docs/scripts to match the new JSON shape.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/celeritas/inp/JsonIO.test.cc Updates JSON round-trip expectations for new Events shape, diagnostics defaults, and import data-selection serialization.
src/corecel/inp/GridIO.json.hh Declares JSON I/O for inp::Interpolation.
src/corecel/inp/GridIO.json.cc Implements JSON I/O for inp::Interpolation.
src/corecel/CMakeLists.txt Adds new GridIO.json.cc to the corecel build.
src/celeritas/setup/StandaloneInput.cc Computes event counts/streams from StandaloneInput and updates physics import selection logic.
src/celeritas/setup/Events.cc Implements merge behavior when reading events and adapts to the new Events structure.
src/celeritas/inp/StandaloneInputIO.json.cc Applies device-dependent defaults before loading problem from JSON.
src/celeritas/inp/ProblemIO.json.cc Removes outdated TODO comment (JSON support now exists).
src/celeritas/inp/ImportIO.json.cc Serializes/deserializes Geant import data_selection (incl. interpolation) for standalone input.
src/celeritas/inp/EventsIO.json.hh Adds JSON I/O declarations for Generator variant.
src/celeritas/inp/EventsIO.json.cc Implements JSON I/O for Generator and new Events {generator, merge} object.
src/celeritas/inp/Events.hh Refactors Events into a struct and introduces Generator alias.
src/celeritas/inp/Diagnostics.hh Changes default diagnostic counters for steps/events.
src/celeritas/inp/ControlIO.json.cc Makes capacities optional in JSON to support defaults seeded elsewhere.
doc/usage/input/problem.rst Updates documentation wording for the new standalone event generator structure.
app/celer-sim/simple-driver.py Updates test harness JSON generator to emit StandaloneInput-shaped input.
app/celer-sim/RunnerInput.cc Adapts conversion code to populate new inp::Events structure and map diagnostics fields.
app/celer-sim/Runner.hh Changes runner input type alias to inp::StandaloneInput.
app/celer-sim/Runner.cc Constructs runner directly from StandaloneInput and maps new diagnostics/control fields.
app/celer-sim/celer-sim.cc Parses StandaloneInput by default with fallback to deprecated RunnerInput conversion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/celeritas/setup/StandaloneInput.cc
Comment thread src/celeritas/setup/StandaloneInput.cc
Comment thread src/celeritas/setup/Events.cc Outdated
Comment thread src/celeritas/inp/Events.hh
Comment thread doc/usage/input/problem.rst Outdated
Comment thread app/celer-sim/simple-driver.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application front ends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants