Skip to content

Add model_status keywords to SimulationModelsInfo schema.#2116

Merged
GernotMaier merged 8 commits into
mainfrom
production-version-status
Apr 15, 2026
Merged

Add model_status keywords to SimulationModelsInfo schema.#2116
GernotMaier merged 8 commits into
mainfrom
production-version-status

Conversation

@GernotMaier
Copy link
Copy Markdown
Contributor

@GernotMaier GernotMaier commented Apr 14, 2026

see discussion in simulation models repo

Additional fix and improvements for reading schema files. Generalize the schema_version fields.

For all other changes - see the Copilot summary, which is better than I would have written...

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 updates the SimulationModelsInfo JSON schema used to validate simulation model info.yml files, introducing a model_status field and adding unit tests to ensure the new constraints and backward compatibility behavior.

Changes:

  • Add schema version 0.2.0 for simulation_models_info and require a new model_status field with an allowed-value enum.
  • Keep schema version 0.1.0 embedded in the same schema file for backward compatibility.
  • Add unit tests covering accepted/rejected model_status values and compatibility with schema_version: 0.1.0.

Reviewed changes

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

File Description
src/simtools/schemas/simulation_models_info.schema.yml Adds new schema document (v0.2.0) introducing required model_status enum while retaining v0.1.0.
tests/unit_tests/data_model/test_schema.py Adds tests validating model_status allowed values, rejection of invalid values, and compatibility across schema versions.
docs/changes/2116.feature.md Towncrier fragment documenting the schema feature addition.

Comment thread src/simtools/schemas/simulation_models_info.schema.yml
Comment thread tests/unit_tests/data_model/test_schema.py Outdated
Base automatically changed from settings-to-model to main April 15, 2026 08:34
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

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

Comment thread tests/unit_tests/data_model/test_schema.py
Comment thread src/simtools/data_model/schema.py Outdated
Comment thread src/simtools/schemas/simulation_models_info.schema.yml
Comment thread src/simtools/schemas/simulation_models_info.schema.yml
Comment thread tests/unit_tests/data_model/test_schema.py
GernotMaier and others added 2 commits April 15, 2026 10:53
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 15, 2026 09:20
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 for the PR @GernotMaier!

@GernotMaier
Copy link
Copy Markdown
Contributor Author

Thanks @tobiaskleiner !

@GernotMaier GernotMaier merged commit de9b8ec into main Apr 15, 2026
17 checks passed
@GernotMaier GernotMaier deleted the production-version-status branch April 15, 2026 11:28
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