Skip to content

Commit 373a319

Browse files
committed
updates
1 parent 9725b72 commit 373a319

File tree

2 files changed

+3
-65
lines changed

2 files changed

+3
-65
lines changed

packages/models-library/src/models_library/api_schemas_catalog/services.py

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import datetime
2-
from typing import Annotated, Any, TypeAlias
2+
from typing import Any, TypeAlias
33

44
from models_library.rpc_pagination import PageRpc
55
from pydantic import BaseModel, ConfigDict, Field, HttpUrl, NonNegativeInt
@@ -22,68 +22,6 @@
2222
from ..services_types import ServiceKey, ServiceVersion
2323
from ..utils.change_case import snake_to_camel
2424

25-
26-
class ServiceUpdate(ServiceMetaDataEditable, ServiceAccessRights):
27-
28-
thumbnail: Annotated[str, HttpUrl] | None = None
29-
icon: HttpUrl | None = None
30-
31-
@staticmethod
32-
def _update_json_schema_extra(schema: JsonDict) -> None:
33-
schema.update(
34-
{
35-
"example": {
36-
# ServiceAccessRights
37-
"accessRights": {
38-
1: {
39-
"execute_access": False,
40-
"write_access": False,
41-
}, # type: ignore[dict-item]
42-
2: {
43-
"execute_access": True,
44-
"write_access": True,
45-
}, # type: ignore[dict-item]
46-
44: {
47-
"execute_access": False,
48-
"write_access": False,
49-
}, # type: ignore[dict-item]
50-
},
51-
# ServiceMetaData = ServiceCommonData +
52-
"name": "My Human Readable Service Name",
53-
"thumbnail": None,
54-
"description": "An interesting service that does something",
55-
"classifiers": ["RRID:SCR_018997", "RRID:SCR_019001"],
56-
"quality": {
57-
"tsr": {
58-
"r01": {"level": 3, "references": ""},
59-
"r02": {"level": 2, "references": ""},
60-
"r03": {"level": 0, "references": ""},
61-
"r04": {"level": 0, "references": ""},
62-
"r05": {"level": 2, "references": ""},
63-
"r06": {"level": 0, "references": ""},
64-
"r07": {"level": 0, "references": ""},
65-
"r08": {"level": 1, "references": ""},
66-
"r09": {"level": 0, "references": ""},
67-
"r10": {"level": 0, "references": ""},
68-
},
69-
"enabled": True,
70-
"annotations": {
71-
"vandv": "",
72-
"purpose": "",
73-
"standards": "",
74-
"limitations": "",
75-
"documentation": "",
76-
"certificationLink": "",
77-
"certificationStatus": "Uncertified",
78-
},
79-
},
80-
}
81-
}
82-
)
83-
84-
model_config = ConfigDict(json_schema_extra=_update_json_schema_extra)
85-
86-
8725
_EXAMPLE_FILEPICKER: dict[str, Any] = {
8826
"name": "File Picker",
8927
"thumbnail": None,

packages/models-library/src/models_library/services_metadata_editable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
class ServiceMetaDataEditable(ServiceBaseDisplay):
2222
# Overrides ServiceBaseDisplay fields to Optional for a partial update
2323
name: str | None # type: ignore[assignment]
24-
thumbnail: Annotated[str, HttpUrl] | None # type: ignore[assignment]
25-
icon: HttpUrl | None # type: ignore[assignment]
24+
thumbnail: str | None
25+
icon: HttpUrl | None
2626
description: str | None # type: ignore[assignment]
2727
description_ui: bool = False
2828
version_display: str | None = None

0 commit comments

Comments
 (0)