Skip to content

[Feature]: Handle conflicts between core schema and extensions #2108

@rly

Description

@rly

What would you like to see added to PyNWB?

Related to NeurodataWithoutBorders/nwb-schema#633

NWB Schema 2.9.0 was just released, which adds an attribute Device.model - an optional link to a DeviceModel object.

Some extensions have an optional Device.model string attribute.

One extension has a required or optional Device.model link to a Device object.

One extension defines its own DeviceModel type (that extends Device) and Device.model is an optional link to that:

Is your feature request related to a problem?

No response

What solution would you like?

When reading data:

  1. We need to detect if there is an incompatibility between the cached extension schema and the pynwb-loaded core schema.
  2. If so, we need to raise a warning, change the name of the extension field (or class), and load data into it so that old data is still readable.

When writing data:

  1. We need to detect if there is an incompatibility between the loaded extension schema and the pynwb-loaded core schema (or really any other loaded schema).
  2. We need to warn (or raise an error for now) saying there is a conflict. Maybe we remap the name of the extension field and still allow writing data?

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: bugerrors in the code or code behaviorpriority: highimpacts proper operation or use of feature important to most users

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions