Skip to content

Update dataset requires updating the entire dataset #58

@dylanmcreynolds

Description

@dylanmcreynolds

When doing an update I expected to be able to pass very minimal information to scicat. For instance, to change some metadata, my first try was calling client.update_dataset(Dataset(scientificMetadata= {"newkey":"newval"}, pid) . This fails because

  1. it lacks required python fields so it fails pydantic validation
  2. even after adding non-optional python members it fails backend validation due to some invalid defaults.

For updates is it expected that I first fetch the existing values, then submit an update with basically all fields filled? Do I need to manage "history" myself as well?

This is a limitation in the current pyscicat. The underlying method in the new backend is a patch method that has models for updates that make items optional. We should implement models for UpdateRawDatasetDto and UpdateDerivedDatasetDto and use those rather than the model for the dataset itself.

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