Skip to content

Conversation

@GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Feb 9, 2026

Add checks for simulation software executable paths and existence of corsika interaction paths.

Also update the documentation to make the setting of the environmental variables clearer.

Remove unused general.is_exeucutable (which can be replaced by shutil.which).

@GernotMaier GernotMaier self-assigned this Feb 9, 2026
@GernotMaier GernotMaier requested a review from Copilot February 9, 2026 11:48
Copy link
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 tightens validation around external simulation software configuration by enforcing that configured paths point to existing directories/executables, and by introducing a dedicated helper to locate executables in a given directory. It also updates unit tests and documentation to reflect the new environment variable expectations.

Changes:

  • Removed the legacy executable lookup helper (program_is_executable) and added find_executable_in_dir.
  • Updated _Config path/executable properties to validate existence/executability (raising on invalid config).
  • Updated unit tests and user/developer docs for the new environment variable requirements.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/simtools/utils/general.py Adds find_executable_in_dir helper used by settings to validate executables.
src/simtools/settings.py Enforces directory existence for sim_telarray/CORSIKA paths and uses the new executable finder.
tests/unit_tests/utils/test_general.py Removes tests for the deleted helper and adds coverage for find_executable_in_dir.
tests/unit_tests/test_settings.py Updates settings tests to match new exception-based behavior and interaction-table configuration.
docs/source/user-guide/getting_started.md Documents required env vars for sim_telarray/CORSIKA + interaction tables (but has a snippet issue).
docs/source/developer-guide/getting_started_as_developer.md Adjusts wording about environment variables in the dev container.
docs/source/components/databases.md Removes sim_telarray path from DB-focused .env snippets.
docs/changes/2030.feature.md Adds release note entry for the change (but currently inaccurate).

@GernotMaier GernotMaier marked this pull request as ready for review February 9, 2026 14:37
@ctao-sonarqube
Copy link

Copy link
Collaborator

@EshitaJoshi EshitaJoshi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@GernotMaier GernotMaier merged commit d640996 into main Feb 10, 2026
16 checks passed
@GernotMaier GernotMaier deleted the paths-for-exec branch February 10, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants