Skip to content

Commit b0a4e5f

Browse files
author
Andrei Neagu
committed
Merge remote-tracking branch 'upstream/master' into pr-osparc-fix-pulling-with-progress-reset
2 parents a4a2526 + 70e88e8 commit b0a4e5f

File tree

225 files changed

+3742
-2341
lines changed

Some content is hidden

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

225 files changed

+3742
-2341
lines changed

.env-devel

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ DYNAMIC_SCHEDULER_UI_STORAGE_SECRET=adminadmin
133133

134134
FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]", "affiliation": "unknown"}}'
135135

136+
WEBSERVER_LICENSES={}
137+
LICENSES_ITIS_VIP_SYNCER_ENABLED=false
138+
LICENSES_ITIS_VIP_API_URL=https://replace-with-itis-api/{category}
139+
LICENSES_ITIS_VIP_CATEGORIES='{"HumanWholeBody": "Humans", "HumanBodyRegion": "Humans (Region)", "AnimalWholeBody": "Animal"}'
140+
LICENSES_SPEAG_PHANTOMS_API_URL=https://replace-with-speag-api/{category}
141+
LICENSES_SPEAG_PHANTOMS_CATEGORIES='{"ComputationalPhantom": "Phantom of the Opera"}'
142+
136143
# Can use 'docker run -it itisfoundation/invitations:latest simcore-service-invitations generate-dotenv --auto-password'
137144
INVITATIONS_DEFAULT_PRODUCT=osparc
138145
INVITATIONS_HOST=invitations
@@ -371,7 +378,6 @@ WEBSERVER_GARBAGE_COLLECTOR=null
371378
WEBSERVER_GROUPS=1
372379
WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180
373380
WEBSERVER_HOST=webserver
374-
WEBSERVER_LICENSES=true
375381
WEBSERVER_LOGIN={}
376382
WEBSERVER_LOGLEVEL=INFO
377383
WEBSERVER_META_MODELING=1

.github/workflows/ci-testing-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Check openapi specs are up to date
4040
run: |
4141
if ! ./ci/github/helpers/openapi-specs-diff.bash diff \
42-
https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.after }} \
42+
https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/${{ github.event.pull_request.head.sha }} \
4343
.; then \
4444
echo "::error:: OAS are not up to date. Run 'make openapi-specs' to update them"; exit 1; \
4545
fi

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

Lines changed: 66 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from models_library.rpc_pagination import PageRpc
55
from pydantic import BaseModel, ConfigDict, Field, HttpUrl, NonNegativeInt
6+
from pydantic.config import JsonDict
67

78
from ..boot_options import BootOptions
89
from ..emails import LowerCaseEmailStr
@@ -21,60 +22,6 @@
2122
from ..services_types import ServiceKey, ServiceVersion
2223
from ..utils.change_case import snake_to_camel
2324

24-
25-
class ServiceUpdate(ServiceMetaDataEditable, ServiceAccessRights):
26-
model_config = ConfigDict(
27-
json_schema_extra={
28-
"example": {
29-
# ServiceAccessRights
30-
"accessRights": {
31-
1: {
32-
"execute_access": False,
33-
"write_access": False,
34-
}, # type: ignore[dict-item]
35-
2: {
36-
"execute_access": True,
37-
"write_access": True,
38-
}, # type: ignore[dict-item]
39-
44: {
40-
"execute_access": False,
41-
"write_access": False,
42-
}, # type: ignore[dict-item]
43-
},
44-
# ServiceMetaData = ServiceCommonData +
45-
"name": "My Human Readable Service Name",
46-
"thumbnail": None,
47-
"description": "An interesting service that does something",
48-
"classifiers": ["RRID:SCR_018997", "RRID:SCR_019001"],
49-
"quality": {
50-
"tsr": {
51-
"r01": {"level": 3, "references": ""},
52-
"r02": {"level": 2, "references": ""},
53-
"r03": {"level": 0, "references": ""},
54-
"r04": {"level": 0, "references": ""},
55-
"r05": {"level": 2, "references": ""},
56-
"r06": {"level": 0, "references": ""},
57-
"r07": {"level": 0, "references": ""},
58-
"r08": {"level": 1, "references": ""},
59-
"r09": {"level": 0, "references": ""},
60-
"r10": {"level": 0, "references": ""},
61-
},
62-
"enabled": True,
63-
"annotations": {
64-
"vandv": "",
65-
"purpose": "",
66-
"standards": "",
67-
"limitations": "",
68-
"documentation": "",
69-
"certificationLink": "",
70-
"certificationStatus": "Uncertified",
71-
},
72-
},
73-
}
74-
}
75-
)
76-
77-
7825
_EXAMPLE_FILEPICKER: dict[str, Any] = {
7926
"name": "File Picker",
8027
"thumbnail": None,
@@ -209,10 +156,14 @@ class ServiceGet(
209156
description="None when the owner email cannot be found in the database"
210157
)
211158

159+
@staticmethod
160+
def _update_json_schema_extra(schema: JsonDict) -> None:
161+
schema.update({"examples": [_EXAMPLE_FILEPICKER, _EXAMPLE_SLEEPER]})
162+
212163
model_config = ConfigDict(
213164
extra="ignore",
214165
populate_by_name=True,
215-
json_schema_extra={"examples": [_EXAMPLE_FILEPICKER, _EXAMPLE_SLEEPER]},
166+
json_schema_extra=_update_json_schema_extra,
216167
)
217168

218169

@@ -254,62 +205,70 @@ class ServiceGetV2(BaseModel):
254205
json_schema_extra={"default": []},
255206
)
256207

