marda-alliance / metadata_extractors_schema

Archive of MaRDA Metadata Extractors Schema. See datatractor/schema for the current repository.
https://github.com/datatractor/schema
MIT License
6 stars 1 forks source link

Allow filetype-specific usage instructions #49

Closed ml-evs closed 3 months ago

ml-evs commented 5 months ago

e.g., yadg should be allowed to say, "here is my usage template for these formats, and here it is for these other formats":

e.g.,

usage: 
    - method: python
      setup: yadg
      command: yadg.extractors.biologic_extract({{ input_type }}, {{ input_path }})
      filetypes: ["biologic-mpr", "biologic-mpt"]
    - method: python
      setup: yadg
      command: yadg.extractors.xrd_extract({{ input_type }}, {{ input_path }})
      filetypes: ["panalytical-xrdml"]

This feels a bit kludgey (and would need validation outside of LinkML to make sure that the types match the support_filetypes, and that all cases are covered), but is probably preferable to having to add multiple extractors in the registry?

PeterKraus commented 5 months ago

Perhaps reusing supported_filetypes entry for each usage might be the way to do it. However, validation is an issue. I've asked on the linkml discussion board, let's see if there's an easy way.

PeterKraus commented 4 months ago

In lieu of the galvani entry above, should we just add the field without any linkml-side validation for now?