Make the stripping of annotation properties optional#1206
Merged
Conversation
We add a new configuration option in the ImportGroup, `strip_annotation_properties`. Setting it to False disables the default behaviour (introduced in ODK 1.5) of stripping most annotation properties from the import modules. When enabled, the stripping of annotation properties is now also performed on individual SLME modules (previously it was only done on the merged import module and on individual "mirror" and "filter" modules). closes #1093
Add OMO:0002000 to the list of annotation properties to be preserved, even when annotation properties are being stripped from imports. That property has a logical meaning (it defines how an annotation is to be expanded using ROBOT's `expand` command), so it should be preserved.
matentzn
approved these changes
Apr 1, 2025
Contributor
matentzn
left a comment
There was a problem hiding this comment.
Looks great, thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new option to the ImportGroup section,
strip_annotation_properties. It allows to disable the stripping of annotation properties from the import modules (introduced in ODK 1.5). The option is enabled by default, preserving the ODK 1.5 behaviour.It also makes sure that, when annotation stripping is enabled, it is performed on individual SLME modules as well, instead of only on the merged module and individual “filter” and ”“minimal” modules.
Lastly, it adds OMO:0002000 (the property used to define macros expanded by ROBOT’s
expandcommand) to the list of properties preserved by default.closes #1093