Use inp::StandaloneInput for celer-sim#2428
Conversation
…in setup instead of app
…in standalone input
Codecov Report❌ Patch coverage is Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
Test summary 5 701 files 9 289 suites 19m 42s ⏱️ Results for commit 8fd2ad5. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
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::StandaloneInputend-to-end, with deprecatedRunnerInputparsing and conversion retained. - Restructure event input to an
Eventsobject withgenerator+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.
Following on to #2425, this updates the celer-sim app to use
inp::StandaloneInput. The old input format is still supported for now.