Resolve inconsistency between the name parameter used across validation errors #528
Open
4 of 5 tasks
Labels
category: enhancement
improvements of code or code behavior
topic: validator
issues related to validation of files
The docstring for the
name
parameter of validation errors is "the name of the component that is erroneous".MissingError
andMissingDataType
validation errors are created when required children of a group are not present (the former when the child does not have an explicit type and the latter when there is a type). ForMissingError
, the value ofname
is the path to the child, while forMissingDataType
, the value ofname
is the path to the parent group.It would be an improvement to resolve this inconsistency across all validation errors.
If a
GroupBuilder
is missing a required child builder (DatasetBuilder
,GroupBuilder
, orLinkBuilder
), which component is erroneous - the parentGroupBuilder
, or the missing child?Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
The
name
passed to eitherMissingError
orMissingDataType
should be changed to be consistent with the other.The consistency of the
name
passed to all other validation errors should be evaluated and changed if other inconsistencies are found.Describe alternatives you've considered
An alternative would be to update the parameter name or documentation to clarify why the existing implementation is correct.
Additional context
See the difference in
name_of_erroneous
here depending on the error type:hdmf/src/hdmf/validate/validator.py
Lines 457 to 469 in 45dee5c
Checklist
The text was updated successfully, but these errors were encountered: