Skip to content

Commit c12db38

Browse files
Merge remote-tracking branch 'upstream/master' into add-notifications-service
2 parents 5f03a50 + 1ec6ab7 commit c12db38

File tree

211 files changed

+3216
-2383
lines changed

Some content is hidden

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

211 files changed

+3216
-2383
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document provides guidelines and best practices for using GitHub Copilot in
1212

1313
## 🛠️Coding Instructions for Python in This Repository
1414

15-
Follow these rules strictly when generating Python code:
15+
Follow these rules **strictly** when generating Python code:
1616

1717
### 1. Python Version
1818

@@ -43,7 +43,7 @@ Ensure compatibility with the following library versions:
4343
* Use `f-string` formatting for all string interpolation except for logging message strings.
4444
* Use **relative imports** within the same package/module.
4545
* Place **all imports at the top** of the file.
46-
* Add comments **only when the code is not self-explanatory**.
46+
* Document functions when the code is not self-explanatory or if asked explicitly.
4747

4848

4949
### 6. **JSON Serialization**

api/specs/web-server/_computations.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
from models_library.api_schemas_webserver.computations import (
77
ComputationCollectionRunListQueryParams,
88
ComputationCollectionRunPathParams,
9+
ComputationCollectionRunRestGet,
910
ComputationCollectionRunTaskListQueryParams,
11+
ComputationCollectionRunTaskRestGet,
1012
ComputationGet,
1113
ComputationPathParams,
1214
ComputationRunIterationsLatestListQueryParams,
@@ -102,7 +104,7 @@ async def list_computations_latest_iteration_tasks(
102104

103105
@router.get(
104106
"/computation-collection-runs",
105-
response_model=Page[ComputationTaskRestGet],
107+
response_model=Page[ComputationCollectionRunRestGet],
106108
)
107109
async def list_computation_collection_runs(
108110
_query: Annotated[as_query(ComputationCollectionRunListQueryParams), Depends()],
@@ -111,7 +113,7 @@ async def list_computation_collection_runs(
111113

112114
@router.get(
113115
"/computation-collection-runs/{collection_run_id}/tasks",
114-
response_model=Page[ComputationTaskRestGet],
116+
response_model=Page[ComputationCollectionRunTaskRestGet],
115117
)
116118
async def list_computation_collection_run_tasks(
117119
_query: Annotated[as_query(ComputationCollectionRunTaskListQueryParams), Depends()],

api/specs/web-server/_users.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@
1414
MyProfilePatch,
1515
MyTokenCreate,
1616
MyTokenGet,
17+
TokenPathParams,
1718
UserGet,
1819
UsersSearch,
1920
)
2021
from models_library.api_schemas_webserver.users_preferences import PatchRequestBody
2122
from models_library.generics import Envelope
2223
from models_library.user_preferences import PreferenceIdentifier
2324
from simcore_service_webserver._meta import API_VTAG
24-
from simcore_service_webserver.users._notifications import (
25+
from simcore_service_webserver.user_notifications._controller.rest.user_notification_rest import (
26+
NotificationPathParams,
27+
)
28+
from simcore_service_webserver.user_notifications._models import (
2529
UserNotification,
2630
UserNotificationCreate,
2731
UserNotificationPatch,
2832
)
29-
from simcore_service_webserver.users._notifications_rest import _NotificationPathParams
30-
from simcore_service_webserver.users._tokens_rest import _TokenPathParams
3133

3234
router = APIRouter(prefix=f"/{API_VTAG}", tags=["users"])
3335

@@ -76,15 +78,15 @@ async def create_token(_body: MyTokenCreate): ...
7678
response_model=Envelope[MyTokenGet],
7779
)
7880
async def get_token(
79-
_path: Annotated[_TokenPathParams, Depends()],
81+
_path: Annotated[TokenPathParams, Depends()],
8082
): ...
8183

8284

8385
@router.delete(
8486
"/me/tokens/{service}",
8587
status_code=status.HTTP_204_NO_CONTENT,
8688
)
87-
async def delete_token(_path: Annotated[_TokenPathParams, Depends()]): ...
89+
async def delete_token(_path: Annotated[TokenPathParams, Depends()]): ...
8890

8991

9092
@router.get(
@@ -108,7 +110,7 @@ async def create_user_notification(
108110
status_code=status.HTTP_204_NO_CONTENT,
109111
)
110112
async def mark_notification_as_read(
111-
_path: Annotated[_NotificationPathParams, Depends()],
113+
_path: Annotated[NotificationPathParams, Depends()],
112114
_body: UserNotificationPatch,
113115
): ...
114116

ci/helpers/requirements/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pydantic==2.10.5
4545
# fastapi
4646
pydantic-core==2.27.2
4747
# via pydantic
48-
requests==2.32.3
48+
requests==2.32.4
4949
# via docker
5050
sniffio==1.3.1
5151
# via anyio
@@ -58,7 +58,7 @@ typing-extensions==4.14.1
5858
# fastapi
5959
# pydantic
6060
# pydantic-core
61-
urllib3==2.3.0
61+
urllib3==2.5.0
6262
# via
6363
# -c requirements/../../../requirements/constraints.txt
6464
# docker

packages/aws-library/requirements/_base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ referencing==0.35.1
354354
# -c requirements/../../../requirements/constraints.txt
355355
# jsonschema
356356
# jsonschema-specifications
357-
requests==2.32.3
357+
requests==2.32.4
358358
# via opentelemetry-exporter-otlp-proto-http
359359
rich==13.9.4
360360
# via
@@ -417,7 +417,7 @@ typing-extensions==4.14.1
417417
# types-aiobotocore-ec2
418418
# types-aiobotocore-s3
419419
# types-aiobotocore-ssm
420-
urllib3==2.3.0
420+
urllib3==2.5.0
421421
# via
422422
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
423423
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt

packages/aws-library/requirements/_test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ flask==3.1.0
7676
# via
7777
# flask-cors
7878
# moto
79-
flask-cors==5.0.1
79+
flask-cors==6.0.1
8080
# via moto
8181
flexcache==0.3
8282
# via pint
@@ -104,7 +104,7 @@ iniconfig==2.0.0
104104
# via pytest
105105
itsdangerous==2.2.0
106106
# via flask
107-
jinja2==3.1.5
107+
jinja2==3.1.6
108108
# via
109109
# -c requirements/../../../requirements/constraints.txt
110110
# flask
@@ -245,7 +245,7 @@ referencing==0.35.1
245245
# jsonschema-specifications
246246
regex==2024.11.6
247247
# via cfn-lint
248-
requests==2.32.3
248+
requests==2.32.4
249249
# via
250250
# -c requirements/_base.txt
251251
# docker
@@ -317,7 +317,7 @@ typing-extensions==4.14.1
317317
# types-boto3
318318
tzdata==2025.1
319319
# via faker
320-
urllib3==2.3.0
320+
urllib3==2.5.0
321321
# via
322322
# -c requirements/../../../requirements/constraints.txt
323323
# -c requirements/_base.txt

packages/celery-library/requirements/_base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ referencing==0.35.1
341341
# -c requirements/../../../requirements/constraints.txt
342342
# jsonschema
343343
# jsonschema-specifications
344-
requests==2.32.3
344+
requests==2.32.4
345345
# via opentelemetry-exporter-otlp-proto-http
346346
rich==14.0.0
347347
# via
@@ -392,7 +392,7 @@ typing-inspection==0.4.0
392392
# via pydantic
393393
tzdata==2025.2
394394
# via kombu
395-
urllib3==2.4.0
395+
urllib3==2.5.0
396396
# via
397397
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
398398
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt

packages/celery-library/requirements/_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pyyaml==6.0.2
156156
# -c requirements/../../../requirements/constraints.txt
157157
# -c requirements/_base.txt
158158
# -r requirements/_test.in
159-
requests==2.32.3
159+
requests==2.32.4
160160
# via
161161
# -c requirements/_base.txt
162162
# docker
@@ -188,7 +188,7 @@ tzdata==2025.2
188188
# -c requirements/_base.txt
189189
# faker
190190
# kombu
191-
urllib3==2.4.0
191+
urllib3==2.5.0
192192
# via
193193
# -c requirements/../../../requirements/constraints.txt
194194
# -c requirements/_base.txt

packages/dask-task-models-library/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ typing-extensions==4.14.1
172172
# typing-inspection
173173
typing-inspection==0.4.0
174174
# via pydantic
175-
urllib3==2.4.0
175+
urllib3==2.5.0
176176
# via
177177
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
178178
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from models_library.rest_filters import Filters
1212
from models_library.rest_pagination import PageQueryParameters
1313
from pydantic import (
14+
BaseModel,
1415
ConfigDict,
1516
EmailStr,
1617
Field,
@@ -334,6 +335,10 @@ def _consistency_check(cls, v, info: ValidationInfo):
334335
#
335336

336337

338+
class TokenPathParams(BaseModel):
339+
service: str
340+
341+
337342
class MyTokenCreate(InputSchemaWithoutCamelCase):
338343
service: Annotated[
339344
IDStr,

0 commit comments

Comments
 (0)