Add mode argument for definedBy action in bundle operation
Closed this issue · 3 comments
The bundle operation currently does not pass a mode
argument to the definedBy
action, so the only mode available is the default strict
mode. The task is to modify the grammar to accept the argument with values of strict
and all
, like the commandline. The same method is used to apply the transformation, so no changes needed there.
In addition to adding this to the readme documentation, the following two items are missing and should be added:
versionedDefinedBy: true
option for the bundle operation (only the commandline--versioned-definedBy
is documented)- I don't know the status of the
--retained-definedBy
action for bundling. If it works the same way, add to documentation as well. - Document that
strict
is the default mode fordefinedBy
.
A mode
property with the values of strict
and all
should be added to the properties of the definedBy
bundle command here https://github.com/semanticarts/ontology-toolkit/blob/develop/onto_tool/bundle_schema.yaml#L426
It should then be used to add a mode=
argument to the add_defined_by
call here https://github.com/semanticarts/ontology-toolkit/blob/develop/onto_tool/bundle.py#L246. The method already supports the option.
Also, the bulk of the command line tests for definedBy
in https://github.com/semanticarts/ontology-toolkit/blob/develop/tests/test_issue-36.py could be adapted for a bundle test as well.