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

Abandon deprecated POST processes/.../execute endopoint #71

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cads_api_client/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def id(self) -> str:
return process_id

def execute(self, inputs: dict[str, Any]) -> StatusInfo:
url = f"{self.response.request.url}/execute"
url = f"{self.response.request.url}/execution"
return StatusInfo.from_request(
"post", url, json={"inputs": inputs}, **self.request_kwargs
)
Expand Down Expand Up @@ -518,7 +518,7 @@ def process_execute(
process_id: str,
inputs: dict[str, Any],
) -> StatusInfo:
url = f"{self.url}/processes/{process_id}/execute"
url = f"{self.url}/processes/{process_id}/execution"
return StatusInfo.from_request(
"post", url, json={"inputs": inputs}, **self.request_kwargs
)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_10_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"http://localhost:8080/api/catalogue/v1/collections/reanalysis-era5-pressure-levels"
)
PROCESS_URL = f"http://localhost:8080/api/retrieve/v1/processes/{COLLECTION_ID}"
EXECUTE_URL = f"{PROCESS_URL}/execute"
EXECUTE_URL = f"{PROCESS_URL}/execution"

JOB_RUNNING_URL = f"http://localhost:8080/api/retrieve/v1/jobs/{JOB_RUNNING_ID}"
JOB_SUCCESSFUL_URL = f"http://localhost:8080/api/retrieve/v1/jobs/{JOB_SUCCESSFUL_ID}"
Expand Down Expand Up @@ -125,7 +125,7 @@
{"href": COLLECTION_URL, "rel": "self", "type": "application/json"},
{"rel": "retrieve", "href": PROCESS_URL, "type": "application/json"},
{
"href": f"{COLLECTION_URL}/execute",
"href": f"{COLLECTION_URL}/execution",
"rel": "execute",
"type": "application/json",
"title": "process execution",
Expand Down Expand Up @@ -186,7 +186,7 @@
"updated": "2022-09-02T17:30:48.201217",
"links": [
{
"href": f"{COLLECTION_URL}/execute",
"href": f"{COLLECTION_URL}/execution",
"rel": "self",
"type": "application/json",
},
Expand Down Expand Up @@ -476,7 +476,7 @@ def test_remote_logs(
10,
(
"POST http://localhost:8080/api/retrieve/v1/processes/"
"reanalysis-era5-pressure-levels/execute "
"reanalysis-era5-pressure-levels/execution "
"{'variable': 'temperature', 'year': '2022'}"
),
),
Expand Down