bartkl / cim-to-linkml

Generates LinkML schemas for packages in the CIM information model.
0 stars 0 forks source link

Change how state is handled #12

Closed bartkl closed 2 months ago

bartkl commented 3 months ago

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.

bartkl commented 3 months ago

I'd like:

bartkl commented 2 months ago

Having 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).