Add Dataset Info panel and metadata export#1688
Open
PaulHax wants to merge 3 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.datasetInfofield to the dataset metadata model (server + client).datasetInfointo the VIAME CSV# metadataheader as one nested JSON entry.