Linter¶
CIMPyORM supports linting CIM datasets against their schema definition using the lint
function:
- cimpyorm.lint(session, model)[source]¶
Check the model for missing obligatory values and references and for invalid references (foreign key validation) and return the results in a pandas pivot-table.
- Parameters
session – The SQLAlchemy session object (obtained from parse/load).
model – The parsed CIMPyORM model (obtained from parse/load).
- Returns
Pandas pivot-table.
The function yields a pandas pivot_table containing information about schema violations and model inconsistencies, namely:
Missing non-optional values (see Exploring on how to determine which fields are optional)
Missing references
Invalid references (foreign-key reference not found in referenced table)
Linting the ENTSO-E example FullGrid dataset against the CGMES 2.4.15 specification yields the following violations:
Note¶
As of version 0.6, the linter does not yet validate many-to-many relationships.