Skip to content
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

Add an optional metadata section to declarative modelling #258

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

ewuerger
Copy link
Member

@ewuerger ewuerger commented Mar 2, 2023

The declarative modelling YAML needs a metadata section in order to ensure successful application of it that leads to a healthy model. With RM Bridge issue #39 and a following PR this will be implemented.

This PR anticipates these changes and implements metadata checks during decl.apply() against the model.info. These checks can be found here and are tested.

@ewuerger ewuerger self-assigned this Mar 2, 2023
@ewuerger ewuerger force-pushed the decl-metadata branch 2 times, most recently from cda702f to ddeb5be Compare March 2, 2023 14:51
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
tests/test_decl.py Outdated Show resolved Hide resolved
tests/test_decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Show resolved Hide resolved
@ewuerger ewuerger force-pushed the decl-metadata branch 2 times, most recently from 0ebc532 to 4095e28 Compare March 10, 2023 10:45
@ewuerger ewuerger requested a review from Wuestengecko March 10, 2023 10:46
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
capellambse/decl.py Outdated Show resolved Hide resolved
docs/source/examples/10 Declarative Modeling.ipynb Outdated Show resolved Hide resolved
tests/test_decl.py Outdated Show resolved Hide resolved
tests/test_decl.py Outdated Show resolved Hide resolved
tests/test_decl.py Outdated Show resolved Hide resolved
docs/source/start/declarative.rst Outdated Show resolved Hide resolved
@ewuerger ewuerger force-pushed the decl-metadata branch 3 times, most recently from 7fb0773 to 294896b Compare March 14, 2023 13:40
@ewuerger ewuerger requested a review from Wuestengecko March 14, 2023 13:40
@Wuestengecko Wuestengecko force-pushed the decl-metadata branch 3 times, most recently from dc55401 to 0ce78ee Compare October 4, 2024 15:12
These changes make `capellambse.decl` understand a new metadata section
in the declarative modelling file.

The `decl.apply` function gained a new `strict` argument. If set to
True, metadata must be present in the provided YAML and match the passed
model.

Co-authored-by: Ernst Würger <[email protected]>
@Wuestengecko Wuestengecko changed the title Anticipate metadata in declarative modelling Add an optional metadata section to declarative modelling Oct 8, 2024
@Wuestengecko Wuestengecko merged commit e8a73ce into master Oct 8, 2024
9 checks passed
@Wuestengecko Wuestengecko deleted the decl-metadata branch October 8, 2024 09:42
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