208+
@staticmethod
209+
def _update_json_schema_extra(schema: JsonDict) -> None:
210+
schema.update(
211+
{
212+
"examples": [
213+
{
214+
**_EXAMPLE_SLEEPER, # v2.2.1 (latest)
215+
"history": [
216+
{
217+
"version": _EXAMPLE_SLEEPER["version"],
218+
"version_display": "Summer Release",
219+
"released": "2024-07-20T15:00:00",
220+
},
221+
{
222+
"version": "2.0.0",
223+
"compatibility": {
224+
"canUpdateTo": {
225+
"version": _EXAMPLE_SLEEPER["version"]
226+
},
227+
},
228+
},
229+
{"version": "0.9.11"},
230+
{"version": "0.9.10"},
231+
{
232+
"version": "0.9.8",
233+
"compatibility": {
234+
"canUpdateTo": {"version": "0.9.11"},
235+
},
236+
},
237+
{
238+
"version": "0.9.1",
239+
"versionDisplay": "Matterhorn",
240+
"released": "2024-01-20T18:49:17",
241+
"compatibility": {
242+
"can_update_to": {"version": "0.9.11"},
243+
},
244+
},
245+
{
246+
"version": "0.9.0",
247+
"retired": "2024-07-20T15:00:00",
248+
},
249+
{"version": "0.8.0"},
250+
{"version": "0.1.0"},
251+
],
252+
},
253+
{
254+
**_EXAMPLE_FILEPICKER_V2,
255+
"history": [
256+
{
257+
"version": _EXAMPLE_FILEPICKER_V2["version"],
258+
"version_display": "Odei Release",
259+
"released": "2025-03-25T00:00:00",
260+
}
261+
],
262+
},
263+
]
264+
}
265+
)
266+
257267
model_config = ConfigDict(
258268
extra="forbid",
259269
populate_by_name=True,
260270
alias_generator=snake_to_camel,
261-
json_schema_extra={
262-
"examples": [
263-
{
264-
**_EXAMPLE_SLEEPER, # v2.2.1 (latest)
265-
"history": [
266-
{
267-
"version": _EXAMPLE_SLEEPER["version"],
268-
"version_display": "Summer Release",
269-
"released": "2024-07-20T15:00:00",
270-
},
271-
{
272-
"version": "2.0.0",
273-
"compatibility": {
274-
"canUpdateTo": {"version": _EXAMPLE_SLEEPER["version"]},
275-
},
276-
},
277-
{"version": "0.9.11"},
278-
{"version": "0.9.10"},
279-
{
280-
"version": "0.9.8",
281-
"compatibility": {
282-
"canUpdateTo": {"version": "0.9.11"},
283-
},
284-
},
285-
{
286-
"version": "0.9.1",
287-
"versionDisplay": "Matterhorn",
288-
"released": "2024-01-20T18:49:17",
289-
"compatibility": {
290-
"can_update_to": {"version": "0.9.11"},
291-
},
292-
},
293-
{
294-
"version": "0.9.0",
295-
"retired": "2024-07-20T15:00:00",
296-
},
297-
{"version": "0.8.0"},
298-
{"version": "0.1.0"},
299-
],
300-
},
301-
{
302-
**_EXAMPLE_FILEPICKER_V2,
303-
"history": [
304-
{
305-
"version": _EXAMPLE_FILEPICKER_V2["version"],
306-
"version_display": "Odei Release",
307-
"released": "2025-03-25T00:00:00",
308-
}
309-
],
310-
},
311-
]
312-
},
271+
json_schema_extra=_update_json_schema_extra,
313272
)
314273

315274

packages/models-library/src/models_library/api_schemas_resource_usage_tracker/licensed_items_checkouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from datetime import datetime
22
from typing import NamedTuple
33

4-
from models_library.licensed_items import LicensedItemID
4+
from models_library.licenses import LicensedItemID
55
from models_library.products import ProductName
66
from models_library.resource_tracker_licensed_items_checkouts import (
77
LicensedItemCheckoutID,

packages/models-library/src/models_library/api_schemas_resource_usage_tracker/licensed_items_purchases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from decimal import Decimal
33
from typing import NamedTuple
44

5-
from models_library.licensed_items import LicensedItemID
5+
from models_library.licenses import LicensedItemID
66
from models_library.products import ProductName
77
from models_library.resource_tracker import PricingUnitCostId
88
from models_library.resource_tracker_licensed_items_purchases import (

0 commit comments

Comments
 (0)