Skip to content

Commit

Permalink
merge master into 6948-expose-licensing-endpoints-api-server
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Jan 7, 2025
2 parents 8a52ec3 + 4659473 commit e22bb93
Show file tree
Hide file tree
Showing 371 changed files with 9,583 additions and 3,820 deletions.
10 changes: 5 additions & 5 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ flag_management:
statuses:
- type: project
target: auto
threshold: 1%
threshold: 5%
- type: patch
target: auto
threshold: 1%
threshold: 5%


component_management:
Expand All @@ -22,7 +22,7 @@ component_management:
statuses:
- type: project
target: auto
threshold: 1%
threshold: 5%
branches:
- "!master"
individual_components:
Expand Down Expand Up @@ -116,12 +116,12 @@ coverage:
project:
default:
informational: true
threshold: 1%
threshold: 5%

patch:
default:
informational: true
threshold: 1%
threshold: 5%

comment:
layout: "header,diff,flags,components,footer"
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci-testing-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ jobs:
if: ${{ !cancelled() }}
run: ./ci/github/unit-testing/catalog.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -879,7 +879,7 @@ jobs:
if: ${{ !cancelled() }}
run: ./ci/github/unit-testing/datcore-adapter.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -930,7 +930,7 @@ jobs:
if: ${{ !cancelled() }}
run: ./ci/github/unit-testing/director.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -981,7 +981,7 @@ jobs:
if: ${{ !cancelled() }}
run: ./ci/github/unit-testing/director-v2.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -1910,7 +1910,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/webserver.bash test 01
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -1974,7 +1974,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/webserver.bash test 02
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2038,7 +2038,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/director-v2.bash test 01
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2111,7 +2111,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/director-v2.bash test 02
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2177,7 +2177,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/dynamic-sidecar.bash test 01
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2241,7 +2241,7 @@ jobs:
- name: test
run: ./ci/github/integration-testing/simcore-sdk.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2330,7 +2330,7 @@ jobs:
- name: test
run: ./ci/github/system-testing/public-api.bash test
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down Expand Up @@ -2395,7 +2395,7 @@ jobs:
name: ${{ github.job }}_services_settings_schemas
path: ./services/**/settings-schema.json
- name: upload failed tests logs
if: ${{ !cancelled() }}
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.job }}_docker_logs
Expand Down
2 changes: 1 addition & 1 deletion api/specs/web-server/_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
response_model=Envelope[Union[EmailTestFailed, EmailTestPassed]],
)
async def test_email(
_test: TestEmail, x_simcore_products_name: str | None = Header(default=None)
_body: TestEmail, x_simcore_products_name: str | None = Header(default=None)
):
# X-Simcore-Products-Name
...
11 changes: 10 additions & 1 deletion api/specs/web-server/_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# pylint: disable=too-many-arguments


from enum import Enum
from typing import Annotated, Any

from fastapi import APIRouter, Depends, status
Expand Down Expand Up @@ -87,19 +88,24 @@ async def delete_group(_path: Annotated[GroupsPathParams, Depends()]):
"""


_extra_tags: list[str | Enum] = ["users"]


@router.get(
"/groups/{gid}/users",
response_model=Envelope[list[GroupUserGet]],
tags=_extra_tags,
)
async def get_all_group_users(_path: Annotated[GroupsPathParams, Depends()]):
"""
Gets users in organization groups
Gets users in organization or primary groups
"""


@router.post(
"/groups/{gid}/users",
status_code=status.HTTP_204_NO_CONTENT,
tags=_extra_tags,
)
async def add_group_user(
_path: Annotated[GroupsPathParams, Depends()],
Expand All @@ -113,6 +119,7 @@ async def add_group_user(
@router.get(
"/groups/{gid}/users/{uid}",
response_model=Envelope[GroupUserGet],
tags=_extra_tags,
)
async def get_group_user(
_path: Annotated[GroupsUsersPathParams, Depends()],
Expand All @@ -125,6 +132,7 @@ async def get_group_user(
@router.patch(
"/groups/{gid}/users/{uid}",
response_model=Envelope[GroupUserGet],
tags=_extra_tags,
)
async def update_group_user(
_path: Annotated[GroupsUsersPathParams, Depends()],
Expand All @@ -138,6 +146,7 @@ async def update_group_user(
@router.delete(
"/groups/{gid}/users/{uid}",
status_code=status.HTTP_204_NO_CONTENT,
tags=_extra_tags,
)
async def delete_group_user(
_path: Annotated[GroupsUsersPathParams, Depends()],
Expand Down
57 changes: 57 additions & 0 deletions api/specs/web-server/_licensed_items_checkouts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
""" Helper script to generate OAS automatically
"""

# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
# pylint: disable=too-many-arguments

from typing import Annotated

from _common import as_query
from fastapi import APIRouter, Depends
from models_library.api_schemas_webserver.licensed_items_purchases import (
LicensedItemPurchaseGet,
)
from models_library.generics import Envelope
from models_library.rest_error import EnvelopedError
from models_library.rest_pagination import Page
from simcore_service_webserver._meta import API_VTAG
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
from simcore_service_webserver.licenses._licensed_items_checkouts_models import (
LicensedItemCheckoutPathParams,
LicensedItemsCheckoutsListQueryParams,
)
from simcore_service_webserver.wallets._handlers import WalletsPathParams

router = APIRouter(
prefix=f"/{API_VTAG}",
tags=[
"licenses",
],
responses={
i.status_code: {"model": EnvelopedError} for i in _TO_HTTP_ERROR_MAP.values()
},
)


@router.get(
"/wallets/{wallet_id}/licensed-items-checkouts",
response_model=Page[LicensedItemPurchaseGet],
tags=["wallets"],
)
async def list_licensed_item_checkouts_for_wallet(
_path: Annotated[WalletsPathParams, Depends()],
_query: Annotated[as_query(LicensedItemsCheckoutsListQueryParams), Depends()],
):
...


@router.get(
"/licensed-items-checkouts/{licensed_item_checkout_id}",
response_model=Envelope[LicensedItemPurchaseGet],
)
async def get_licensed_item_checkout(
_path: Annotated[LicensedItemCheckoutPathParams, Depends()],
):
...
Loading

0 comments on commit e22bb93

Please sign in to comment.