Open chicco785 opened 1 year ago
testing the code generated revealed that:
None
to fields where the value is optional, causes recursion error. this implies though, we have to pass a value (None
or []
for lists) when creating instancesEQ
classesThere may be some bugs in the CIM schema, in particular:
PowerSystemResources
attribute in Location
is set to be M:1
, but should be M:1..N
.to test:
to test:
- alternative ways to set default values (see RecursionError: maximum recursion depth exceeded pydantic/pydantic#6993)
- split classes based on profile
this eventually will be handled in a separate pr corresponding issues will be opened.
@MarcoPignati also alliander is working on something similar with a slight different approach, it's worth having a chat with them: https://github.com/sogno-platform/cimgen/pull/18
Description
Support pydantic code generation
Changes Made
PowerSystemResources
attribute inLocation
is set to beM:1
, but should beM:1..N
Related Issues
Fixes #3
Checklist