Skip to content

Enrich ontologies#18

Draft
anapaulagomes wants to merge 7 commits intomainfrom
enrich-ontologies
Draft

Enrich ontologies#18
anapaulagomes wants to merge 7 commits intomainfrom
enrich-ontologies

Conversation

@anapaulagomes
Copy link
Copy Markdown
Contributor

Closes #16.

Allows a user to enrich an existing machine-readable definition or create a new one with ontology ids out of the box.

This is still experimental. Feedback is welcome!

@anapaulagomes
Copy link
Copy Markdown
Contributor Author

Hi @cthoyt! This is the PR I told you about :)

return None


def _iri_to_curie(iri: str) -> str:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://bioregistry.readthedocs.io/en/latest/api/bioregistry.parse_iri.html#parse-iri implements this with much more logic baked in and testing already done for you :)

return None


def _search_ols(name: str, ontologies: list[str], timeout: int = 10) -> str | None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the harness for this is implemented in https://ols-client.readthedocs.io/en/latest/usage.html#ols_client.client.Client.search, I have been meaning to improve the docs on this for some time. maybe helpful for 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

Successfully merging this pull request may close these issues.

Incorporate a terminology search via the BioPortal API

2 participants