Skip to content

Add Dataset Info panel and metadata export#1688

Open
PaulHax wants to merge 3 commits into
mainfrom
dataset-info-panel
Open

Add Dataset Info panel and metadata export#1688
PaulHax wants to merge 3 commits into
mainfrom
dataset-info-panel

Conversation

@PaulHax

@PaulHax PaulHax commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Towards #1585. Associate dataset-level metadata (e.g. gfishsite_id, station info) with a dataset, display it, and carry it out to export so it can be re-linked downstream.

  • Adds a datasetInfo field to the dataset metadata model (server + client).
  • New Dataset Info sidebar panel: manual key/value entry and display, round-trips on web and desktop, with save-error retry.
  • Passes datasetInfo into the VIAME CSV # metadata header as one nested JSON entry.
image

PaulHax added 3 commits June 8, 2026 15:27
Introduce a free-form datasetInfo key/value map on mutable dataset
metadata. Thread it through the shared apispec type and
DatasetMetaMutableKeys, the server MetadataMutable Pydantic model, and
desktop JSON metadata persistence so custom metadata round-trips on both
web and desktop.
Add a sidebar panel that displays core dataset metadata (name, type,
fps, created date, id) and supports editable custom key/value metadata:
inline editing, keyboard-driven entry, expand-to-dialog for long values
via a reusable DatasetMetaEditorDialog, save-error handling with retry
and permission detection, and a read-only mode. Register it in the
context component map.
Thread the dataset's datasetInfo metadata into the VIAME CSV export on both
the server and desktop paths, emitting it as one nested JSON entry on the
'# metadata' comment line when non-empty (omitted entirely when empty, so
existing exports stay byte-unchanged).

Server: read datasetInfo from folder metadata in get_annotation_csv_generator
and thread it into export_tracks_as_csv. The existing key: json.dumps(value)
header formatting serializes the dict, preserving numeric fields.

Desktop: writeHeader reads meta.datasetInfo (a DatasetMetaMutableKeys member
that exportDataset already loads) and pushes a 'datasetInfo: <json>' entry onto
the '# metadata' row, emitting the row when fps OR datasetInfo is present.
Empty-check uses lodash isEmpty. Unknown '# metadata' keys are already ignored
on parse.
@PaulHax PaulHax requested a review from BryonLewis June 8, 2026 22:15
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