Skip to content

Suggestion: Use "default_value: null" for unused fields in IndexSeries #641

@ehennestad

Description

@ehennestad

In IndexSeries, the data attributes are not used, but the specification only states this in the doc.

attributes:
- name: conversion
dtype: float32
doc: This field is unused by IndexSeries.
required: false
- name: resolution
dtype: float32
doc: This field is unused by IndexSeries.
required: false
- name: offset
dtype: float32
doc: This field is unused by IndexSeries.
required: false
- name: unit
dtype: text
value: N/A
doc: This field is unused by IndexSeries and has the value N/A.

An alternative way to ensure the schema more explicitly enforces this is to set default_value: null for these attributes, similar to how value: N/A is already used for the unit attribute:

    attributes:
    - name: conversion
      doc: This field is unused by IndexSeries.
      default_value: null
    - name: resolution
      doc: This field is unused by IndexSeries.
      default_value: null
    - name: offset
      default_value: null
      doc: This field is unused by IndexSeries.
    - name: unit
      value: N/A
      doc: This field is unused by IndexSeries and has the value N/A.

Edit: Based on discussion, changed original suggestion of specifying value to specifying default_value instead

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