67 run label - #68
Merged
Merged
Conversation
…enhance validation
Closed
27 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the HERMES state model and surrounding code/docs to treat a human-readable run label (MeasurementInfo.run) as the primary identifier for a run, while making the numeric run_number optional.
Changes:
- Introduce required
MeasurementInfo.runand makerun_numberoptional (validated as>= 0when provided). - Update structured logging to emit
run(instead ofrun_number) in workflow/state log context. - Migrate tests, examples, and architecture docs from
run_numbertorun.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/hermes/workflows/test_workflow.py | Update workflow unit test records to provide run instead of required run_number. |
| tests/unit/hermes/state/test_state.py | Update HermesRecord construction in state tests to use run. |
| tests/unit/hermes/state/models/test_measurement.py | Add/adjust MeasurementInfo validation tests for required run and optional run_number. |
| tests/unit/hermes/state_service/test_state_manager.py | Update StateManager test record construction to use run. |
| tests/unit/hermes/state_service/test_state_logger.py | Update logger expectations and record creation to use run field in logged context. |
| tests/unit/hermes/state_service/test_state_io.py | Update YAML fixtures and expectations to use run in measurement_info. |
| tests/unit/hermes/runner/analysis/test_dispatch.py | Update dispatch test record construction to use run. |
| tests/unit/hermes/runner/analysis/hermes/test_unpacker.py | Update unpacker tests to use/log run rather than run_number. |
| tests/unit/hermes/runner/analysis/hermes/test_unpacker_integration.py | Update integration test record construction to use run. |
| tests/unit/hermes/runner/analysis/hermes/test_photon_reconstruction.py | Update reconstruction test record construction to use run. |
| tests/unit/hermes/runner/analysis/hermes/test_event_reconstruction.py | Update reconstruction test record construction to use run. |
| tests/unit/hermes/runner/analysis/empir/test_run.py | Update empir analysis test record construction to use run. |
| tests/unit/examples/analysis/test_unpacker_single_file.py | Update example YAML embedded in test to use run. |
| tests/unit/examples/analysis/test_two_stage.py | Update example YAML embedded in test to use run. |
| tests/unit/examples/analysis/test_timewalk_calibration_example.py | Update example YAML embedded in test to use run. |
| src/hermes/workflows/workflow.py | Update workflow initialization log message/context to use run. |
| src/hermes/state/models/measurement.py | Add required run field; make run_number optional; validate/strip labels. |
| src/hermes/state_service/state_logger.py | Update state logging messages/context to use run. |
| src/hermes/runner/analysis/hermes/run.py | Update invalid-mode logging context to include run; reformat error raise. |
| examples/analysis/unpacking/single_file.yaml | Replace run_number with run in example config. |
| examples/analysis/unpacking/multiple_files.yaml | Replace run_number with run in example config. |
| examples/analysis/two_stage/two_stage_config.yaml | Replace run_number with run in example config. |
| examples/analysis/timewalk_calibration/timewalk_config.yaml | Replace run_number with run in example config. |
| examples/analysis/event_reconstruction/photon-to-event.yaml | Replace run_number with run in example config. |
| examples/analysis/end_to_end/raw-to-events.yaml | Replace run_number with run in example config. |
| examples/analysis/empir/empir.yaml | Replace run_number with run in example config. |
| docs/architecture/state-model.md | Update architecture documentation/examples to reflect required run and optional run_number. |
| docs/architecture/logging_instructions.md | Update logging field guidance to reference run_id or run instead of run_id or run_number. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.