Skip to content

Attributes/datasets with dtype: "text" and enumeration-like values described by doc can not be enforced #640

@ehennestad

Description

@ehennestad

Some attributes / datasets have a doc specification listing a set of "allowed" values when dtype: "text"

Examples
ImageSeries.format (dataset)

- name: format
dtype: text
default_value: raw
doc: Format of image. If this is 'external', then the attribute 'external_file'
contains the path information to the image files. If this is 'raw', then the raw
(single-channel) binary data is stored in the 'data' dataset. If this attribute
is not present, then the default format='raw' case is assumed.

Timeseries.data.continuity (attribute)

- name: continuity
dtype: text
doc: Optionally describe the continuity of the data. Can be "continuous", "instantaneous", or
"step". For example, a voltage trace would be "continuous", because samples
are recorded from a continuous process. An array of lick times would be "instantaneous",
because the data represents distinct moments in time. Times of image presentations would be
"step" because the picture remains the same until the next timepoint. This field is optional,
but is useful in providing information about the underlying data. It may inform the way this
data is interpreted, the way it is visualized, and what analysis methods are applicable.

I did a quick search and could not find any related issues, but I am wondering if it was ever disussed to add something like an enumeration key. So for example, the specification for ImageSeries.format could look like this:

  - name: format
    dtype: text
    default_value: raw
    enum: external, raw
    doc: Format of image. If this is 'external', then the attribute 'external_file'
      contains the path information to the image files. If this is 'raw', then the raw
      (single-channel) binary data is stored in the 'data' dataset. If this attribute
      is not present, then the default format='raw' case is assumed.

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