From 72b31f4ee3f4a9055e15e5155db37f78c78de797 Mon Sep 17 00:00:00 2001 From: "Jeffrey N. Johnson" Date: Fri, 6 Feb 2026 15:57:46 -0800 Subject: [PATCH 1/2] Adds an `orcid` parameter to the DTS client's `cancel` method. --- dts/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dts/client.py b/dts/client.py index 966f11c..dcb5fae 100644 --- a/dts/client.py +++ b/dts/client.py @@ -389,7 +389,8 @@ def transfer_status(self: "Client", ) def cancel_transfer(self: "Client", - id: uuid.UUID) -> None: + id: uuid.UUID, + orcid: str) -> None: """Cancels a file transfer with the requested UUID. Status information for the cancelled transfer is retained for a time so its @@ -397,6 +398,7 @@ def cancel_transfer(self: "Client", Args: id: A UUID that uniquely identifies the transfer operation to be cancelled. + orcid: The ORCID of the user that initiated the transfer. Raises: RuntimeError: Indicates an issue with the DTS client and its connection to the server. @@ -406,7 +408,7 @@ def cancel_transfer(self: "Client", if not self.uri: raise RuntimeError('dts.Client: not connected.') try: - response = requests.delete(url=f'{self.uri}/transfers/{id}', + response = requests.delete(url=f'{self.uri}/transfers/{id}?orcid={orcid}', auth=self.auth) response.raise_for_status() except HTTPError as http_err: From 17d33b1156e2442f161a5b8d88749b6113975c71 Mon Sep 17 00:00:00 2001 From: "Jeffrey N. Johnson" Date: Fri, 6 Feb 2026 16:04:35 -0800 Subject: [PATCH 2/2] Using the production URL. It's been a while, I guess! --- test/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_client.py b/test/test_client.py index 6127bf7..95d35e5 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -12,7 +12,7 @@ def setUp(self): if not self.token: raise ValueError('Environment variable DTS_KBASE_DEV_TOKEN must be set!') self.orcid = os.getenv('DTS_KBASE_TEST_ORCID') - self.server = "https://lb-dts.staging.kbase.us" + self.server = "https://dts.kbase.us" def test_ctor(self): client = dts.Client(api_key = self.token, server = self.server)