From 336fc874ec7c7c618133959ddc0d7ad58047970c Mon Sep 17 00:00:00 2001 From: Martin Voigt Date: Mon, 30 Jan 2023 11:34:09 +0100 Subject: [PATCH] Rename update_dataset() to datasets_update() in client. --- pyscicat/client.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyscicat/client.py b/pyscicat/client.py index d381e1f..9d3e05a 100644 --- a/pyscicat/client.py +++ b/pyscicat/client.py @@ -211,7 +211,7 @@ def datasets_raw_replace(self, dataset: Dataset) -> str: This function was renamed. It is still accessible with the original name for backward compatibility The original names were repalce_raw_dataset and upload_raw_dataset - THis function is obsolete and it will be removed in future releases + This function is obsolete and it will be removed in future releases Parameters ---------- @@ -272,8 +272,11 @@ def datasets_derived_replace(self, dataset: Dataset) -> str: operation="datasets_derived_replace", ).get("pid") - def update_dataset(self, dataset: Dataset, pid: str) -> str: + def datasets_update(self, dataset: Dataset, pid: str) -> str: """Updates an existing dataset + This function was renamed. + It is still accessible with the original name for backward compatibility + The original name was update_dataset. Parameters ---------- @@ -296,9 +299,15 @@ def update_dataset(self, dataset: Dataset, pid: str) -> str: cmd="patch", endpoint=f"Datasets/{quote_plus(pid)}", data=dataset, - operation="update_dataset", + operation="datasets_update", ).get("pid") + """ + Update a dataset + Original name, kept for for backward compatibility + """ + update_dataset = datasets_update + def datasets_datablock_create( self, datablock: Datablock, datasetType: str = "RawDatasets" ) -> dict: