Skip to content

Remove unreferenced test resource files#2212

Merged
GernotMaier merged 3 commits into
tests-resourcesfrom
test-sources-v1
May 28, 2026
Merged

Remove unreferenced test resource files#2212
GernotMaier merged 3 commits into
tests-resourcesfrom
test-sources-v1

Conversation

@GernotMaier
Copy link
Copy Markdown
Contributor

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

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>
@GernotMaier GernotMaier self-assigned this May 28, 2026
@GernotMaier GernotMaier added no-changelog-needed No Changelog entry required for this PR Skip review PR without required review labels May 28, 2026
- 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>
@GernotMaier GernotMaier marked this pull request as ready for review May 28, 2026 09:26
@GernotMaier GernotMaier requested a review from Copilot May 28, 2026 10:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@ctao-sonarqube
Copy link
Copy Markdown

@GernotMaier GernotMaier merged commit 8b00e6a into tests-resources May 28, 2026
14 checks passed
@GernotMaier GernotMaier deleted the test-sources-v1 branch May 28, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed No Changelog entry required for this PR Skip review PR without required review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants