Simplify naming of sim_telarray configuration files written to disk for simulation production.#2318
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates sim_telarray configuration handling in simtools by simplifying on-disk config filenames (switching to CTAO-*.cfg) and introducing run-number subdirectories under model/ to prevent configuration collisions across runs, with corresponding updates to output validation and test resources.
Changes:
- Simplify sim_telarray telescope/array configuration filenames to the
CTAO-...cfgscheme and update code paths that reference these files. - Add a run-number directory level for model outputs (e.g.,
model/run000010/<model_version>/) and update output validation accordingly. - Add overwrite protection for array config writing and refresh unit/integration tests plus generated reference configs.
Reviewed changes
Copilot reviewed 18 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_tests/utils/test_names.py | Updates naming tests for new CTAO-*.cfg conventions. |
| tests/unit_tests/testing/test_validate_output.py | Adjusts simtel cfg validation tests for run-number model subdirectories. |
| tests/unit_tests/test_simulator.py | Updates simulator unit test expectations for run-specific model directory selection. |
| tests/unit_tests/simtel/test_simulator_ray_tracing.py | Updates expected sim_telarray config path naming in ray tracing tests. |
| tests/unit_tests/model/test_array_model.py | Adds coverage for run-specific config directories and updates expected array cfg name. |
| tests/unit_tests/io/test_io_handler.py | Updates expected model configuration directory layout to model/<subdir>/<version>. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-South-beta.cfg | Updates reference array cfg includes/metadata for new telescope cfg filenames. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-North-alpha.cfg | Updates reference array cfg includes/metadata for new telescope cfg filenames. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-MSTS-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-MSTN-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-LSTS-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-LSTN-02.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/6.0.2/CTAO-LSTN-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/5.0.0/CTAO-North-alpha.cfg | Updates reference array cfg includes/metadata for new telescope cfg filenames. |
| tests/resources/generated/sim_telarray_configurations/5.0.0/CTAO-MSTN-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/5.0.0/CTAO-LSTN-02.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/resources/generated/sim_telarray_configurations/5.0.0/CTAO-LSTN-01.cfg | Updates reference telescope cfg metadata and associated file naming. |
| tests/integration_tests/config/simulate_prod_proton_20_deg_north_check_output.yml | Updates integration test references to new generated cfg filenames. |
| tests/integration_tests/config/simulate_prod_gamma_62_deg_south_check_output.yml | Updates integration test references to new generated cfg filenames. |
| tests/integration_tests/config/simulate_prod_gamma_40_deg_south_sim_telarray_only.yml | Updates integration test references to new generated cfg filenames. |
| src/simtools/utils/names.py | Replaces simtel_config_file_name with sim_telarray_config_file_name and changes naming rules. |
| src/simtools/testing/validate_output.py | Updates simtel cfg validation to locate files under run-specific model subdirectories. |
| src/simtools/simulator.py | Passes a runXXXXXX model subdir into ArrayModel to avoid cross-run overwrites. |
| src/simtools/simtel/simulator_ray_tracing.py | Switches to using telescope_model.config_file_path directly for cfg path resolution. |
| src/simtools/simtel/simtel_config_writer.py | Adds overwrite protection for array config file writing. |
| src/simtools/model/model_parameter.py | Updates telescope config path generation and removes the old get_config_file_path API. |
| src/simtools/model/array_model.py | Adds support for run-specific model configuration directories and updates array cfg naming. |
| src/simtools/io/io_handler.py | Changes model configuration directory structure to model/<subdir>/<version>. |
| docs/changes/2318.maintenance.md | Adds a changelog fragment describing the naming/layout change. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
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.




Simplify naming of sim_telarray configuration files written to disk for simulation production:
CTAO-LSTS-01.cfg,CTAO-SSTS-25.cfgCTAO-South-beta.cfgThis will allow to run in future a paralellization of some applications (e.g., multi-light-level flasher simulations did overwrite configuration files).
Raises an exception if existing configuration files are overwritten by an application.
Note! Basic assumption is that configuration files are written once into the same directory by an application.
Note that this removes changes introduced in PR #2287.
Updates tests resources configuration files using tests files from simtools-tests v0.34.0