psych-ds / psychds-validator

Validator tools for the psych-DS specification
0 stars 1 forks source link

Metadata errors need more fine-grained file provenance #31

Closed bleonar5 closed 4 months ago

bleonar5 commented 5 months ago

TL;DR

In the current design, certain classes of metadata errors are applied to fully-compiled sidecar objects (that is, metadata objects that include hierarchical modifications from sidecar files), but no trace of which properties come from which files is maintained, so all errors point to the global metadata object generally.

For clarity's sake, the app should keep a trace of which metadata files contribute which properties to the final compiled object.

My proposed solution for this is to just keep a separate dictionary variable during the sidecar inheritance process that links names of properties to their files of origin, so when an error occurs, the dictionary can be checked and the error can be properly attributed.