Skip to content

Conversation

rly
Copy link
Contributor

@rly rly commented Jun 25, 2025

Motivation

In coordination with NeurodataWithoutBorders/nwb-schema#644

The goal is to not write resolution, conversion, and offset for IndexSeries.

This PR also updates IndexSeries.__init__ so that unit cannot be passed in, since the schema requires a fixed value of "N/A" and currently in PyNWB, passing any different value will result in an error. This change improves the usability -- users do not need to provide `unit="N/A" during construction.

WIP. Removing resolution, conversion, and offset for IndexSeries.__init__ does not work because when resolution=None is passed to TimeSeries.__init__, then resolution is set to the default value for resolution (-1) specified in TimeSeries.

How to test the behavior?

Show how to reproduce the new behavior (can be a bug fix or a new feature)

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running ruff check . && codespell from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • 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.

@rly
Copy link
Contributor Author

rly commented Jun 25, 2025

We will punt this to the schema 2.10 release.

Base automatically changed from nwb-schema-2.9.0 to dev June 27, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant