Skip to content

IndexSeries: no enforcement that at least one of indexed_timeseries or indexed_images is present #703

Open

Description

@ehennestad

Summary

IndexSeries defines two links, both optional (quantity: '?'):

  • indexed_timeseries — target: ImageSeries (discouraged, to be deprecated)
  • indexed_images — target: Images (preferred)

The NWB schema language has no native "at least one of" constraint, so an IndexSeries with neither link is technically schema-valid but semantically meaningless — there is nothing to index into.

Proposed short-term fix

Strengthen the IndexSeries type-level doc string to explicitly state that at least one link must be present, and that indexed_images is the preferred target. This does not change schema validation but makes the requirement clear to users and tool authors.

Proposed long-term fix

Once indexed_timeseries is formally deprecated in the schema:

  1. Remove indexed_timeseries (or mark it deprecated with deprecated: true if the spec supports it).
  2. Make indexed_images required (quantity: 1), eliminating the ambiguity entirely.

Related

The indexed_images link doc also contains a stale field name ('ordered_images' instead of 'order_of_images'), fixed in PR #695.

Activity

  1. oruebel commented on Jun 29, 2026

    @oruebel
    Contributor

    The NWB schema language has no native "at least one of" constraint

    Correct, we currently do not have a way to formally define constraints between multiple object, e.g., if A is missing B must be present and vice versa

  2. added
    priority: lowalternative solution already working and/or relevant to only specific user(s)
    on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: enhancementimprovements of code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions