Skip to content

Commit 660d00c

Browse files
committed
Merge branch 'master' into 7634-opentelemetry-instrument-rpc-clients
2 parents 6036749 + 89f3caf commit 660d00c

File tree

337 files changed

+10662
-3886
lines changed

Some content is hidden

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

337 files changed

+10662
-3886
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ jobs:
109109
- 'mypy.ini'
110110
common-library:
111111
- 'packages/common-library/**'
112+
- 'packages/pytest-simcore/**'
113+
- 'services/docker-compose*'
114+
- 'scripts/mypy/*'
115+
- 'mypy.ini'
112116
notifications-library:
113117
- 'packages/notifications-library/**'
114118
- 'packages/postgres-database/**'
@@ -1695,7 +1699,11 @@ jobs:
16951699
with:
16961700
python-version: ${{ matrix.python }}
16971701
- name: install uv
1698-
uses: yezz123/setup-uv@v4
1702+
uses: astral-sh/setup-uv@v6
1703+
with:
1704+
version: "0.6.x"
1705+
enable-cache: false
1706+
cache-dependency-glob: "**/common-library/requirements/ci.txt"
16991707
- name: show system version
17001708
run: ./ci/helpers/show_system_versions.bash
17011709
- name: install
@@ -1705,6 +1713,9 @@ jobs:
17051713
- name: test
17061714
run: ./ci/github/unit-testing/common-library.bash test
17071715
- uses: codecov/codecov-action@v5
1716+
if: ${{ !cancelled() }}
1717+
env:
1718+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
17081719
with:
17091720
flags: unittests #optional
17101721

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"DevSoft.svg-viewer-vscode",
66
"eamodio.gitlens",
77
"exiasr.hadolint",
8-
"ms-azuretools.vscode-docker",
8+
"ms-azuretools.vscode-containers",
99
"ms-python.black-formatter",
1010
"ms-python.pylint",
1111
"ms-python.python",

api/specs/web-server/_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ async def email_confirmation(code: str):
260260

261261
@router.get(
262262
"/auth/captcha",
263-
operation_id="request_captcha",
263+
operation_id="create_captcha",
264264
status_code=status.HTTP_200_OK,
265265
responses={status.HTTP_200_OK: {"content": {"image/png": {}}}},
266266
)
267-
async def request_captcha(): ...
267+
async def create_captcha(): ...

api/specs/web-server/_computations.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
from models_library.api_schemas_webserver.computations import (
77
ComputationGet,
88
ComputationPathParams,
9+
ComputationRunIterationsLatestListQueryParams,
10+
ComputationRunIterationsListQueryParams,
911
ComputationRunPathParams,
1012
ComputationRunRestGet,
11-
ComputationRunWithFiltersListQueryParams,
1213
ComputationStart,
1314
ComputationStarted,
1415
ComputationTaskRestGet,
1516
)
1617
from models_library.generics import Envelope
1718
from simcore_service_webserver._meta import API_VTAG
1819
from simcore_service_webserver.director_v2._controller.computations_rest import (
19-
ComputationRunListQueryParams,
2020
ComputationTaskListQueryParams,
2121
ComputationTaskPathParams,
2222
)
@@ -71,7 +71,9 @@ async def stop_computation(_path: Annotated[ComputationPathParams, Depends()]):
7171
response_model=Page[ComputationRunRestGet],
7272
)
7373
async def list_computations_latest_iteration(
74-
_query: Annotated[as_query(ComputationRunWithFiltersListQueryParams), Depends()],
74+
_query: Annotated[
75+
as_query(ComputationRunIterationsLatestListQueryParams), Depends()
76+
],
7577
): ...
7678

7779

@@ -80,7 +82,7 @@ async def list_computations_latest_iteration(
8082
response_model=Page[ComputationRunRestGet],
8183
)
8284
async def list_computation_iterations(
83-
_query: Annotated[as_query(ComputationRunListQueryParams), Depends()],
85+
_query: Annotated[as_query(ComputationRunIterationsListQueryParams), Depends()],
8486
_path: Annotated[ComputationRunPathParams, Depends()],
8587
): ...
8688

api/specs/web-server/_functions.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# pylint: disable=protected-access
2+
# pylint: disable=redefined-outer-name
3+
# pylint: disable=too-many-arguments
4+
# pylint: disable=unused-argument
5+
# pylint: disable=unused-variable
6+
7+
8+
from typing import Annotated
9+
10+
from fastapi import APIRouter, Depends, status
11+
from models_library.api_schemas_webserver.functions import (
12+
FunctionToRegister,
13+
RegisteredFunctionGet,
14+
)
15+
from models_library.generics import Envelope
16+
from simcore_service_webserver._meta import API_VTAG
17+
from simcore_service_webserver.functions._controller._functions_rest_schemas import (
18+
FunctionPathParams,
19+
)
20+
21+
router = APIRouter(
22+
prefix=f"/{API_VTAG}",
23+
tags=[
24+
"functions",
25+
],
26+
)
27+
28+
29+
@router.post(
30+
"/functions",
31+
response_model=Envelope[RegisteredFunctionGet],
32+
)
33+
async def register_function(
34+
_body: FunctionToRegister,
35+
) -> Envelope[RegisteredFunctionGet]: ...
36+
37+
38+
@router.get(
39+
"/functions/{function_id}",
40+
response_model=Envelope[RegisteredFunctionGet],
41+
)
42+
async def get_function(
43+
_path: Annotated[FunctionPathParams, Depends()],
44+
): ...
45+
46+
47+
@router.delete(
48+
"/functions/{function_id}",
49+
status_code=status.HTTP_204_NO_CONTENT,
50+
)
51+
async def delete_function(
52+
_path: Annotated[FunctionPathParams, Depends()],
53+
): ...

