Skip to content

Commit 7ca6bce

Browse files
committed
reverts httpurl after tests
1 parent e6a8f18 commit 7ca6bce

File tree

5 files changed

+13
-21
lines changed

5 files changed

+13
-21
lines changed

services/api-server/src/simcore_service_api_server/api/routes/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async def get_upload_links(
261261
abort_url: URL = request.url_for("abort_multipart_upload", file_id=file_meta.id)
262262
upload_data: FileUploadData = FileUploadData(
263263
chunk_size=upload_links.chunk_size,
264-
urls=upload_links.urls,
264+
urls=upload_links.urls, # type: ignore[arg-type]
265265
links=UploadLinks(
266266
complete_upload=completion_url.path, abort_upload=abort_url.path
267267
),

services/api-server/src/simcore_service_api_server/models/schemas/jobs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from models_library.projects_nodes_io import NodeID
99
from models_library.projects_state import RunningState
1010
from pydantic import (
11-
AnyHttpUrl,
1211
BaseModel,
1312
ConfigDict,
1413
Field,
14+
HttpUrl,
1515
PositiveInt,
1616
StrictBool,
1717
StrictFloat,
@@ -153,7 +153,7 @@ class JobMetadata(BaseModel):
153153
metadata: dict[str, MetaValueType] = Field(..., description="Custom key-value map")
154154

155155
# Links
156-
url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
156+
url: Annotated[HttpUrl, UriSchema()] | None = Field(
157157
..., description="Link to get this resource (self)"
158158
)
159159

@@ -201,13 +201,13 @@ class Job(BaseModel):
201201
)
202202

203203
# Get links to other resources
204-
url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
204+
url: Annotated[HttpUrl, UriSchema()] | None = Field(
205205
..., description="Link to get this resource (self)"
206206
)
207-
runner_url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
207+
runner_url: Annotated[HttpUrl, UriSchema()] | None = Field(
208208
..., description="Link to the solver's job (parent collection)"
209209
)
210-
outputs_url: Annotated[AnyHttpUrl, UriSchema()] | None = Field(
210+
outputs_url: Annotated[HttpUrl, UriSchema()] | None = Field(
211211
..., description="Link to the job outputs (sub-collection)"
212212
)
213213

services/api-server/src/simcore_service_api_server/models/schemas/meta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from typing import Annotated
22

33
from models_library.api_schemas__common.meta import BaseMeta
4-
from pydantic import AnyHttpUrl, ConfigDict
4+
from pydantic import ConfigDict, HttpUrl
55
from simcore_service_api_server.models._utils_pydantic import UriSchema
66

77

88
class Meta(BaseMeta):
9-
docs_url: Annotated[AnyHttpUrl, UriSchema()]
10-
docs_dev_url: Annotated[AnyHttpUrl, UriSchema()]
9+
docs_url: Annotated[HttpUrl, UriSchema()]
10+
docs_dev_url: Annotated[HttpUrl, UriSchema()]
1111
model_config = ConfigDict(
1212
json_schema_extra={
1313
"example": {

services/api-server/src/simcore_service_api_server/models/schemas/solvers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from models_library.services import ServiceMetaDataPublished
77
from models_library.services_regex import COMPUTATIONAL_SERVICE_KEY_RE
88
from packaging.version import Version
9-
from pydantic import AnyHttpUrl, BaseModel, ConfigDict, Field, StringConstraints
9+
from pydantic import BaseModel, ConfigDict, Field, HttpUrl, StringConstraints
1010
from simcore_service_api_server.models._utils_pydantic import UriSchema
1111

1212
from ..api_resources import compose_resource_name
@@ -54,7 +54,7 @@ class Solver(BaseModel):
5454

5555
# Get links to other resources
5656
url: Annotated[
57-
Annotated[AnyHttpUrl, UriSchema()] | None,
57+
Annotated[HttpUrl, UriSchema()] | None,
5858
Field(..., description="Link to get this resource"),
5959
]
6060

services/api-server/src/simcore_service_api_server/services/director_v2.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,7 @@
77
from models_library.projects_nodes_io import NodeID
88
from models_library.projects_pipeline import ComputationTask
99
from models_library.projects_state import RunningState
10-
from pydantic import (
11-
AnyHttpUrl,
12-
AnyUrl,
13-
BaseModel,
14-
ConfigDict,
15-
Field,
16-
PositiveInt,
17-
TypeAdapter,
18-
)
10+
from pydantic import AnyHttpUrl, BaseModel, ConfigDict, Field, PositiveInt, TypeAdapter
1911
from settings_library.tracing import TracingSettings
2012
from starlette import status
2113

@@ -62,7 +54,7 @@ def guess_progress(self) -> PercentageInt:
6254

6355
class TaskLogFileGet(BaseModel):
6456
task_id: NodeID
65-
download_link: AnyUrl | None = Field(
57+
download_link: AnyHttpUrl | None = Field(
6658
None, description="Presigned link for log file or None if still not available"
6759
)
6860

0 commit comments

Comments
 (0)