laminlabs / bionty-base

Access public biological ontologies.
https://bionty-base.lamin.ai
Apache License 2.0
16 stars 2 forks source link

Use bioregistry to find latest versions of ontologies #416

Closed Zethson closed 1 year ago

Zethson commented 1 year ago

One current issue is that we have to manually add new versions to the source.yaml whenever they get released. However, we got no notification of such an event. I wouldn't be surprised if we could leverage bioregistry to track new releases and then update the source.yaml

I shall investigate this and write something up. Could see us having a script that checks this periodically.

import bioregistry

registry = bioregistry.read_registry()
Zethson commented 1 year ago

Accidentally closed:

prototype:

import bioregistry

def check_mondo_ontology_version():
    mondo_version = bioregistry.get_version("mondo")
    if     mondo_version:
        if mondo_version:
            print(f"Latest version of MONDO ontology: {mondo_version}")
        else:
            print("Version information not found for MONDO ontology.")
    else:
        print("Failed to retrieve MONDO ontology entry from BioRegistry.")

check_mondo_ontology_version()