-
Notifications
You must be signed in to change notification settings - Fork 3
Improved version and build info handling: #1957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 improves version and build information handling across the simtools application by consolidating version printing functionality, renaming environment variables for consistency, and adding new command-line options for build information export.
Key changes include:
- Renamed environment variable from
SIMTOOLS_SIMTEL_PATHtoSIMTOOLS_SIM_TELARRAY_PATHfor consistency with software naming - Added
--build_infoand--export_build_infocommand-line options to all applications - Implemented automatic version information printing at application startup
- Removed the standalone
simtools-print-versionapplication (functionality now integrated into all applications)
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/simtools/utils/general.py |
Added load_environment_variables() utility function for reading .env files |
src/simtools/settings.py |
Updated to use SIMTOOLS_SIM_TELARRAY_PATH environment variable |
src/simtools/dependencies.py |
Added export_build_info() and _get_package_path() functions; refactored get_build_options() |
src/simtools/configuration/configurator.py |
Refactored to use new load_environment_variables() utility |
src/simtools/configuration/commandline_parser.py |
Added BuildInfoAction class and new CLI arguments --build_info and --export_build_info |
src/simtools/application_control.py |
Added _version_info() function for startup version printing |
src/simtools/applications/simulate_prod_htcondor_generator.py |
Updated documentation to reference new environment variable name |
src/simtools/applications/print_version.py |
Removed file (functionality integrated into all applications) |
pyproject.toml |
Removed simtools-print-version script entry |
tests/unit_tests/utils/test_general.py |
Added comprehensive tests for load_environment_variables() |
tests/unit_tests/test_dependencies.py |
Added tests for new functions and updated mocks for path handling |
tests/unit_tests/test_application_control.py |
Added tests for _version_info() function |
tests/unit_tests/test_settings.py |
Updated tests to use new environment variable name |
tests/unit_tests/testing/test_helpers.py |
Updated tests to use new environment variable name |
tests/unit_tests/simtel/test_simtel_config_writer.py |
Updated comment referencing sim_telarray path |
tests/unit_tests/ray_tracing/test_mirror_panel_psf.py |
Updated test data to use new path variable name |
tests/unit_tests/configuration/test_configurator.py |
Updated tests to use new environment variable name |
tests/unit_tests/configuration/test_commandline_parser.py |
Added test for BuildInfoAction |
tests/conftest.py |
Updated environment variable setup for test fixtures |
tests/integration_tests/config/print_version.yml |
Removed integration test config for deleted application |
.env_template |
Updated environment variable name in template |
.github/workflows/build-simtools-legacy.yml |
Updated CI workflow to use new environment variable and removed print-version step |
.github/workflows/CI-integrationtests.yml |
Updated CI workflow to use new environment variable and removed print-version step |
docs/source/user-guide/applications.md |
Removed reference to simtools-print-version application |
docs/source/user-guide/applications/simtools-print-version.rst |
Removed documentation file for deleted application |
docs/changes/1957.feature.md |
Added feature changelog entry |
docs/changes/1957.api.md |
Added API change changelog entry |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|




Improved version and build info handling:
DEBUG--build_infoto print detailed build information of the application--export_build_info EXPORT_BUILD_INFOexport build information to file (json or yaml format)simtools-print-version(above functionality replaces it)sim_telarraytoSIMTOOLS_SIM_TELARRAY_PATH(fromSIMTOOLS_SIMTEL_PATH). This is consistent with the naming of the simulation software packages and the schema values. Requires changes by the users to their.envfiles.Examples
Main version printout:
With log level debug:
and with an output file:
simtools-db-get-parameter-from-db --parameter num_gains --site North --telescope LSTN-design --parameter_version 1.0.0 --export_build_info tt.jsongives you: