SciCatProject / pyscicat

A python client library for interacting with the SciCat data catalog backend.
Other
0 stars 9 forks source link

Update dataset #23

Closed abigailalexander closed 2 years ago

abigailalexander commented 2 years ago

Following on from upsert_dataset not being supported in the new backend of scicat, I want to instead propose an update_dataset method that uses patch to update a dataset based on pid. This method would hopefully be compatible both with the current scicat and future scicat versions (taking a quick look at the new scicat backend, it looks like similar functionality still exists there using patch for updating datasets).

LAShemilt commented 2 years ago

Due to the fact that we cannot use instrument command programs to write data, we need to have some flexibility on the metadata generation to support the different workflows across our groups. This sometimes means having to append details to already generated datasets in Scicat. We would prefer in this scenario to use update_dataset rather than to check , insert a new data set and then delete the previous.

I hope that the update_dataset function would be a useful feature for other teams and won't break between the old and new versions.

dylanmcreynolds commented 2 years ago

Thanks for the PR! Since there has been no release of pyscicat since the upsert was added, I think it would be safe to delete rather than deprecate those methods.

abigailalexander commented 2 years ago

Thanks for the quick response, I'll remove them!