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

Add sssom_schema.yaml to projects/ #301

Open
puja-trivedi opened this issue Jul 20, 2023 · 3 comments
Open

Add sssom_schema.yaml to projects/ #301

puja-trivedi opened this issue Jul 20, 2023 · 3 comments

Comments

@puja-trivedi
Copy link

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.

@matentzn
Copy link
Collaborator

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?

@hrshdhgd
Copy link
Contributor

hrshdhgd commented Jul 20, 2023

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)

@puja-trivedi
Copy link
Author

@hrshdhgd , @matentzn - Okay I will try that, thank you!

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

No branches or pull requests

3 participants