Skip to content

Commit

Permalink
Rename update_dataset() to datasets_update() in client.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Voigt committed Jan 30, 2023
1 parent 1ee0bd3 commit 336fc87
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pyscicat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand All @@ -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:
Expand Down

0 comments on commit 336fc87

Please sign in to comment.