Skip to content

Conversation

@GernotMaier
Copy link
Contributor

Move and rename application simtools-write-array-element-positions-to-repository to simtools-maintain-simulation-model-write-array-element-positions.

Refactor and unify writing of ground / utm files.

Note that this has been a bit of an odd application, living lonely in src/simtools/applications/db_development_tools.

Add integration and unit tests.

@GernotMaier GernotMaier self-assigned this Dec 19, 2025
@GernotMaier GernotMaier marked this pull request as ready for review December 19, 2025 15:24
Copilot AI review requested due to automatic review settings December 19, 2025 15:24
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 refactors and relocates the application for writing array element positions to the model repository. The application is moved from db_development_tools to the main applications directory and renamed to follow the consistent naming pattern for simulation model maintenance tools.

Key changes:

  • Refactored ground/UTM position writing logic into a unified function in array_layout_utils.py
  • Created new application simtools-maintain-simulation-model-write-array-element-positions with updated argument naming
  • Added comprehensive unit and integration tests for both coordinate systems

Reviewed changes

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

Show a summary per file
File Description
src/simtools/layout/array_layout_utils.py Added new function write_array_elements_from_file_to_repository that unifies ground and UTM coordinate handling
src/simtools/applications/maintain_simulation_model_write_array_element_positions.py New application file with standardized naming and uses output_path parameter
src/simtools/applications/db_development_tools/write_array_elements_positions_to_repository.py Refactored to call the new unified function, removing duplicated logic
tests/unit_tests/layout/test_array_layout_utils.py Added three unit tests covering both coordinate systems and error handling
tests/integration_tests/config/maintain_simulation_model_write_array_element_positions_utm.yml Integration test configuration for UTM coordinates
tests/integration_tests/config/maintain_simulation_model_write_array_element_positions_ground.yml Integration test configuration for ground coordinates
pyproject.toml Registered new application entry point
docs/source/user-guide/applications/simtools-maintain-simulation-model-write-array-element-positions.rst Documentation file for the new application
docs/source/user-guide/applications.md Added new application to the applications list
docs/changes/1958.maintenance.md Changelog entry documenting the refactoring

@ctao-sonarqube
Copy link

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