nwb-schema icon indicating copy to clipboard operation
nwb-schema copied to clipboard

Add DeviceModel neurodata type

Open rly opened this issue 10 months ago • 3 comments

Summary of changes

Fix #607

Checklist

For all schema changes:

  • [x] Add release notes for the PR to docs/format/source/format_release_notes.rst.
  • [x] Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.
  • [x] Make sure that hdmf-common-schema points to the latest release and not the latest commit on the main branch.

rly avatar Feb 05 '25 07:02 rly

In PyNWB, consider allowing the user to pass all devicemodel arguments to device constructor which creates a devicemodel behind the scenes with the same name + " Model" and links to it.

rly avatar Feb 09 '25 07:02 rly

In PyNWB, consider allowing the user to pass all devicemodel arguments to device constructor which creates a devicemodel behind the scenes with the same name + " Model" and links to it.

Since the intent seems to be that folks will create extensions of DeviceModel, I'm wondering whether that approach may cause confusion. I'm wondering whether it may be simpler to have some factory method instead, e.g., create_device on NWBFile that would create both the Device and DeviceModel

oruebel avatar Feb 10 '25 22:02 oruebel

In PyNWB, consider allowing the user to pass all devicemodel arguments to device constructor which creates a devicemodel behind the scenes with the same name + " Model" and links to it.

Since the intent seems to be that folks will create extensions of DeviceModel, I'm wondering whether that approach may cause confusion. I'm wondering whether it may be simpler to have some factory method instead, e.g., create_device on NWBFile that would create both the Device and DeviceModel

That makes sense. But factory methods will not work for extensions either if they require additional fields, so users would still have to create the DeviceModelExtension and DeviceExtension manually.

rly avatar Feb 20 '25 15:02 rly