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

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

Open
gouttegd opened this issue Mar 28, 2024 · 6 comments
Open

Comments

@gouttegd
Copy link
Contributor

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.

@matentzn
Copy link
Contributor

matentzn commented Apr 4, 2024

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

@gouttegd
Copy link
Contributor Author

gouttegd commented Apr 4, 2024

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?

@matentzn
Copy link
Contributor

matentzn commented Apr 4, 2024

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

@gouttegd
Copy link
Contributor Author

gouttegd commented Apr 4, 2024

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.

@matentzn
Copy link
Contributor

matentzn commented Apr 4, 2024

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

@gouttegd
Copy link
Contributor Author

gouttegd commented Apr 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants