Closed bartkl closed 5 months ago
I'd like:
gen_schema(classes, enums, package=None)
which purely maps to linkml.Schema
package
is None
, it is the entire CIMHaving a generator class instance per schema would make things more clear, but this would delete the LRU caches.
Therefore, I went back to the functional route. Having an explicit repeated dependent parameter uml_project
may feel redundant, but it is semantically explicit, and we achieve all other goals (caching, simplicity and generators being bound to a package).
Now you reset the state for every run of
gen_schema_for_package
. All of the methods (I guess?) involve doing work for a single schema. This tells you the generator as a whole is actually bound to a package.^ Dangerous words that might not be true. Think about improvements to how the code is structured.