monarch-initiative / koza

Data transformation framework for LinkML data models
https://koza.monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
48 stars 4 forks source link

Add error handling to writer for attributes that are used but in node/edge properties #70

Closed kevinschaper closed 2 years ago

kevinschaper commented 2 years ago

In the writer, properties must be specified in the node_properties or edge_properties list in the source config to be written to the kgx file - but it would be very easy to populate an attribute that isn't specified - and then it won't be written.

Instead of silently failing to write properties, we should check each node or edge that goes into the writer to confirm that all properties on the entity are in the node_properties or edge_properties (whichever is appropriate) list.

Rather than a warning, this should halt as a full on error.

glass-ships commented 2 years ago