Skip to content

Commit 27e2485

Browse files
Merge branch 'master' into add-project-grouping-for-task-manager
2 parents 731bc9e + 0fc43f7 commit 27e2485

File tree

68 files changed

+785
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+785
-127
lines changed

packages/aws-library/requirements/_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ flexparser==0.4
8484
# via pint
8585
graphql-core==3.2.6
8686
# via moto
87-
h11==0.14.0
87+
h11==0.16.0
8888
# via httpcore
89-
httpcore==1.0.7
89+
httpcore==1.0.9
9090
# via httpx
9191
httpx==0.28.1
9292
# via

packages/models-library/src/models_library/api_schemas_rpc_async_jobs/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class BaseAsyncjobRpcError(OsparcErrorMixin, RuntimeError):
66

77

88
class JobSchedulerError(BaseAsyncjobRpcError):
9-
msg_template: str = "Celery exception: {exc}"
9+
msg_template: str = "Async job scheduler exception: {exc}"
1010

1111

1212
class JobMissingError(BaseAsyncjobRpcError):
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# pylint: disable=unused-argument
2+
3+
from dataclasses import dataclass
4+
5+
from models_library.api_schemas_rpc_async_jobs.async_jobs import (
6+
AsyncJobGet,
7+
AsyncJobId,
8+
AsyncJobNameData,
9+
AsyncJobResult,
10+
AsyncJobStatus,
11+
)
12+
from models_library.api_schemas_rpc_async_jobs.exceptions import BaseAsyncjobRpcError
13+
from models_library.progress_bar import ProgressReport
14+
from models_library.rabbitmq_basic_types import RPCNamespace
15+
from pydantic import validate_call
16+
from pytest_mock import MockType
17+
from servicelib.rabbitmq._client_rpc import RabbitMQRPCClient
18+
19+
20+
@dataclass
21+
class AsyncJobSideEffects:
22+
exception: BaseAsyncjobRpcError | None = None
23+
24+
@validate_call(config={"arbitrary_types_allowed": True})
25+
async def cancel(
26+
self,
27+
rabbitmq_rpc_client: RabbitMQRPCClient | MockType,
28+
*,
29+
rpc_namespace: RPCNamespace,
30+
job_id: AsyncJobId,
31+
job_id_data: AsyncJobNameData,
32+
) -> None:
33+
if self.exception is not None:
34+
raise self.exception
35+
return None
36+
37+
@validate_call(config={"arbitrary_types_allowed": True})
38+
async def status(
39+
self,
40+
rabbitmq_rpc_client: RabbitMQRPCClient | MockType,
41+
*,
42+
rpc_namespace: RPCNamespace,
43+
job_id: AsyncJobId,
44+
job_id_data: AsyncJobNameData,
45+
) -> AsyncJobStatus:
46+
if self.exception is not None:
47+
raise self.exception
48+
49+
return AsyncJobStatus(
50+
job_id=job_id,
51+
progress=ProgressReport(
52+
actual_value=50.0,
53+
total=100.0,
54+
attempt=1,
55+
),
56+
done=False,
57+
)
58+
59+
@validate_call(config={"arbitrary_types_allowed": True})
60+
async def result(
61+
self,
62+
rabbitmq_rpc_client: RabbitMQRPCClient | MockType,
63+
*,
64+
rpc_namespace: RPCNamespace,
65+
job_id: AsyncJobId,
66+
job_id_data: AsyncJobNameData,
67+
) -> AsyncJobResult:
68+
if self.exception is not None:
69+
raise self.exception
70+
return AsyncJobResult(result="Success")
71+
72+
@validate_call(config={"arbitrary_types_allowed": True})
73+
async def list_jobs(
74+
self,
75+
rabbitmq_rpc_client: RabbitMQRPCClient | MockType,
76+
*,
77+
rpc_namespace: RPCNamespace,
78+
job_id_data: AsyncJobNameData,
79+
filter_: str = "",
80+
) -> list[AsyncJobGet]:
81+
if self.exception is not None:
82+
raise self.exception
83+
return [
84+
AsyncJobGet(
85+
job_id=AsyncJobId("123e4567-e89b-12d3-a456-426614174000"),
86+
job_name="Example Job",
87+
)
88+
]

packages/service-integration/requirements/_base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jinja2_time
1313
jsonschema # pytest-plugin
1414
pytest # pytest-plugin
1515
pyyaml
16-
typer[all]
16+
typer
1717
yarl

packages/service-library/requirements/_fastapi.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ fastapi-cli==0.0.7
3232
# via fastapi
3333
fastapi-lifespan-manager==0.1.4
3434
# via -r requirements/_fastapi.in
35-
h11==0.14.0
35+
h11==0.16.0
3636
# via
3737
# httpcore
3838
# uvicorn
3939
h2==4.2.0
4040
# via httpx
4141
hpack==4.1.0
4242
# via h2
43-
httpcore==1.0.7
43+
httpcore==1.0.9
4444
# via httpx
4545
httptools==0.6.4
4646
# via uvicorn

packages/service-library/requirements/_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ greenlet==3.1.1
6565
# via
6666
# -c requirements/_aiohttp.txt
6767
# sqlalchemy
68-
h11==0.14.0
68+
h11==0.16.0
6969
# via
7070
# -c requirements/_fastapi.txt
7171
# httpcore
72-
httpcore==1.0.7
72+
httpcore==1.0.9
7373
# via
7474
# -c requirements/_fastapi.txt
7575
# httpx

scripts/metrics/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
black
22
httpx[http2]
3-
pydantic[email,dotenv]
3+
pydantic[email]
44
pylint
5-
typer[all]
5+
typer

scripts/release/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version = "1.2.3"
88
authors = [{name="Matus Drobuliak", email="[email protected]" }]
99
description = "Helper script for monitoring releases"
1010
readme = "README.md"
11-
dependencies = ["arrow", "python-dotenv","pydantic", "pydantic-settings", "typer[all]>=0.9", "rich", "requests"]
11+
dependencies = ["arrow", "python-dotenv","pydantic", "pydantic-settings", "typer>=0.9", "rich", "requests"]
1212
requires-python = ">=3.10"
1313

1414
[project.scripts]

services/agent/requirements/_base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ googleapis-common-protos==1.69.1
112112
# opentelemetry-exporter-otlp-proto-http
113113
grpcio==1.70.0
114114
# via opentelemetry-exporter-otlp-proto-grpc
115-
h11==0.14.0
115+
h11==0.16.0
116116
# via
117117
# httpcore
118118
# uvicorn
119119
h2==4.2.0
120120
# via httpx
121121
hpack==4.1.0
122122
# via h2
123-
httpcore==1.0.7
123+
httpcore==1.0.9
124124
# via httpx
125125
httptools==0.6.4
126126
# via uvicorn

services/agent/requirements/_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ frozenlist==1.5.0
102102
# aiosignal
103103
graphql-core==3.2.6
104104
# via moto
105-
h11==0.14.0
105+
h11==0.16.0
106106
# via
107107
# -c requirements/_base.txt
108108
# httpcore
109-
httpcore==1.0.7
109+
httpcore==1.0.9
110110
# via
111111
# -c requirements/_base.txt
112112
# httpx

0 commit comments

Comments
 (0)