biolink / biolink-model-toolkit

A collection of useful python functions for looking up information and working with the Biolink Model
https://biolink.github.io/biolink-model-toolkit/
BSD 3-Clause "New" or "Revised" License
20 stars 11 forks source link

BMT raises an exception when getting decendants of certain types #93

Closed YaphetKG closed 1 year ago

YaphetKG commented 1 year ago

Running the following snippet :

from bmt import Toolkit
BMT = Toolkit("https://raw.githubusercontent.com/biolink/biolink-model/v3.1.0/biolink-model.yaml")
basic_descendants = {}

# get_all_types()
types = BMT.get_all_types()

for element in types:
    try:
        basic_descendants.update( {
            element: BMT.get_descendants(
                element,
                reflexive=False,
                mixin=False,
            )

        })
    except Exception as e:
        print(e, element)

errors out with the following:

not a valid biolink component date_or_datetime

I had checked the biolink model 3.1.0 for that date_or_datetime element under types: section but seems not to be there, wondering if thats being added somewhere in bmt or ... ? not sure really .