Remove unreferenced test resource files#2212
Merged
Merged
Conversation
Remove 11 files from tests/resources that are not referenced
in any unit or integration test (confirmed by grep across all
.py, .yml, .yaml, .json files excluding __pycache__):
- CTA-North-LSTN-01-Released_test-telescope-model.cfg
- derive_mirror_rnda_psf_{mean,measurement,no_tuning,random_flen}.ecsv
- flasher_full_simulation_lst_north/{simulate_*.yml,*.simtel.log}
- gamma_run000007_za40deg.../{corsika_config_*.input,simulate_prod_*.yml}
- log_sub_corsika_run000001_gamma_North_test_layout_test-production.out
- production_grid_generation_axes_definition_ra_dec.yml
Addresses #1600
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove redundant FileNotFoundError from except clause (S5713): FileNotFoundError is a subclass of OSError, making it redundant - Reduce cognitive complexity of _copy_collection_files (S3776): Extract _collect_source_directories and _find_collection_file helpers to bring complexity from 18 down to within the allowed 15 - Update camera efficiency reference file for MSTx-FlashCam South: nsb field now reflects Benn_LaPalma_sky_converted.lis spectrum used in the integration test configuration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR primarily removes unused test resource files to reduce repository clutter and improve test resource maintainability. It also includes a small runner refactor and an update to a camera-efficiency reference output.
Changes:
- Removed unused CORSIKA, sim_telarray, telescope model, production-grid, and mirror PSF test resources.
- Refactored collection-file lookup/copying helpers in
simtools_runner.py. - Updated the NSB metadata in a camera-efficiency reference YAML.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/simtools/runners/simtools_runner.py |
Refactors collection file discovery/copying into helper functions. |
tests/resources/CTA-North-LSTN-01-Released_test-telescope-model.cfg |
Removes an unused telescope model config resource. |
tests/resources/camera_efficiency/camera_efficiency_summary_South_MSTx-FlashCam_za0.0deg_azm000deg.yml |
Updates NSB metadata in a reference output. |
tests/resources/derive_mirror_rnda_psf_mean.ecsv |
Removes an unused mirror PSF reference table. |
tests/resources/derive_mirror_rnda_psf_measurement.ecsv |
Removes an unused mirror PSF reference table. |
tests/resources/derive_mirror_rnda_psf_no_tuning.ecsv |
Removes an unused mirror PSF reference table. |
tests/resources/derive_mirror_rnda_psf_random_flen.ecsv |
Removes a mirror PSF reference table. |
tests/resources/flasher_full_simulation_lst_north/full_simulation_run000010_North_7.0.0_simulate_flasher.simtel.log |
Removes an unused flasher simulation log. |
tests/resources/flasher_full_simulation_lst_north/simulate_flasher_full_simulation_lst_north.yml |
Removes an unused flasher simulation workflow config. |
tests/resources/gamma_run000007_za40deg_azm180deg_South_subsystem_lsts_6.0.2_test/corsika_config_gamma_za40deg_azm180deg_South_subsystem_lsts_6.0.2_test.input |
Removes an unused generated CORSIKA input file. |
tests/resources/gamma_run000007_za40deg_azm180deg_South_subsystem_lsts_6.0.2_test/simulate_prod_gamma_40_deg_South_corsika_only.yml |
Removes an unused production workflow config. |
tests/resources/log_sub_corsika_run000001_gamma_North_test_layout_test-production.out |
Removes an unused CORSIKA runtime log. |
tests/resources/production_grid_generation_axes_definition_ra_dec.yml |
Removes an unused production-grid axes definition. |
Comments suppressed due to low confidence (1)
tests/resources/derive_mirror_rnda_psf_random_flen.ecsv:1
- This file is still referenced in the developer testing guide as the example
reference_output_file, so deleting it leaves the documentation pointing to a missing test resource. Please either keep this file or update the documentation example to use an existing resource.
Replace derive_mirror_rnda_psf_random_flen.ecsv (deleted in previous commit) with the existing ray_tracing_North_LSTN-01_d10.0km_za20.0deg_validate_optics.ecsv in the developer testing guide example. Co-authored-by: Copilot <223556219+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.



Remove 11 files from tests/resources that are not referenced in any unit or integration test (confirmed by grep across all .py, .yml, .yaml, .json files excluding pycache):
Addresses #1600