sssom-py is doing too much object initialization at time of imports. As a rule, imports should only define functions, classes, constants, etc. And constants should only be defined using simple atomic terms, no function invocation.
@hrshdhgd and I spent some time getting rid of this a year or so ago, but it seems to have crept back in.
Specifically _get_sssom_schema_object is called at the top level here:
sssom-py is doing too much object initialization at time of imports. As a rule, imports should only define functions, classes, constants, etc. And constants should only be defined using simple atomic terms, no function invocation.
@hrshdhgd and I spent some time getting rid of this a year or so ago, but it seems to have crept back in.
Specifically
_get_sssom_schema_object
is called at the top level here:https://github.com/mapping-commons/sssom-py/blob/f4256047f75f8d0a286b7255f76ab884d16e049d/src/sssom/parsers.py#L333
I don't understand the need for this. Keep it simple. Set these things at run time, not at import time.
Overall I think the way sssom-py is approaching schema introspection is way too complex in general