Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit f49d376

Browse files
authored
turn each /execute url into /execution (#71)
1 parent b861bfb commit f49d376

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cads_api_client/processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def id(self) -> str:
198198
return process_id
199199

200200
def execute(self, inputs: dict[str, Any]) -> StatusInfo:
201-
url = f"{self.response.request.url}/execute"
201+
url = f"{self.response.request.url}/execution"
202202
return StatusInfo.from_request(
203203
"post", url, json={"inputs": inputs}, **self.request_kwargs
204204
)
@@ -518,7 +518,7 @@ def process_execute(
518518
process_id: str,
519519
inputs: dict[str, Any],
520520
) -> StatusInfo:
521-
url = f"{self.url}/processes/{process_id}/execute"
521+
url = f"{self.url}/processes/{process_id}/execution"
522522
return StatusInfo.from_request(
523523
"post", url, json={"inputs": inputs}, **self.request_kwargs
524524
)

tests/test_10_processing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"http://localhost:8080/api/catalogue/v1/collections/reanalysis-era5-pressure-levels"
2020
)
2121
PROCESS_URL = f"http://localhost:8080/api/retrieve/v1/processes/{COLLECTION_ID}"
22-
EXECUTE_URL = f"{PROCESS_URL}/execute"
22+
EXECUTE_URL = f"{PROCESS_URL}/execution"
2323

2424
JOB_RUNNING_URL = f"http://localhost:8080/api/retrieve/v1/jobs/{JOB_RUNNING_ID}"
2525
JOB_SUCCESSFUL_URL = f"http://localhost:8080/api/retrieve/v1/jobs/{JOB_SUCCESSFUL_ID}"
@@ -125,7 +125,7 @@
125125
{"href": COLLECTION_URL, "rel": "self", "type": "application/json"},
126126
{"rel": "retrieve", "href": PROCESS_URL, "type": "application/json"},
127127
{
128-
"href": f"{COLLECTION_URL}/execute",
128+
"href": f"{COLLECTION_URL}/execution",
129129
"rel": "execute",
130130
"type": "application/json",
131131
"title": "process execution",
@@ -186,7 +186,7 @@
186186
"updated": "2022-09-02T17:30:48.201217",
187187
"links": [
188188
{
189-
"href": f"{COLLECTION_URL}/execute",
189+
"href": f"{COLLECTION_URL}/execution",
190190
"rel": "self",
191191
"type": "application/json",
192192
},
@@ -476,7 +476,7 @@ def test_remote_logs(
476476
10,
477477
(
478478
"POST http://localhost:8080/api/retrieve/v1/processes/"
479-
"reanalysis-era5-pressure-levels/execute "
479+
"reanalysis-era5-pressure-levels/execution "
480480
"{'variable': 'temperature', 'year': '2022'}"
481481
),
482482
),

0 commit comments

Comments
 (0)