api/specs/web-server/_users.py

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@
77
from enum import Enum
88
from typing import Annotated
99

10+
from _common import as_query
1011
from fastapi import APIRouter, Depends, status
1112
from models_library.api_schemas_webserver.users import (
1213
MyPermissionGet,
1314
MyProfileGet,
1415
MyProfilePatch,
1516
MyTokenCreate,
1617
MyTokenGet,
17-
UserForAdminGet,
18+
UserAccountApprove,
19+
UserAccountGet,
20+
UserAccountReject,
21+
UserAccountSearchQueryParams,
1822
UserGet,
19-
UsersForAdminSearchQueryParams,
23+
UsersAccountListQueryParams,
2024
UsersSearch,
2125
)
2226
from models_library.api_schemas_webserver.users_preferences import PatchRequestBody
2327
from models_library.generics import Envelope
28+
from models_library.rest_pagination import Page
2429
from models_library.user_preferences import PreferenceIdentifier
2530
from simcore_service_webserver._meta import API_VTAG
2631
from simcore_service_webserver.users._common.schemas import PreRegisteredUserGet
@@ -144,20 +149,46 @@ async def search_users(_body: UsersSearch): ...
144149

145150

146151
@router.get(
147-
"/admin/users:search",
148-
response_model=Envelope[list[UserForAdminGet]],
152+
"/admin/user-accounts",
153+
response_model=Page[UserAccountGet],
149154
tags=_extra_tags,
150155
)
151-
async def search_users_for_admin(
152-
_query: Annotated[UsersForAdminSearchQueryParams, Depends()],
156+
async def list_users_accounts(
157+
_query: Annotated[as_query(UsersAccountListQueryParams), Depends()],
158+
): ...
159+
160+
161+
@router.post(
162+
"/admin/user-accounts:approve",
163+
status_code=status.HTTP_204_NO_CONTENT,
164+
tags=_extra_tags,
165+
)
166+
async def approve_user_account(_body: UserAccountApprove): ...
167+
168+
169+
@router.post(
170+
"/admin/user-accounts:reject",
171+
status_code=status.HTTP_204_NO_CONTENT,
172+
tags=_extra_tags,
173+
)
174+
async def reject_user_account(_body: UserAccountReject): ...
175+
176+
177+
@router.get(
178+
"/admin/user-accounts:search",
179+
response_model=Envelope[list[UserAccountGet]],
180+
tags=_extra_tags,
181+
)
182+
async def search_user_accounts(
183+
_query: Annotated[UserAccountSearchQueryParams, Depends()],
153184
):
154185
# NOTE: see `Search` in `Common Custom Methods` in https://cloud.google.com/apis/design/custom_methods
155186
...
156187

157188

158189
@router.post(
159-
"/admin/users:pre-register",
160-
response_model=Envelope[UserForAdminGet],
190+
"/admin/user-accounts:pre-register",
191+
response_model=Envelope[UserAccountGet],
161192
tags=_extra_tags,
162193
)
163-
async def pre_register_user_for_admin(_body: PreRegisteredUserGet): ...
194+
async def pre_register_user_account(_body: PreRegisteredUserGet): ...

api/specs/web-server/openapi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"_computations",
3636
"_exporter",
3737
"_folders",
38+
"_functions",
3839
"_long_running_tasks",
3940
"_long_running_tasks_legacy",
4041
"_licensed_items",

api/tests/requirements.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ pytest==8.3.5
8585
# pytest-cov
8686
# pytest-instafail
8787
# pytest-sugar
88-
pytest-asyncio==0.23.8
89-
# via
90-
# -c ../../requirements/constraints.txt
91-
# -r requirements.in
88+
pytest-asyncio==0.26.0
89+
# via -r requirements.in
9290
pytest-cov==6.0.0
9391
# via -r requirements.in
9492
pytest-instafail==0.5.0

packages/aws-library/requirements/_test.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,8 @@ pytest==8.3.5
196196
# pytest-instafail
197197
# pytest-mock
198198
# pytest-sugar
199-
pytest-asyncio==0.23.8
200-
# via
201-
# -c requirements/../../../requirements/constraints.txt
202-
# -r requirements/_test.in
199+
pytest-asyncio==0.26.0
200+
# via -r requirements/_test.in
203201
pytest-benchmark==5.1.0
204202
# via -r requirements/_test.in
205203
pytest-cov==6.0.0

packages/aws-library/setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ test = pytest
1515

1616
[tool:pytest]
1717
asyncio_mode = auto
18+
asyncio_default_fixture_loop_scope = function
1819

1920
[mypy]
2021
plugins =

0 commit comments

Comments
 (0)