ontology-development-kit icon indicating copy to clipboard operation
ontology-development-kit copied to clipboard

Publishing SSSOM mapping sets should not be a "all-or-nothing" choice

Open gouttegd opened this issue 10 months ago • 6 comments

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.

gouttegd avatar Mar 28 '24 19:03 gouttegd

I totally agree with this. We can leave release_mappings as a default and make the others overridable?

matentzn avatar Apr 04 '24 19:04 matentzn

Just to be sure I understand what you mean by “make the others overridable”:

  • if the “top-level” release_mappings is False, 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 to False.

Correct?

gouttegd avatar Apr 04 '24 19:04 gouttegd

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) %}

matentzn avatar Apr 04 '24 20:04 matentzn

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.

gouttegd avatar Apr 04 '24 20:04 gouttegd

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

matentzn avatar Apr 04 '24 20:04 matentzn

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.

gouttegd avatar Apr 04 '24 20:04 gouttegd