sssom
sssom copied to clipboard
Add sssom_schema.yaml to projects/
Would you be able to add a version of the sssom_schema in LinkML formatting with file extension .yaml.
I am creating my own model using LinkML and I want to use the sssom_schema (sssom:Mapping) but in order to import the schema it must be .yaml.
You are right in that no yaml is specifically released.. the editor file is here https://github.com/mapping-commons/sssom/blob/master/src/sssom_schema/schema/sssom_schema.yaml
@hrshdhgd what is the prevalent practice: should a yaml file be copied into the release directory? Else, how do you make sure that people don't use a version with unreleased edits?
Also @hrshdhgd can you tell @puja-trivedi how to access the yaml file using the pypi sssom schema package?
You can access the sssom_schema.yaml
file using pkg_resources
. An example of this is done in sssom-py
here.
SCHEMA_YAML = pkg_resources.resource_filename("sssom_schema", "schema/sssom_schema.yaml")
Then you could use SchemaView
in linkml
and proceed e.g.: SchemaView(SCHEMA_YAML)
@hrshdhgd , @matentzn - Okay I will try that, thank you!