Skip to content

Commit 32dca18

Browse files
Merge pull request #180 from ecmwf-projects/execute-model
Execute model
2 parents 09818b7 + 4dc4a88 commit 32dca18

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cads_processing_api_service/clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def get_process(
167167
def post_process_execution(
168168
self,
169169
process_id: str = fastapi.Path(...),
170-
execution_content: ogc_api_processes_fastapi.models.Execute = fastapi.Body(...),
170+
execution_content: models.Execute = fastapi.Body(...),
171171
auth_header: tuple[str, str] = fastapi.Depends(auth.get_auth_header),
172172
portal_header: str | None = fastapi.Header(
173173
None, alias=config.PORTAL_HEADER_NAME

cads_processing_api_service/costing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
import cads_adaptors
2020
import cads_catalogue
2121
import fastapi
22-
import ogc_api_processes_fastapi.models
2322

2423
from . import adaptors, costing, db_utils, models, utils
2524

2625

2726
def estimate_costs(
2827
process_id: str = fastapi.Path(...),
29-
request: ogc_api_processes_fastapi.models.Execute = fastapi.Body(...),
28+
request: models.Execute = fastapi.Body(...),
3029
) -> models.Costing:
3130
table = cads_catalogue.database.Resource
3231
catalogue_sessionmaker = db_utils.get_catalogue_sessionmaker(

cads_processing_api_service/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ class Costing(pydantic.BaseModel):
6363
costs: dict[str, float] | None = None
6464
max_costs: dict[str, float] | None = None
6565
max_costs_exceeded: dict[str, float] | None = None
66+
67+
68+
class Execute(ogc_api_processes_fastapi.models.Execute):
69+
inputs: dict[str, Any] | None = None

0 commit comments

Comments
 (0)