Skip to content

[Feature]: Warning instead of error when reading values that are not valid according to the NWB schema #776

@ehennestad

Description

@ehennestad

What would you like to see added to MatNWB?

When reading NWB files, different types of invalid values in the file will cause read errors. One example is if the schema specifies a attribute value to be constant (e.g. ElectricalSeries/data/unit should be volts), but the value of this attribute in the file is something else than the defined constant. For an example, see this discussion:
NeurodataWithoutBorders/helpdesk#75

Causing a file read error is perhaps too "dramatic", and a warning might be better.

@bendichter @rly @oruebel What are your thoughts here?

Is your feature request related to a problem?

Yes, files which have deviations from schema cannot be read. This can render a whole file useless, even if the issue is minor

What solution would you like?

I have two ideas in mind:

  1. Very permissive read. Everything that is not according to schema causes a warning. The value being read is kept if possible.

  2. A debug read mode. By default, reading files with invalid values causes an error, but support a debug flag / keyword argument that will change the error to a warning.

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions