Skip to content

Allow to to set workflow git tag from command line for maintain_simulation_model_add_production#2120

Merged
GernotMaier merged 4 commits into
mainfrom
select-settings-branch-from-cli
Apr 16, 2026
Merged

Allow to to set workflow git tag from command line for maintain_simulation_model_add_production#2120
GernotMaier merged 4 commits into
mainfrom
select-settings-branch-from-cli

Conversation

@GernotMaier
Copy link
Copy Markdown
Contributor

@GernotMaier GernotMaier commented Apr 16, 2026

Small change to simplify the usage of maintain_simulation_model_add_production during maintenance: allow to set the git tag for the setting workflow repository from command line.

(some changes were also requested to tmp path in the tests)

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

Adds a CLI override to select the git tag/branch used for downloading model parameters when running maintain_simulation_model_add_production, allowing maintenance workflows to bypass the info.yml default.

Changes:

  • Extend model_repository.generate_new_production() to accept an optional setting_workflows_git_tag override (fallback remains info.yml / "main").
  • Add --setting_workflows_git_tag flag to maintain_simulation_model_add_production and pass it through to the repository logic.
  • Add a unit test covering the override behavior and a changelog entry.

Reviewed changes

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

File Description
src/simtools/model/model_repository.py Adds optional setting_workflows_git_tag parameter and fallback logic.
src/simtools/applications/maintain_simulation_model_add_production.py Registers new CLI flag and forwards it into generate_new_production().
tests/unit_tests/model/test_model_repository.py Adds a unit test verifying CLI-provided git tag overrides info.yml.
docs/changes/2120.maintenance.md Documents the maintenance change in the changelog.

Comment thread src/simtools/model/model_repository.py Outdated
Comment thread tests/unit_tests/model/test_model_repository.py
Comment thread docs/changes/2120.maintenance.md Outdated
GernotMaier and others added 3 commits April 16, 2026 11:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ctao-sonarqube
Copy link
Copy Markdown

@GernotMaier GernotMaier marked this pull request as ready for review April 16, 2026 09:44
Copy link
Copy Markdown
Collaborator

@tobiaskleiner tobiaskleiner left a comment

Choose a reason for hiding this comment

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

Thanks @GernotMaier!

@GernotMaier
Copy link
Copy Markdown
Contributor Author

Thanks!

@GernotMaier GernotMaier merged commit d03953b into main Apr 16, 2026
17 checks passed
@GernotMaier GernotMaier deleted the select-settings-branch-from-cli branch April 16, 2026 12:40
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.

3 participants