ontology-development-kit
ontology-development-kit copied to clipboard
Publishing SSSOM mapping sets should not be a "all-or-nothing" choice
The ODK configuration file allows to define mapping set products that can be managed by the ODK:
sssom_mappingset_group:
products:
- id: my-set
- id: my-other-set
mirror_from: ...
The section accepts a release_mappings
boolean parameter (defaulting to False
) which, when set to True
, will cause the mapping sets to be treated as “release assets” and published along with the other assets.
AFAICT, it is not possible to ask that only some of the mapping sets defined in that section be treated as release assets. I believe it should be possible to do so. An ontology may need to define several mapping sets, but may only want to publish some of them.
In other words, the release_mappings
parameter at the level of the sssom_mappingset_group
should be “overridable” at the level of each individual mapping set product.
I totally agree with this. We can leave release_mappings
as a default and make the others overridable?
Just to be sure I understand what you mean by “make the others overridable”:
- if the “top-level”
release_mappings
isFalse
, then nothing happens (no sets are ever published); - if it is
True
, then by default all declared sets are published; - except the sets that have their own
release
parameter set toFalse
.
Correct?
Exactly! We use the same pattern with module_type (rather ugly jinja):
{% if (ont.is_large and ('slme' == ont.module_type or (ont.module_type is none and 'slme' == project.import_group.module_type))) or ('fast_slme' == ont.module_type) or (ont.module_type is none and 'fast_slme' == project.import_group.module_type) %}
OK, that’d work for me.
It would be slightly annoying for an ontology that uses, say, 12 sets and wants to publish only one (they would have to manually exclude the 11 others), but that’s not a big deal and we can’t make everyone happy anyway.
This is how I though this works:
sssom_mappingset_group:
release_mappings: false
products:
- id: my-set
- id: my-other-set
mirror_from: ...
...
- id: my-set-to-be-published
release_mapping: true
Ah, OK. In my initial understanding, when the top-level release_mappings
parameter is set to False
this disables the publishing of the mappings entirely, so any release_mapping
at the level of each set is ignored.
Even better, then.