Skip to content

Commit a00bdfa

Browse files
Merge branch 'master' into is8102/add-search-api-in-storage
2 parents 2d564fc + 8f96782 commit a00bdfa

File tree

114 files changed

+3175
-992
lines changed

Some content is hidden

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

114 files changed

+3175
-992
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ local-registry: .env ## creates a local docker registry and configure simcore to
707707
--publish 5000:5000 \
708708
--volume $(LOCAL_REGISTRY_VOLUME):/var/lib/registry \
709709
--name $(LOCAL_REGISTRY_HOSTNAME) \
710-
registry:2)
710+
registry:3)
711711

712712
# WARNING: environment file .env is now setup to use local registry on port 5000 without any security (take care!)...
713713
@echo REGISTRY_AUTH=False >> .env

api/specs/web-server/_conversations.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
)
3333
from simcore_service_webserver.conversations._controller._conversations_rest import (
3434
_ConversationsCreateBodyParams,
35-
_GetConversationsQueryParams,
3635
_ListConversationsQueryParams,
3736
)
3837

@@ -56,7 +55,6 @@
5655
)
5756
async def create_conversation(
5857
_body: _ConversationsCreateBodyParams,
59-
_query: Annotated[_GetConversationsQueryParams, Depends()],
6058
): ...
6159

6260

@@ -69,14 +67,13 @@ async def list_conversations(
6967
): ...
7068

7169

72-
@router.put(
70+
@router.patch(
7371
"/conversations/{conversation_id}",
7472
response_model=Envelope[ConversationRestGet],
7573
)
7674
async def update_conversation(
7775
_params: Annotated[ConversationPathParams, Depends()],
7876
_body: ConversationPatch,
79-
_query: Annotated[as_query(_GetConversationsQueryParams), Depends()],
8077
): ...
8178

8279

@@ -86,7 +83,6 @@ async def update_conversation(
8683
)
8784
async def delete_conversation(
8885
_params: Annotated[ConversationPathParams, Depends()],
89-
_query: Annotated[as_query(_GetConversationsQueryParams), Depends()],
9086
): ...
9187

9288

@@ -96,7 +92,6 @@ async def delete_conversation(
9692
)
9793
async def get_conversation(
9894
_params: Annotated[ConversationPathParams, Depends()],
99-
_query: Annotated[as_query(_GetConversationsQueryParams), Depends()],
10095
): ...
10196

10297

packages/models-library/src/models_library/api_schemas_directorv2/dynamic_services_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from functools import cached_property
22
from pathlib import Path
3+
from typing import Annotated
34

45
from pydantic import BaseModel, ConfigDict, Field
56
from pydantic.config import JsonDict
@@ -89,6 +90,11 @@ class RunningDynamicServiceDetails(ServiceDetails):
8990
alias="service_message",
9091
)
9192

93+
is_collaborative: Annotated[
94+
bool,
95+
Field(description="True if service allows collaboration (multi-tenant access)"),
96+
] = False
97+
9298
@staticmethod
9399
def _update_json_schema_extra(schema: JsonDict) -> None:
94100
schema.update(

packages/models-library/src/models_library/api_schemas_webserver/conversations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import datetime
2-
from typing import Annotated, Self
2+
from typing import Annotated, Any, Self
33

44
from pydantic import Field
55

@@ -47,6 +47,7 @@ def from_domain_model(cls, domain: ConversationGetDB) -> Self:
4747

4848
class ConversationPatch(InputSchema):
4949
name: str | None = None
50+
extra_context: dict[str, Any] | None = None
5051

5152

5253
### CONVERSATION MESSAGES ---------------------------------------------------------------
Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pydantic import BaseModel, ConfigDict, ValidationInfo, field_validator
2+
from pydantic.config import JsonDict
23
from typing_extensions import ( # https://docs.pydantic.dev/latest/api/standard_library_types/#typeddict
34
TypedDict,
45
)
@@ -26,42 +27,46 @@ def ensure_default_included(cls, v, info: ValidationInfo):
2627
raise ValueError(msg)
2728
return v
2829

29-
model_config = ConfigDict(
30-
json_schema_extra={
31-
"examples": [
32-
{
33-
"label": "Boot mode",
34-
"description": "Start it in web page mode",
35-
"default": "0",
36-
"items": {
37-
"0": {
38-
"label": "Non Voila",
39-
"description": "Tooltip for non Voila boot mode",
40-
},
41-
"1": {
42-
"label": "Voila",
43-
"description": "Tooltip for Voila boot mode",
30+
@staticmethod
31+
def _update_json_schema_extra(schema: JsonDict) -> None:
32+
schema.update(
33+
{
34+
"examples": [
35+
{
36+
"label": "Boot mode",
37+
"description": "Start it in web page mode",
38+
"default": "0",
39+
"items": {
40+
"0": {
41+
"label": "Non Voila",
42+
"description": "Tooltip for non Voila boot mode",
43+
},
44+
"1": {
45+
"label": "Voila",
46+
"description": "Tooltip for Voila boot mode",
47+
},
4448
},
4549
},
46-
},
47-
{
48-
"label": "Application theme",
49-
"description": "Select a theme for the application",
50-
"default": "b",
51-
"items": {
52-
"a": {
53-
"label": "Clear",
54-
"description": "Using white background",
55-
},
56-
"b": {
57-
"label": "Dark",
58-
"description": "Using black and gray tones",
50+
{
51+
"label": "Application theme",
52+
"description": "Select a theme for the application",
53+
"default": "b",
54+
"items": {
55+
"a": {
56+
"label": "Clear",
57+
"description": "Using white background",
58+
},
59+
"b": {
60+
"label": "Dark",
61+
"description": "Using black and gray tones",
62+
},
5963
},
6064
},
61-
},
62-
]
63-
}
64-
)
65+
]
66+
}
67+
)
68+
69+
model_config = ConfigDict(json_schema_extra=_update_json_schema_extra)
6570

6671

6772
BootOptions = dict[EnvVarKey, BootOption]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class ConversationMessageGetDB(BaseModel):
7070

7171
class ConversationPatchDB(BaseModel):
7272
name: ConversationName | None = None
73+
extra_context: dict[str, Any] | None = None
7374

7475

7576
class ConversationMessagePatchDB(BaseModel):

0 commit comments

Comments
 (0)