asdf-format/asdf

handle newline in schema contents returned for `info`

Opened this issue · 0 comments

See: #1687 (comment)
and #1686 (comment)

Schema contents displayed during info calls can result in breaks in formatting:

  │ ├─exposure (Exposure) # Exposure information

  │ │ ├─id (int): 1 # Exposure id number within visit
  │ │ ├─type (str): WFI_IMAGE
  │ │ ├─start_time (Time) # UTC exposure start time

From this schema:
https://github.com/spacetelescope/rad/blob/186144b27f05bf654b5cab2331fb66d15f932cb1/src/rad/resources/schemas/exposure-1.0.0.yaml#L7

Investigate additional schema contents cleanup prior to display for info calls. Specifically:

  • should "info" be allowed to span multiple lines?
  • as lines are already "(truncated)" when they exceed "max_cols" should we separately truncate the "info"