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

Ignore unknown file types when loading a model #470

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Wuestengecko
Copy link
Member

When encountering a file with an unknown file name extension, we used to simply crash the program. Instead, we now still try to load the model, but print a warning about potentially missing content. This enables limited use of capellambse on models that use external extension data, such as the *.traceability files created by the Publication for Capella extension.

Note that even when simply loading such a model will succeed, some runtime data access may cause errors due to the missing extension data. To avoid creating bigger problems down the line, capellambse will refuse to save such a model without also passing the extra save() flag i_have_a_recent_backup=True, similar to the behavior when ignoring UUID duplication.

When encountering a file with an unknown file name extension, we used to
simply crash the program. Instead, we now still try to load the model,
but print a warning about potentially missing content. This enables
limited use of capellambse on models that use external extension data,
such as the `*.traceability` files created by the Publication for
Capella extension.

Note that even when simply loading such a model will succeed, some
runtime data access may cause errors due to the missing extension data.
To avoid creating bigger problems down the line, capellambse will refuse
to save such a model without also passing the extra save() flag
`i_have_a_recent_backup=True`, similar to the behavior when ignoring
UUID duplication.
@Wuestengecko Wuestengecko linked an issue Nov 6, 2024 that may be closed by this pull request
@Wuestengecko Wuestengecko merged commit 747cb3c into master Nov 6, 2024
9 checks passed
@Wuestengecko Wuestengecko deleted the ignore-unknown-files branch November 6, 2024 12:44
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.

Publication for Capella
1 participant