-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace model parameter default schema versions by value read from model_parameter.metaschema.yml #1332
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Copilot reviewed 7 out of 22 changed files in this pull request and generated no comments.
Files not reviewed (15)
- tests/conftest.py: Evaluated as low risk
- tests/unit_tests/data_model/test_metadata_model.py: Evaluated as low risk
- src/simtools/applications/validate_file_using_schema.py: Evaluated as low risk
- src/simtools/applications/convert_all_model_parameters_from_simtel.py: Evaluated as low risk
- tests/unit_tests/data_model/test_data_reader.py: Evaluated as low risk
- tests/unit_tests/data_model/test_metadata_collector.py: Evaluated as low risk
- tests/unit_tests/data_model/test_validate_data.py: Evaluated as low risk
- src/simtools/model/array_model.py: Evaluated as low risk
- src/simtools/data_model/model_data_writer.py: Evaluated as low risk
- src/simtools/data_model/metadata_collector.py: Evaluated as low risk
- src/simtools/data_model/validate_data.py: Evaluated as low risk
- src/simtools/layout/array_layout.py: Evaluated as low risk
- src/simtools/data_model/metadata_model.py: Evaluated as low risk
- tests/unit_tests/data_model/test_model_data_writer.py: Evaluated as low risk
- src/simtools/utils/names.py: Evaluated as low risk
This comment has been minimized.
This comment has been minimized.
Just did a merge from the branch |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/simtools/data_model/schema.py
Outdated
from simtools.constants import MODEL_PARAMETER_METASCHEMA, MODEL_PARAMETER_SCHEMA_PATH | ||
|
||
|
||
def model_parameter_schema_files(schema_directory=MODEL_PARAMETER_SCHEMA_PATH): |
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.
Suggest to rename the functions to make their purpose clearer. Maybe get_parameters_and_schema_files
, also the following get_schema_path_for_model_parameter
and get_validated_schema_version
.
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.
OK - for me it appears clear the schema.model_parameter_schema_files
gives me the schema files. But your comment shows that this is not the case for everyone, so I changed it and added everywhere the get_
...
Is this still correct? |
No. Removed it. |
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.
Thanks @GernotMaier, looks good overall. Added a minor comment.
@tobiaskleiner - thanks for the review. I've addressed the comment and changed the function names in |
Analysis Details0 IssuesCoverage and DuplicationsProject ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w |
Addresses the repetition of getting / reading the model parameters schema files and removes the necessity of detailed knowledge about paths and naming of schema files (especially for those in
src/simtools/schemas/model_parameters/
):simtools.data_model.schema
(recommend to start reviewing that)simtools.constants
schema.model_parameter_schema_version
. Closes Replace model parameter default schema versions by value read frommodel_parameter.metaschema.yml
#1327simtools.utils.general.collect_data_from_file
to get the Nth document of a multi-document yaml file