From ae4146622ecd58377802db4cdf7c3a5eccd52ddd Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:06:07 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20`webserver`:=20fixes=20myp?= =?UTF-8?q?y=20issues=20in=20`version=5Fcontrol`=20plugin=20=20(#4102)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webserver/openapi-version-control.yaml | 16 +- api/specs/webserver/openapi.yaml | 2 +- services/web/server/VERSION | 2 +- services/web/server/setup.cfg | 2 +- .../simcore_service_webserver/_constants.py | 10 + .../api/v0/openapi.yaml | 1358 ++++++++--------- .../simcore_service_webserver/application.py | 4 +- .../director_v2_handlers.py | 6 +- .../login/handlers_confirmation.py | 5 +- .../login/utils_email.py | 2 +- .../meta_modeling_handlers.py | 12 +- .../meta_modeling_iterations.py | 46 +- .../meta_modeling_version_control.py | 17 +- .../studies_dispatcher/_studies_access.py | 2 +- .../src/simcore_service_webserver/utils.py | 4 +- .../version_control/__init__.py | 0 .../_core.py} | 47 +- .../_rest_handlers.py} | 36 +- .../_rest_handlers_base.py} | 8 +- .../db.py} | 93 +- .../errors.py} | 0 .../models.py} | 61 +- .../plugin.py} | 6 +- .../vc_changes.py} | 19 +- .../vc_tags.py} | 3 +- .../version_control/test_version_control.py | 10 +- .../test_version_control_core.py | 4 +- .../test_version_control_handlers.py | 2 +- .../test_version_control_tags.py | 2 +- 29 files changed, 884 insertions(+), 895 deletions(-) create mode 100644 services/web/server/src/simcore_service_webserver/version_control/__init__.py rename services/web/server/src/simcore_service_webserver/{version_control_core.py => version_control/_core.py} (82%) rename services/web/server/src/simcore_service_webserver/{version_control_handlers.py => version_control/_rest_handlers.py} (90%) rename services/web/server/src/simcore_service_webserver/{version_control_handlers_base.py => version_control/_rest_handlers_base.py} (84%) rename services/web/server/src/simcore_service_webserver/{version_control_db.py => version_control/db.py} (89%) rename services/web/server/src/simcore_service_webserver/{version_control_errors.py => version_control/errors.py} (100%) rename services/web/server/src/simcore_service_webserver/{version_control_models.py => version_control/models.py} (56%) rename services/web/server/src/simcore_service_webserver/{version_control.py => version_control/plugin.py} (80%) rename services/web/server/src/simcore_service_webserver/{version_control_changes.py => version_control/vc_changes.py} (80%) rename services/web/server/src/simcore_service_webserver/{version_control_tags.py => version_control/vc_tags.py} (80%) diff --git a/api/specs/webserver/openapi-version-control.yaml b/api/specs/webserver/openapi-version-control.yaml index c1eb12ffa94..6836aec79e3 100644 --- a/api/specs/webserver/openapi-version-control.yaml +++ b/api/specs/webserver/openapi-version-control.yaml @@ -5,7 +5,7 @@ paths: - repository summary: List Repos description: List info about versioned projects - operationId: simcore_service_webserver.version_control_handlers._list_repos_handler + operationId: simcore_service_webserver.version_control._rest_handlers._list_repos_handler parameters: - description: index to the first item to return (pagination) required: false @@ -47,7 +47,7 @@ paths: - repository summary: List Checkpoints description: Lists commits&tags tree of the project - operationId: simcore_service_webserver.version_control_handlers._list_checkpoints_handler + operationId: simcore_service_webserver.version_control._rest_handlers._list_checkpoints_handler parameters: - description: Project unique identifier required: true @@ -96,7 +96,7 @@ paths: tags: - repository summary: Create Checkpoint - operationId: simcore_service_webserver.version_control_handlers._create_checkpoint_handler + operationId: simcore_service_webserver.version_control._rest_handlers._create_checkpoint_handler parameters: - description: Project unique identifier required: true @@ -132,7 +132,7 @@ paths: - repository summary: Gets HEAD (i.e. current) checkpoint description: Get current commit - operationId: simcore_service_webserver.version_control_handlers._get_checkpoint_handler_head + operationId: simcore_service_webserver.version_control._rest_handlers._get_checkpoint_handler_head parameters: - description: Project unique identifier required: true @@ -162,7 +162,7 @@ paths: - repository summary: Get Checkpoint description: Set ref_id=HEAD to return current commit - operationId: simcore_service_webserver.version_control_handlers._get_checkpoint_handler + operationId: simcore_service_webserver.version_control._rest_handlers._get_checkpoint_handler parameters: - description: A repository ref (commit, tag or branch) required: true @@ -201,7 +201,7 @@ paths: tags: - repository summary: Update Checkpoint Annotations - operationId: simcore_service_webserver.version_control_handlers._update_checkpoint_annotations_handler + operationId: simcore_service_webserver.version_control._rest_handlers._update_checkpoint_annotations_handler parameters: - description: A repository ref (commit, tag or branch) required: true @@ -250,7 +250,7 @@ paths: description: |- Affect current working copy of the project, i.e. get_project will now return the check out - operationId: simcore_service_webserver.version_control_handlers._checkout_handler + operationId: simcore_service_webserver.version_control._rest_handlers._checkout_handler parameters: - description: A repository ref (commit, tag or branch) required: true @@ -291,7 +291,7 @@ paths: - repository summary: View Project Workbench description: Returns a view of the workbench for a given project's version - operationId: simcore_service_webserver.version_control_handlers._view_project_workbench_handler + operationId: simcore_service_webserver.version_control._rest_handlers._view_project_workbench_handler parameters: - description: A repository ref (commit, tag or branch) required: true diff --git a/api/specs/webserver/openapi.yaml b/api/specs/webserver/openapi.yaml index 3810698e28d..f971c111173 100644 --- a/api/specs/webserver/openapi.yaml +++ b/api/specs/webserver/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: "osparc-simcore web API" - version: 0.17.1 + version: 0.17.2 description: "API designed for the front-end app" contact: name: IT'IS Foundation diff --git a/services/web/server/VERSION b/services/web/server/VERSION index 7cca7711a0d..c3d16c1646b 100644 --- a/services/web/server/VERSION +++ b/services/web/server/VERSION @@ -1 +1 @@ -0.17.1 +0.17.2 diff --git a/services/web/server/setup.cfg b/services/web/server/setup.cfg index b23c14b59c2..a50197b5e69 100644 --- a/services/web/server/setup.cfg +++ b/services/web/server/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.17.1 +current_version = 0.17.2 commit = True message = services/webserver api version: {current_version} → {new_version} tag = False diff --git a/services/web/server/src/simcore_service_webserver/_constants.py b/services/web/server/src/simcore_service_webserver/_constants.py index c28191f8ca7..c10dfef3edf 100644 --- a/services/web/server/src/simcore_service_webserver/_constants.py +++ b/services/web/server/src/simcore_service_webserver/_constants.py @@ -27,3 +27,13 @@ # Public config per product returned in /config APP_PUBLIC_CONFIG_PER_PRODUCT: Final[str] = f"{__name__}.APP_PUBLIC_CONFIG_PER_PRODUCT" + + +__all__: tuple[str, ...] = ( + "APP_CONFIG_KEY", + "APP_DB_ENGINE_KEY", + "APP_FIRE_AND_FORGET_TASKS_KEY", + "APP_JSONSCHEMA_SPECS_KEY", + "APP_OPENAPI_SPECS_KEY", + "APP_SETTINGS_KEY", +) diff --git a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml index a4d2358b6d4..d7808c42101 100644 --- a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml +++ b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml @@ -1,24 +1,24 @@ openapi: 3.0.0 info: title: osparc-simcore web API - version: 0.17.1 + version: 0.17.2 description: API designed for the front-end app contact: name: IT'IS Foundation email: support@simcore.io license: name: MIT - url: 'https://github.com/ITISFoundation/osparc-simcore/blob/master/LICENSE' + url: "https://github.com/ITISFoundation/osparc-simcore/blob/master/LICENSE" servers: - description: API server url: /v0 - description: Development server - url: 'http://{host}:{port}/{basePath}' + url: "http://{host}:{port}/{basePath}" variables: host: default: localhost port: - default: '8001' + default: "8001" basePath: enum: - v0 @@ -41,7 +41,7 @@ tags: - name: tasks - name: user paths: - '/email:test': + "/email:test": post: tags: - admin @@ -64,7 +64,7 @@ paths: type: object properties: from_: - title: 'From ' + title: "From " type: string description: Email sender format: email @@ -90,12 +90,12 @@ paths: default: {} required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[Union[TestFailed, TestPassed]]' + title: "Envelope[Union[TestFailed, TestPassed]]" type: object properties: data: @@ -142,7 +142,7 @@ paths: summary: readiness probe for operationId: healthcheck_readiness_probe responses: - '200': + "200": description: Service information content: application/json: @@ -171,7 +171,7 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /health: get: tags: @@ -179,14 +179,14 @@ paths: summary: liveliness probe operationId: healthcheck_liveness_probe responses: - '200': + "200": description: Service information content: application/json: schema: - $ref: '#/paths/~1/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /status: get: tags: @@ -194,7 +194,7 @@ paths: summary: checks status of self and connected services operationId: get_app_status responses: - '200': + "200": description: returns app status check /status/diagnostics: get: @@ -202,9 +202,9 @@ paths: - maintenance operationId: get_app_diagnostics responses: - '200': + "200": description: returns app diagnostics report - '/status/{service_name}': + "/status/{service_name}": get: tags: - maintenance @@ -216,7 +216,7 @@ paths: schema: type: string responses: - '200': + "200": description: returns status of connected service /config: get: @@ -225,7 +225,7 @@ paths: tags: - configuration responses: - '200': + "200": description: configuration details content: application/json: @@ -245,8 +245,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/auth/register/invitations:check': + $ref: "#/components/responses/DefaultErrorResponse" + "/auth/register/invitations:check": post: tags: - authentication @@ -269,12 +269,12 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[InvitationInfo]' + title: "Envelope[InvitationInfo]" type: object properties: data: @@ -328,13 +328,13 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '/auth/two_factor:resend': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "/auth/two_factor:resend": post: tags: - authentication @@ -365,18 +365,18 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '401': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "401": description: unauthorized reset due to invalid token code content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" /auth/verify-phone-number: post: tags: @@ -401,16 +401,16 @@ paths: phone: title: Phone type: string - description: 'Phone number E.164, needed on the deployments with 2FA' + description: "Phone number E.164, needed on the deployments with 2FA" additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[RegisterPhoneNextPage]' + title: "Envelope[RegisterPhoneNextPage]" type: object properties: data: @@ -482,7 +482,7 @@ paths: phone: title: Phone type: string - description: 'Phone number E.164, needed on the deployments with 2FA' + description: "Phone number E.164, needed on the deployments with 2FA" code: title: Code type: string @@ -491,12 +491,12 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" /auth/login: post: tags: @@ -526,12 +526,12 @@ paths: additionalProperties: false required: true responses: - '201': + "201": description: Successful Response content: application/json: schema: - title: 'Envelope[LoginNextPage]' + title: "Envelope[LoginNextPage]" type: object properties: data: @@ -579,12 +579,12 @@ paths: using a path+query in the fragment of the URL error: title: Error - '401': + "401": description: unauthorized reset due to invalid token code content: application/json: schema: - title: 'Envelope[Error]' + title: "Envelope[Error]" type: object properties: data: @@ -595,7 +595,7 @@ paths: title: Logs type: array items: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema/properties/data" description: log messages errors: title: Errors @@ -659,18 +659,18 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '401': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "401": description: unauthorized reset due to invalid token code content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" /auth/logout: post: tags: @@ -692,12 +692,12 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[Log]' + title: "Envelope[Log]" type: object properties: data: @@ -721,13 +721,13 @@ paths: message: title: Message type: string - description: 'log message. If logger is USER, then it MUST be human readable' + description: "log message. If logger is USER, then it MUST be human readable" logger: title: Logger type: string description: name of the logger receiving this message example: - message: 'Hi there, Mr user' + message: "Hi there, Mr user" level: INFO logger: user-logger error: @@ -754,19 +754,19 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '503': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "503": description: Service Unavailable content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' - '/auth/reset-password/{code}': + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" + "/auth/reset-password/{code}": post: tags: - authentication @@ -803,18 +803,18 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '401': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "401": description: unauthorized reset due to invalid token code content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" /auth/change-email: post: tags: @@ -838,24 +838,24 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '401': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "401": description: unauthorized user. Login required content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' - '503': + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" + "503": description: unable to send confirmation email content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" /auth/change-password: post: tags: @@ -892,31 +892,31 @@ paths: additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' - '401': + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" + "401": description: unauthorized user. Login required content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' - '409': + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" + "409": description: mismatch between new and confirmation passwords content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' - '422': + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" + "422": description: current password is invalid content: application/json: schema: - $ref: '#/paths/~1auth~1login/post/responses/401/content/application~1json/schema' - '/auth/confirmation/{code}': + $ref: "#/paths/~1auth~1login/post/responses/401/content/application~1json/schema" + "/auth/confirmation/{code}": get: tags: - authentication @@ -931,12 +931,12 @@ paths: name: code in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema' + $ref: "#/paths/~1auth~1logout/post/responses/200/content/application~1json/schema" 3XX: description: redirection to specific ui application page /auth/api-keys: @@ -954,7 +954,7 @@ paths: name: code in: query responses: - '200': + "200": description: returns the display names of API keys content: application/json: @@ -963,11 +963,11 @@ paths: type: array items: type: string - '400': + "400": description: key name requested is invalid - '401': + "401": description: requires login to list keys - '403': + "403": description: not enough permissions to list keys post: tags: @@ -991,11 +991,11 @@ paths: expiration: title: Expiration type: number - description: 'Time delta from creation time to expiration. If None, then it does not expire.' + description: "Time delta from creation time to expiration. If None, then it does not expire." format: time-delta required: true responses: - '200': + "200": description: Authorization granted returning API key content: application/json: @@ -1017,11 +1017,11 @@ paths: api_secret: title: Api Secret type: string - '400': + "400": description: key name requested is invalid - '401': + "401": description: requires login to list keys - '403': + "403": description: not enough permissions to list keys delete: tags: @@ -1033,14 +1033,14 @@ paths: content: application/json: schema: - $ref: '#/paths/~1auth~1api-keys/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1auth~1api-keys/post/requestBody/content/application~1json/schema" required: true responses: - '204': + "204": description: api key successfully deleted - '401': + "401": description: requires login to delete a key - '403': + "403": description: not enough permissions to delete a key /me: get: @@ -1048,7 +1048,7 @@ paths: tags: - user responses: - '200': + "200": description: current user profile content: application/json: @@ -1059,7 +1059,7 @@ paths: properties: data: allOf: - - $ref: '#/paths/~1me/put/requestBody/content/application~1json/schema/allOf/0' + - $ref: "#/paths/~1me/put/requestBody/content/application~1json/schema/allOf/0" - type: object properties: id: @@ -1070,18 +1070,18 @@ paths: role: type: string groups: - $ref: '#/paths/~1groups/get/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1groups/get/responses/200/content/application~1json/schema/properties/data" gravatar_id: type: string expirationDate: type: string format: date - description: 'If user has a trial account, it sets the expiration date, otherwise None' + description: "If user has a trial account, it sets the expiration date, otherwise None" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" put: operationId: update_my_profile tags: @@ -1101,10 +1101,10 @@ paths: first_name: Pedro last_name: Crespo responses: - '204': + "204": description: updated profile default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /me/tokens: get: summary: List tokens @@ -1112,7 +1112,7 @@ paths: tags: - user responses: - '200': + "200": description: list of tokens content: application/json: @@ -1124,12 +1124,12 @@ paths: data: type: array items: - $ref: '#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema/properties/data' + $ref: "#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema/properties/data" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: summary: Create tokens operationId: create_tokens @@ -1164,15 +1164,15 @@ paths: nullable: true default: null responses: - '201': + "201": description: token created content: application/json: schema: - $ref: '#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/me/tokens/{service}': + $ref: "#/components/responses/DefaultErrorResponse" + "/me/tokens/{service}": parameters: - name: service in: path @@ -1185,19 +1185,19 @@ paths: tags: - user responses: - '200': + "200": description: got detailed token content: application/json: schema: - $ref: '#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1me~1tokens/post/requestBody/content/application~1json/schema" put: summary: Updates token operationId: update_token tags: - user responses: - '204': + "204": description: token has been successfully updated delete: summary: Delete token @@ -1205,7 +1205,7 @@ paths: tags: - user responses: - '204': + "204": description: token has been successfully deleted /me/notifications: get: @@ -1214,7 +1214,7 @@ paths: summary: List of Notifications for the specific user operationId: get_user_notifications responses: - '200': + "200": description: List of Notifications content: application/json: @@ -1227,7 +1227,7 @@ paths: type: array items: allOf: - - $ref: '#/paths/~1me~1notifications/post/requestBody/content/application~1json/schema' + - $ref: "#/paths/~1me~1notifications/post/requestBody/content/application~1json/schema" - type: object - required: - id @@ -1236,7 +1236,7 @@ paths: id: type: string description: notification id - example: '123' + example: "123" read: type: boolean description: wether the notification has been read @@ -1244,7 +1244,7 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: tags: - user @@ -1268,14 +1268,14 @@ paths: user_id: type: string description: the user that will receive the notification - example: '123' + example: "123" category: type: string enum: - NEW_ORGANIZATION - STUDY_SHARED - TEMPLATE_SHARED - description: 'notification type, the frontend will use this to decorate the notification' + description: "notification type, the frontend will use this to decorate the notification" example: new_organization actionable_path: type: string @@ -1294,11 +1294,11 @@ paths: format: date-time description: when it was created responses: - '204': + "204": description: Notification registered default: - $ref: '#/components/responses/DefaultErrorResponse' - '/me/notifications/{id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/me/notifications/{id}": parameters: - name: id in: path @@ -1322,10 +1322,10 @@ paths: type: boolean description: notification has been read responses: - '204': + "204": description: All good default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /groups: get: summary: List my groups @@ -1333,7 +1333,7 @@ paths: tags: - group responses: - '200': + "200": description: list of the groups I belonged to content: application/json: @@ -1346,20 +1346,20 @@ paths: type: object properties: me: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" organizations: type: array items: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" all: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" product: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: summary: Create a new group operationId: create_group @@ -1387,27 +1387,27 @@ paths: type: string format: uri accessRights: - $ref: '#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/patch/requestBody/content/application~1json/schema/properties/accessRights' + $ref: "#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/patch/requestBody/content/application~1json/schema/properties/accessRights" required: - gid - label - description - accessRights example: - - gid: '27' + - gid: "27" label: A user description: A very special user - thumbnail: 'https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png' - - gid: '1' + thumbnail: "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" + - gid: "1" label: ITIS Foundation description: The Foundation for Research on Information Technologies in Society - thumbnail: 'https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png' - - gid: '0' + thumbnail: "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" + - gid: "0" label: All description: Open to all users - thumbnail: 'https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png' + thumbnail: "https://user-images.githubusercontent.com/32800795/61083844-ff48fb00-a42c-11e9-8e63-fa2d709c8baf.png" responses: - '201': + "201": description: group created content: application/json: @@ -1417,13 +1417,13 @@ paths: - data properties: data: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/{gid}': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/{gid}": parameters: - name: gid in: path @@ -1436,14 +1436,14 @@ paths: summary: Gets one group details operationId: get_group responses: - '200': + "200": description: got group content: application/json: schema: - $ref: '#/paths/~1groups/post/responses/201/content/application~1json/schema' + $ref: "#/paths/~1groups/post/responses/201/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" patch: summary: Update one group operationId: update_group @@ -1455,27 +1455,27 @@ paths: content: application/json: schema: - $ref: '#/paths/~1groups/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1groups/post/requestBody/content/application~1json/schema" responses: - '200': + "200": description: the modified group content: application/json: schema: - $ref: '#/paths/~1groups/post/responses/201/content/application~1json/schema' + $ref: "#/paths/~1groups/post/responses/201/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - group summary: Deletes one group operationId: delete_group responses: - '204': + "204": description: group has been successfully deleted default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/{gid}/users': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/{gid}/users": parameters: - name: gid in: path @@ -1488,7 +1488,7 @@ paths: summary: Gets list of users in group operationId: get_group_users responses: - '200': + "200": description: got list of users and their respective rights content: application/json: @@ -1500,12 +1500,12 @@ paths: data: type: array items: - $ref: '#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/get/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/get/responses/200/content/application~1json/schema/properties/data" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: tags: - group @@ -1534,11 +1534,11 @@ paths: format: email description: the user email responses: - '204': + "204": description: user successfully added default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/{gid}/users/{uid}': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/{gid}/users/{uid}": parameters: - name: gid in: path @@ -1556,7 +1556,7 @@ paths: summary: Gets specific user in group operationId: get_group_user responses: - '200': + "200": description: got user content: application/json: @@ -1594,14 +1594,14 @@ paths: last_name: Smith login: mr.smith@matrix.com gravatar_id: a1af5c6ecc38e81f29695f01d6ceb540 - id: '1' - gid: '3' - - $ref: '#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/patch/requestBody/content/application~1json/schema/properties/accessRights' + id: "1" + gid: "3" + - $ref: "#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/patch/requestBody/content/application~1json/schema/properties/accessRights" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" patch: tags: - group @@ -1642,25 +1642,25 @@ paths: required: - accessRights responses: - '200': + "200": description: modified user content: application/json: schema: - $ref: '#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1groups~1%7Bgid%7D~1users~1%7Buid%7D/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - group summary: Delete specific user in group operationId: delete_group_user responses: - '204': + "204": description: successfully removed user default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/{gid}/classifiers': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/{gid}/classifiers": get: parameters: - name: gid @@ -1682,11 +1682,11 @@ paths: summary: Gets classifiers bundle for this group operationId: get_group_classifiers responses: - '200': + "200": description: got a bundle with all information about classifiers default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/sparc/classifiers/scicrunch-resources/{rrid}': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/sparc/classifiers/scicrunch-resources/{rrid}": parameters: - name: rrid in: path @@ -1696,32 +1696,32 @@ paths: get: tags: - group - summary: 'Returns information on a valid RRID (https://www.force11.org/group/resource-identification-initiative)' + summary: "Returns information on a valid RRID (https://www.force11.org/group/resource-identification-initiative)" operationId: get_scicrunch_resource responses: - '200': + "200": description: Got information of a valid RRID - '400': + "400": description: Invalid RRID - '503': + "503": description: scircrunch.org service is not reachable default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: tags: - group summary: Adds new RRID to classifiers operationId: add_scicrunch_resource responses: - '200': + "200": description: Got information of a valid RRID - '400': + "400": description: Invalid RRID - '503': + "503": description: scircrunch.org service is not reachable default: - $ref: '#/components/responses/DefaultErrorResponse' - '/groups/sparc/classifiers/scicrunch-resources:search': + $ref: "#/components/responses/DefaultErrorResponse" + "/groups/sparc/classifiers/scicrunch-resources:search": get: parameters: - name: guess_name @@ -1734,12 +1734,12 @@ paths: summary: Returns a list of related resource provided a search name operationId: search_scicrunch_resources responses: - '200': + "200": description: Got information of a valid RRID - '503': + "503": description: scircrunch.org service is not reachable default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /storage/locations: get: summary: Get available storage locations @@ -1747,7 +1747,7 @@ paths: - storage operationId: get_storage_locations responses: - '200': + "200": description: List of availabe storage locations content: application/json: @@ -1764,8 +1764,8 @@ paths: filename: simcore.s3 id: 0 default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}:sync': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}:sync": post: summary: Manually triggers the synchronisation of the file meta data table in the database tags: @@ -1790,8 +1790,8 @@ paths: type: boolean default: false responses: - '200': - description: 'An object containing added, changed and removed paths' + "200": + description: "An object containing added, changed and removed paths" content: application/json: schema: @@ -1817,8 +1817,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/files/metadata': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}/files/metadata": get: summary: Get list of file meta data tags: @@ -1831,17 +1831,17 @@ paths: schema: type: string responses: - '200': + "200": description: list of file meta-datas content: application/json: schema: type: array items: - $ref: '#/paths/~1storage~1locations~1%7Blocation_id%7D~1files~1%7Bfile_id%7D~1metadata/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1storage~1locations~1%7Blocation_id%7D~1files~1%7Bfile_id%7D~1metadata/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/files/{file_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}/files/{file_id}": get: summary: Returns download link for requested file tags: @@ -1859,7 +1859,7 @@ paths: schema: type: string responses: - '200': + "200": description: Returns presigned link content: application/json: @@ -1894,7 +1894,7 @@ paths: format: int64 minimum: 0 responses: - '200': + "200": description: Return upload object content: application/json: @@ -1962,9 +1962,9 @@ paths: schema: type: string responses: - '204': - description: '' - '/storage/locations/{location_id}/files/{file_id}:complete': + "204": + description: "" + "/storage/locations/{location_id}/files/{file_id}:complete": post: summary: Asks the server to complete the upload operationId: complete_upload_file @@ -2001,7 +2001,7 @@ paths: e_tag: type: string responses: - '202': + "202": description: Completion of upload is accepted content: application/json: @@ -2035,8 +2035,8 @@ paths: path.future_id: $response.body.data.links.state query.user_id: $request.query.user_id default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/files/{file_id}:abort': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}/files/{file_id}:abort": post: summary: Asks the server to abort the upload and revert to the last valid version if any operationId: abort_upload_file @@ -2052,12 +2052,12 @@ paths: schema: type: string responses: - '204': + "204": description: Abort OK default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/files/{file_id}:complete/futures/{future_id}': - post: + $ref: "#/components/responses/DefaultErrorResponse" + ? "/storage/locations/{location_id}/files/{file_id}:complete/futures/{future_id}" + : post: summary: Check for upload completion operationId: is_completed_upload_file parameters: @@ -2077,7 +2077,7 @@ paths: schema: type: string responses: - '200': + "200": description: returns state of upload completion content: application/json: @@ -2104,8 +2104,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/files/{file_id}/metadata': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}/files/{file_id}/metadata": get: summary: Get File Metadata tags: @@ -2123,7 +2123,7 @@ paths: schema: type: string responses: - '200': + "200": description: Returns file metadata content: application/json: @@ -2152,16 +2152,16 @@ paths: type: string example: file_uuid: simcore-testing/105/1000/3 - location_id: '0' + location_id: "0" project_name: futurology node_name: alpha file_name: example.txt - file_id: 'N:package:e263da07-2d89-45a6-8b0f-61061b913873' - created_at: '2019-06-19T12:29:03.308611Z' - last_modified: '2019-06-19T12:29:03.78852Z' + file_id: "N:package:e263da07-2d89-45a6-8b0f-61061b913873" + created_at: "2019-06-19T12:29:03.308611Z" + last_modified: "2019-06-19T12:29:03.78852Z" file_size: 73 entity_tag: a87ff679a2f3e71d9181a67b7542122c - '/storage/locations/{location_id}/datasets/{dataset_id}/metadata': + "/storage/locations/{location_id}/datasets/{dataset_id}/metadata": get: summary: Get Files Metadata tags: @@ -2179,15 +2179,15 @@ paths: schema: type: string responses: - '200': + "200": description: list of file meta-datas content: application/json: schema: - $ref: '#/paths/~1storage~1locations~1%7Blocation_id%7D~1files~1metadata/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1storage~1locations~1%7Blocation_id%7D~1files~1metadata/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/storage/locations/{location_id}/datasets': + $ref: "#/components/responses/DefaultErrorResponse" + "/storage/locations/{location_id}/datasets": get: summary: Get datasets metadata tags: @@ -2200,7 +2200,7 @@ paths: schema: type: string responses: - '200': + "200": description: list of dataset meta-datas content: application/json: @@ -2214,11 +2214,11 @@ paths: display_name: type: string example: - dataset_uuid: 'N:id-aaaa' + dataset_uuid: "N:id-aaaa" display_name: simcore-testing default: - $ref: '#/components/responses/DefaultErrorResponse' - '/computations/{project_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/computations/{project_id}": get: description: Returns the last computation data tags: @@ -2233,7 +2233,7 @@ paths: type: string example: 123e4567-e89b-12d3-a456-426655440000 responses: - '200': + "200": description: Succesffully retrieved computation content: application/json: @@ -2255,15 +2255,15 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/computations/{project_id}:start': + $ref: "#/components/responses/DefaultErrorResponse" + "/computations/{project_id}:start": post: description: Starts the pipeline(s) of a given (meta) project tags: - computations operationId: start_computation parameters: - - $ref: '#/paths/~1computations~1%7Bproject_id%7D/get/parameters/0' + - $ref: "#/paths/~1computations~1%7Bproject_id%7D/get/parameters/0" requestBody: required: false content: @@ -2277,7 +2277,7 @@ paths: description: if true will force re-running all dependent nodes cluster_id: type: integer - description: 'the computation shall use the cluster described by its id, 0 is the default cluster' + description: "the computation shall use the cluster described by its id, 0 is the default cluster" default: 0 minimum: 0 subgraph: @@ -2288,7 +2288,7 @@ paths: type: string format: uuid responses: - '201': + "201": description: Successfully started the pipeline content: application/json: @@ -2314,20 +2314,20 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/computations/{project_id}:stop': + $ref: "#/components/responses/DefaultErrorResponse" + "/computations/{project_id}:stop": post: description: Stops (all) pipeline(s) of a given (meta) project tags: - computations operationId: stop_computation parameters: - - $ref: '#/paths/~1computations~1%7Bproject_id%7D/get/parameters/0' + - $ref: "#/paths/~1computations~1%7Bproject_id%7D/get/parameters/0" responses: - '204': + "204": description: Succesffully stopped the pipeline default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /projects: get: tags: @@ -2368,7 +2368,7 @@ paths: required: false description: maximum number of items to return responses: - '200': + "200": description: list of projects content: application/json: @@ -2380,12 +2380,12 @@ paths: data: type: array items: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema/properties/data" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: tags: - project @@ -2396,19 +2396,19 @@ paths: in: query schema: type: string - description: 'Option to create a project from existing template or study: from_study={study_uuid}' + description: "Option to create a project from existing template or study: from_study={study_uuid}" - name: as_template in: query schema: type: boolean default: false - description: 'Option to create a template from existing project: as_template=true' + description: "Option to create a template from existing project: as_template=true" - name: copy_data in: query schema: type: boolean default: true - description: 'Option to copy data when creating from an existing template or as a template, defaults to True' + description: "Option to copy data when creating from an existing template or as a template, defaults to True" - name: hidden in: query schema: @@ -2470,14 +2470,14 @@ paths: type: object classifiers: description: Contains the reference to the project classifiers - example: 'some:id:to:a:classifier' + example: "some:id:to:a:classifier" items: type: string title: Classifiers type: array creationDate: description: project creation date - example: '2018-07-01T11:13:43Z' + example: "2018-07-01T11:13:43Z" pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' title: Creationdate type: string @@ -2492,7 +2492,7 @@ paths: type: object lastChangeDate: description: last save date - example: '2018-07-01T11:13:43Z' + example: "2018-07-01T11:13:43Z" pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' title: Lastchangedate type: string @@ -2547,7 +2547,7 @@ paths: - last_name title: Owner type: object - description: 'If locked, the user that owns the lock' + description: "If locked, the user that owns the lock" title: Owner status: allOf: @@ -2616,7 +2616,7 @@ paths: type: array thumbnail: description: url of the project thumbnail - example: 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + example: "https://placeimg.com/171/96/tech/grayscale/?0.jpg" format: uri maxLength: 2083 minLength: 0 @@ -2632,8 +2632,8 @@ paths: height: 26 width: 117 x: 415 - 'y': 100 - color: '#FF0000' + "y": 100 + color: "#FF0000" type: rect properties: attributes: @@ -2659,21 +2659,21 @@ paths: title: Annotations type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': - additionalProperties: false + ? "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + : additionalProperties: false example: - attributes: height: 26 width: 117 x: 415 - 'y': 100 - color: '#FF0000' + "y": 100 + color: "#FF0000" type: rect - attributes: text: Hey! x: 415 - 'y': 100 - color: '#0000FF' + "y": 100 + color: "#0000FF" type: text properties: attributes: @@ -2716,8 +2716,8 @@ paths: title: Slideshow type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': - properties: + ? "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + : properties: instructions: title: Instructions type: string @@ -2750,18 +2750,18 @@ paths: x: description: The x position example: - - '12' + - "12" title: X type: integer - 'y': + "y": description: The y position example: - - '15' - title: 'Y' + - "15" + title: "Y" type: integer required: - x - - 'y' + - "y" title: Position type: object description: The node position in the workbench @@ -2773,8 +2773,8 @@ paths: title: Workbench type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': - additionalProperties: false + ? "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + : additionalProperties: false properties: marker: additionalProperties: false @@ -2794,18 +2794,18 @@ paths: x: description: The x position example: - - '12' + - "12" title: X type: integer - 'y': + "y": description: The y position example: - - '15' - title: 'Y' + - "15" + title: "Y" type: integer required: - x - - 'y' + - "y" title: Position type: object description: The node position in the workbench @@ -2829,11 +2829,11 @@ paths: bootOptions: additionalProperties: type: string - description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + description: "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults." title: Bootoptions type: object x-patternProperties: - '[a-zA-Z][a-azA-Z0-9_]*': + "[a-zA-Z][a-azA-Z0-9_]*": type: string inputAccess: additionalProperties: @@ -2847,7 +2847,7 @@ paths: description: map with key - access level pairs type: object x-patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": description: An enumeration. enum: - ReadAndWrite @@ -2884,7 +2884,7 @@ paths: type: string output: description: The port key in the node given by nodeUuid - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Output type: string required: @@ -2916,12 +2916,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -2932,9 +2932,9 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -2953,12 +2953,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -2969,9 +2969,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - downloadLink: 'https://fakeimg.pl/250x100/' + downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -2994,7 +2994,7 @@ paths: title: Inputs type: object x-patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": anyOf: - type: boolean - type: integer @@ -3015,7 +3015,7 @@ paths: type: string output: description: The port key in the node given by nodeUuid - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Output type: string required: @@ -3032,7 +3032,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -3054,12 +3054,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3070,13 +3070,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3095,12 +3095,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3111,9 +3111,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3139,7 +3139,7 @@ paths: title: Inputsunits type: object x-patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": type: string key: description: distinctive name for the node based on the docker registry path @@ -3196,12 +3196,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3212,9 +3212,9 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3233,12 +3233,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3249,9 +3249,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - downloadLink: 'https://fakeimg.pl/250x100/' + downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3274,7 +3274,7 @@ paths: title: Outputs type: object x-patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": anyOf: - type: boolean - type: integer @@ -3291,7 +3291,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -3313,12 +3313,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3329,13 +3329,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3354,12 +3354,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3370,9 +3370,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3405,18 +3405,18 @@ paths: x: description: The x position example: - - '12' + - "12" title: X type: integer - 'y': + "y": description: The y position example: - - '15' - title: 'Y' + - "15" + title: "Y" type: integer required: - x - - 'y' + - "y" title: Position type: object deprecated: true @@ -3481,7 +3481,7 @@ paths: title: State thumbnail: description: url of the latest screenshot of the node - example: 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + example: "https://placeimg.com/171/96/tech/grayscale/?0.jpg" format: uri maxLength: 2083 minLength: 0 @@ -3503,15 +3503,15 @@ paths: title: Workbench type: object x-patternProperties: - '^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$': - additionalProperties: false + ? "^[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" + : additionalProperties: false properties: bootOptions: additionalProperties: type: string - description: 'Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services''s defaults.' + description: "Some services provide alternative parameters to be injected at boot time. The user selection should be stored here, and it will overwrite the services's defaults." patternProperties: - '[a-zA-Z][a-azA-Z0-9_]*': + "[a-zA-Z][a-azA-Z0-9_]*": type: string title: Bootoptions type: object @@ -3526,7 +3526,7 @@ paths: type: string description: map with key - access level pairs patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": description: An enumeration. enum: - ReadAndWrite @@ -3564,7 +3564,7 @@ paths: type: string output: description: The port key in the node given by nodeUuid - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Output type: string required: @@ -3581,7 +3581,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -3603,12 +3603,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3619,13 +3619,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3644,12 +3644,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3660,9 +3660,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3683,7 +3683,7 @@ paths: - type: object description: values of input properties patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": anyOf: - type: boolean - type: integer @@ -3704,7 +3704,7 @@ paths: type: string output: description: The port key in the node given by nodeUuid - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Output type: string required: @@ -3721,7 +3721,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -3743,12 +3743,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3759,13 +3759,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3784,12 +3784,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3800,9 +3800,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3828,7 +3828,7 @@ paths: type: string description: Overrides default unit (if any) defined in the service for each port patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": type: string title: Inputsunits type: object @@ -3876,7 +3876,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -3898,12 +3898,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3914,13 +3914,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -3939,12 +3939,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -3955,9 +3955,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -3978,7 +3978,7 @@ paths: - type: object description: values of output properties patternProperties: - '^[-_a-zA-Z0-9]+$': + "^[-_a-zA-Z0-9]+$": anyOf: - type: boolean - type: integer @@ -3995,7 +3995,7 @@ paths: store: 0 - eTag: f7e4c7076761a42a871e978c8691c676 path: 50339632-ee1d-11ec-a0c2-02420a0194e4/23b1522f-225f-5a4c-9158-c4c19a70d4a8/output.h5 - store: '0' + store: "0" - path: api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt store: 0 - path: 94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt @@ -4017,12 +4017,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -4033,13 +4033,13 @@ paths: - additionalProperties: false description: I/O port type to hold a link to a file in DATCORE storage example: - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 - - dataset: 'N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4' + - dataset: "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4" label: initial_WTstates - path: 'N:package:32df09ba-e8d6-46da-bd54-f696157de6ce' + path: "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce" store: 1 properties: dataset: @@ -4058,12 +4058,12 @@ paths: anyOf: - pattern: '^(api|([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}))\/([0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12})\/(.+)$' type: string - - pattern: '^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$' + - pattern: "^N:package:[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$" type: string description: The path to the file in the storage provider domain title: Path store: - description: 'The store identifier: 0 for simcore S3, 1 for datcore' + description: "The store identifier: 0 for simcore S3, 1 for datcore" title: Store type: integer required: @@ -4074,9 +4074,9 @@ paths: title: DatCoreFileLink type: object - additionalProperties: false - description: 'I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)' + description: "I/O port type to hold a generic download link to a file (e.g. S3 pre-signed link, etc)" example: - - downloadLink: 'https://fakeimg.pl/250x100/' + - downloadLink: "https://fakeimg.pl/250x100/" properties: downloadLink: format: uri @@ -4099,7 +4099,7 @@ paths: type: object parent: anyOf: - - type: 'null' + - type: "null" - description: Parent's (group-nodes') node ID s. Used to group format: uuid title: Parent @@ -4111,18 +4111,18 @@ paths: x: description: The x position example: - - '12' + - "12" title: X type: integer - 'y': + "y": description: The y position example: - - '15' - title: 'Y' + - "15" + title: "Y" type: integer required: - x - - 'y' + - "y" title: Position type: object deprecated: true @@ -4136,7 +4136,7 @@ paths: type: number runHash: anyOf: - - type: 'null' + - type: "null" - description: the hex digest of the resolved inputs +outputs hash at the time when the last outputs were generated title: Runhash type: string @@ -4195,7 +4195,7 @@ paths: thumbnail: description: url of the latest screenshot of the node example: - - 'https://placeimg.com/171/96/tech/grayscale/?0.jpg' + - "https://placeimg.com/171/96/tech/grayscale/?0.jpg" format: uri maxLength: 2083 minLength: 0 @@ -4228,7 +4228,7 @@ paths: title: osparc-simcore project type: object responses: - '202': + "202": description: project created content: application/json: @@ -4264,7 +4264,7 @@ paths: parameters: task_id: $response.body#/data/task_id default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /projects/active: get: tags: @@ -4272,7 +4272,7 @@ paths: summary: Gets active project operationId: get_active_project responses: - '200': + "200": description: returns active project content: application/json: @@ -4283,17 +4283,17 @@ paths: properties: data: allOf: - - $ref: '#/paths/~1projects/post/requestBody/content/application~1json/schema' + - $ref: "#/paths/~1projects/post/requestBody/content/application~1json/schema" - type: object properties: state: - $ref: '#/paths/~1projects~1%7Bproject_id%7D~1state/get/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1projects~1%7Bproject_id%7D~1state/get/responses/200/content/application~1json/schema/properties/data" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}": parameters: - name: project_id in: path @@ -4306,14 +4306,14 @@ paths: summary: Gets given project operationId: get_project responses: - '200': + "200": description: got detailed project content: application/json: schema: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" put: tags: - project @@ -4329,25 +4329,25 @@ paths: content: application/json: schema: - $ref: '#/paths/~1projects/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1projects/post/requestBody/content/application~1json/schema" responses: - '200': + "200": description: got detailed project content: application/json: schema: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - project summary: Delete given project operationId: delete_project responses: - '204': + "204": description: project has been successfully deleted - '/projects/{project_id}:open': + "/projects/{project_id}:open": parameters: - name: project_id in: path @@ -4368,15 +4368,15 @@ paths: type: string example: 5ac57685-c40f-448f-8711-70be1936fd63 responses: - '200': + "200": description: project successfuly opened content: application/json: schema: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/state': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/state": parameters: - name: project_id in: path @@ -4389,7 +4389,7 @@ paths: summary: returns the state of a project operationId: get_project_state responses: - '200': + "200": description: returns the project current state content: application/json: @@ -4426,8 +4426,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}:xport': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}:xport": parameters: - name: project_id in: path @@ -4440,7 +4440,7 @@ paths: summary: creates an archive of the project and downloads it operationId: export_project responses: - '200': + "200": description: creates an archive from a project file content: application/zip: @@ -4448,8 +4448,8 @@ paths: type: string format: binary default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}:duplicate': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}:duplicate": parameters: - name: project_id in: path @@ -4462,7 +4462,7 @@ paths: summary: duplicates an existing project operationId: duplicate_project responses: - '200': + "200": description: project was duplicated correctly content: application/json: @@ -4472,8 +4472,8 @@ paths: uuid: type: string default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects:import': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects:import": post: tags: - exporter @@ -4489,7 +4489,7 @@ paths: type: string format: binary responses: - '200': + "200": description: creates a new project from an archive content: application/json: @@ -4499,8 +4499,8 @@ paths: uuid: type: string default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}:close': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}:close": parameters: - name: project_id in: path @@ -4518,13 +4518,13 @@ paths: content: application/json: schema: - $ref: '#/paths/~1projects~1%7Bproject_id%7D%3Aopen/post/requestBody/content/application~1json/schema' + $ref: "#/paths/~1projects~1%7Bproject_id%7D%3Aopen/post/requestBody/content/application~1json/schema" responses: - '204': + "204": description: project succesfuly closed default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes": parameters: - name: project_id in: path @@ -4561,7 +4561,7 @@ paths: service_key: simcore/services/dynamic/3d-viewer service_version: 1.4.0 responses: - '201': + "201": description: created content: application/json: @@ -4583,8 +4583,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}": parameters: - name: project_id in: path @@ -4602,7 +4602,7 @@ paths: description: Gets node status operationId: get_node responses: - '200': + "200": description: OK service exists and runs. Returns node details. content: application/json: @@ -4664,7 +4664,7 @@ paths: description: different base path where current service is mounted otherwise defaults to root type: string example: /x/E1O2E-LAH - default: '' + default: "" service_state: description: | the service state * 'pending' - The service is waiting for resources to start * 'pulling' - The service is being pulled from the registry * 'starting' - The service is starting * 'running' - The service is running * 'complete' - The service completed * 'failed' - The service failed to start @@ -4683,23 +4683,23 @@ paths: user_id: description: the user that started the service type: string - example: '123' + example: "123" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - project description: Stops and removes a node from the project operationId: delete_node responses: - '204': + "204": description: node has been successfully deleted from project default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}:retrieve': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}:retrieve": parameters: - name: project_id in: path @@ -4729,7 +4729,7 @@ paths: items: type: string responses: - '200': + "200": description: Returns the amount of transferred bytes when pulling data via nodeports content: application/json: @@ -4744,8 +4744,8 @@ paths: type: integer description: amount of transferred bytes default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}:start': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}:start": parameters: - name: project_id in: path @@ -4763,11 +4763,11 @@ paths: description: Starts a project dynamic service operationId: start_node responses: - '204': + "204": description: started service (needs to be long running though) default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}:stop': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}:stop": parameters: - name: project_id in: path @@ -4785,11 +4785,11 @@ paths: description: Stops a project node operationId: stop_node responses: - '204': + "204": description: stopped service default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}:restart': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}:restart": parameters: - name: project_id in: path @@ -4807,11 +4807,11 @@ paths: description: Restarts containers started by the dynamic-sidecar operationId: restart_node responses: - '204': + "204": description: Restarts containers started by the dynamic-sidecar default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/nodes/{node_id}/resources': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/nodes/{node_id}/resources": parameters: - name: project_id in: path @@ -4829,7 +4829,7 @@ paths: description: Returns the node resources operationId: get_node_resources responses: - '200': + "200": description: Returns the node resources. content: application/json: @@ -4839,12 +4839,12 @@ paths: - data properties: data: - $ref: '#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/put/requestBody/content/application~1json/schema' + $ref: "#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/put/requestBody/content/application~1json/schema" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" put: tags: - project @@ -4873,15 +4873,15 @@ paths: - type: number - type: string responses: - '200': + "200": description: Returns the udpated node resources. content: application/json: schema: - $ref: '#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_id}/inputs': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_id}/inputs": get: tags: - project @@ -4897,12 +4897,12 @@ paths: name: project_id in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[dict[uuid.UUID, simcore_service_webserver.projects.projects_ports_handlers.ProjectInputGet]]' + title: "Envelope[dict[uuid.UUID, simcore_service_webserver.projects.projects_ports_handlers.ProjectInputGet]]" type: object properties: data: @@ -4966,13 +4966,13 @@ paths: description: Value assigned to this i/o port required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1projects~1%7Bproject_id%7D~1inputs/get/responses/200/content/application~1json/schema' - '/projects/{project_id}/outputs': + $ref: "#/paths/~1projects~1%7Bproject_id%7D~1inputs/get/responses/200/content/application~1json/schema" + "/projects/{project_id}/outputs": get: tags: - project @@ -4988,12 +4988,12 @@ paths: name: project_id in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[dict[uuid.UUID, simcore_service_webserver.projects.projects_ports_handlers.ProjectOutputGet]]' + title: "Envelope[dict[uuid.UUID, simcore_service_webserver.projects.projects_ports_handlers.ProjectOutputGet]]" type: object properties: data: @@ -5020,7 +5020,7 @@ paths: type: string error: title: Error - '/projects/{project_id}/metadata/ports': + "/projects/{project_id}/metadata/ports": get: tags: - project @@ -5036,12 +5036,12 @@ paths: name: project_id in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[list[simcore_service_webserver.projects.projects_ports_handlers.ProjectMetadataPortGet]]' + title: "Envelope[list[simcore_service_webserver.projects.projects_ports_handlers.ProjectMetadataPortGet]]" type: object properties: data: @@ -5068,24 +5068,24 @@ paths: content_schema: title: Content Schema type: object - description: 'jsonschema for the port''s value. SEE https://json-schema.org/understanding-json-schema/' + description: "jsonschema for the port's value. SEE https://json-schema.org/understanding-json-schema/" error: title: Error - '/nodes/{nodeInstanceUUID}/outputUi/{outputKey}': + "/nodes/{nodeInstanceUUID}/outputUi/{outputKey}": get: tags: - node description: get a json description of the ui for presenting the output within the mainUi and a list of open api json schema objects describing the possible json payloads and responses for the api calls available at this endpoint operationId: get_node_output_ui parameters: - - $ref: '#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1iframe/get/parameters/0' + - $ref: "#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1iframe/get/parameters/0" - in: path name: outputKey required: true schema: type: string responses: - '200': + "200": description: Service Information content: application/json: @@ -5130,15 +5130,15 @@ paths: description: Error code type: integer example: 404 - '/nodes/{nodeInstanceUUID}/outputUi/{outputKey}/{apiCall}': + "/nodes/{nodeInstanceUUID}/outputUi/{outputKey}/{apiCall}": post: tags: - node summary: send data back to the output api ... protocol depends on the definition operationId: send_to_node_output_api parameters: - - $ref: '#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1iframe/get/parameters/0' - - $ref: '#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1outputUi~1%7BoutputKey%7D/get/parameters/1' + - $ref: "#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1iframe/get/parameters/0" + - $ref: "#/paths/~1nodes~1%7BnodeInstanceUUID%7D~1outputUi~1%7BoutputKey%7D/get/parameters/1" - in: path name: apiCall required: true @@ -5202,7 +5202,7 @@ paths: label: type: string thumbnail: - description: 'data url - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs' + description: "data url - https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs" type: string - type: object - type: array @@ -5216,7 +5216,7 @@ paths: folder: type: boolean - type: object - '/nodes/{nodeInstanceUUID}/iframe': + "/nodes/{nodeInstanceUUID}/iframe": get: tags: - node @@ -5231,7 +5231,7 @@ paths: responses: default: description: any response appropriate in the iframe context - '/projects/{study_uuid}/tags/{tag_id}': + "/projects/{study_uuid}/tags/{tag_id}": parameters: - name: tag_id in: path @@ -5249,29 +5249,29 @@ paths: summary: Links an existing label with an existing study operationId: add_tag responses: - '200': + "200": description: The tag has been successfully linked to the study content: application/json: schema: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - project summary: Removes an existing link between a label and a study operationId: remove_tag responses: - '200': + "200": description: The tag has been successfully removed from the study content: application/json: schema: - $ref: '#/paths/~1projects~1active/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1active/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/projects/{project_uuid}/checkpoint/{ref_id}/iterations': + $ref: "#/components/responses/DefaultErrorResponse" + "/projects/{project_uuid}/checkpoint/{ref_id}/iterations": get: tags: - meta-projects @@ -5319,12 +5319,12 @@ paths: name: limit in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Page[IterationItem]' + title: "Page[IterationItem]" required: - _meta - _links @@ -5412,7 +5412,7 @@ paths: name: title: Name type: string - description: 'Iteration''s resource name [AIP-122](https://google.aip.dev/122)' + description: "Iteration's resource name [AIP-122](https://google.aip.dev/122)" parent: title: Parent allOf: @@ -5447,9 +5447,9 @@ paths: minLength: 1 type: string format: uri - '404': + "404": description: This project has no iterations.Only meta-project have iterations and they must be explicitly created. - '422': + "422": description: Validation Error content: application/json: @@ -5479,7 +5479,7 @@ paths: type: title: Error Type type: string - '/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}': + "/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}": get: tags: - meta-projects @@ -5510,9 +5510,9 @@ paths: type: integer in: path responses: - '200': + "200": description: Successful Response - '/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results': + "/projects/{project_uuid}/checkpoint/{ref_id}/iterations/-/results": get: tags: - meta-projects @@ -5560,12 +5560,12 @@ paths: name: limit in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Page[IterationResultItem]' + title: "Page[IterationResultItem]" required: - _meta - _links @@ -5573,23 +5573,23 @@ paths: type: object properties: _meta: - $ref: '#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/_meta' + $ref: "#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/_meta" _links: - $ref: '#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/_links' + $ref: "#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/_links" data: title: Data type: array items: - $ref: '#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/data/items' - '404': + $ref: "#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/200/content/application~1json/schema/properties/data/items" + "404": description: This project has no iterations.Only meta-project have iterations and they must be explicitly created. - '422': + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/422/content/application~1json/schema' - '/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results': + $ref: "#/paths/~1projects~1%7Bproject_uuid%7D~1checkpoint~1%7Bref_id%7D~1iterations/get/responses/422/content/application~1json/schema" + "/projects/{project_uuid}/checkpoint/{ref_id}/iterations/{iter_id}/results": get: tags: - meta-projects @@ -5620,7 +5620,7 @@ paths: name: iter_id in: path responses: - '200': + "200": description: Successful Response /repos/projects: get: @@ -5628,7 +5628,7 @@ paths: - repository summary: List Repos description: List info about versioned projects - operationId: simcore_service_webserver.version_control_handlers._list_repos_handler + operationId: simcore_service_webserver.version_control._rest_handlers._list_repos_handler parameters: - description: index to the first item to return (pagination) required: false @@ -5652,12 +5652,12 @@ paths: name: limit in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Page[Repo]' + title: "Page[Repo]" required: - _meta - _links @@ -5749,7 +5749,7 @@ paths: minLength: 1 type: string format: uri - '422': + "422": description: Validation Error content: application/json: @@ -5779,13 +5779,13 @@ paths: type: title: Error Type type: string - '/repos/projects/{project_uuid}/checkpoints': + "/repos/projects/{project_uuid}/checkpoints": get: tags: - repository summary: List Checkpoints description: Lists commits&tags tree of the project - operationId: simcore_service_webserver.version_control_handlers._list_checkpoints_handler + operationId: simcore_service_webserver.version_control._rest_handlers._list_checkpoints_handler parameters: - description: Project unique identifier required: true @@ -5818,12 +5818,12 @@ paths: name: limit in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Page[Checkpoint]' + title: "Page[Checkpoint]" required: - _meta - _links @@ -5831,25 +5831,25 @@ paths: type: object properties: _meta: - $ref: '#/paths/~1repos~1projects/get/responses/200/content/application~1json/schema/properties/_meta' + $ref: "#/paths/~1repos~1projects/get/responses/200/content/application~1json/schema/properties/_meta" _links: - $ref: '#/paths/~1repos~1projects/get/responses/200/content/application~1json/schema/properties/_links' + $ref: "#/paths/~1repos~1projects/get/responses/200/content/application~1json/schema/properties/_links" data: title: Data type: array items: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema/properties/data' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema/properties/data" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" post: tags: - repository summary: Create Checkpoint - operationId: simcore_service_webserver.version_control_handlers._create_checkpoint_handler + operationId: simcore_service_webserver.version_control._rest_handlers._create_checkpoint_handler parameters: - description: Project unique identifier required: true @@ -5877,12 +5877,12 @@ paths: type: string required: true responses: - '201': + "201": description: Successful Response content: application/json: schema: - title: 'Envelope[Checkpoint]' + title: "Envelope[Checkpoint]" type: object properties: data: @@ -5937,19 +5937,19 @@ paths: message: title: Message type: string - '422': + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' - '/repos/projects/{project_uuid}/checkpoints/HEAD': + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" + "/repos/projects/{project_uuid}/checkpoints/HEAD": get: tags: - repository summary: Gets HEAD (i.e. current) checkpoint description: Get current commit - operationId: simcore_service_webserver.version_control_handlers._get_checkpoint_handler_head + operationId: simcore_service_webserver.version_control._rest_handlers._get_checkpoint_handler_head parameters: - description: Project unique identifier required: true @@ -5961,27 +5961,27 @@ paths: name: project_uuid in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' - '/repos/projects/{project_uuid}/checkpoints/{ref_id}': + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" + "/repos/projects/{project_uuid}/checkpoints/{ref_id}": get: tags: - repository summary: Get Checkpoint description: Set ref_id=HEAD to return current commit - operationId: simcore_service_webserver.version_control_handlers._get_checkpoint_handler + operationId: simcore_service_webserver.version_control._rest_handlers._get_checkpoint_handler parameters: - - description: 'A repository ref (commit, tag or branch)' + - description: "A repository ref (commit, tag or branch)" required: true schema: title: Ref Id @@ -5989,7 +5989,7 @@ paths: - type: string format: uuid - type: string - description: 'A repository ref (commit, tag or branch)' + description: "A repository ref (commit, tag or branch)" name: ref_id in: path - description: Project unique identifier @@ -6002,25 +6002,25 @@ paths: name: project_uuid in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" patch: tags: - repository summary: Update Checkpoint Annotations - operationId: simcore_service_webserver.version_control_handlers._update_checkpoint_annotations_handler + operationId: simcore_service_webserver.version_control._rest_handlers._update_checkpoint_annotations_handler parameters: - - description: 'A repository ref (commit, tag or branch)' + - description: "A repository ref (commit, tag or branch)" required: true schema: title: Ref Id @@ -6028,7 +6028,7 @@ paths: - type: string format: uuid - type: string - description: 'A repository ref (commit, tag or branch)' + description: "A repository ref (commit, tag or branch)" name: ref_id in: path - description: Project unique identifier @@ -6055,19 +6055,19 @@ paths: type: string required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' - '/repos/projects/{project_uuid}/checkpoints/{ref_id}:checkout': + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" + "/repos/projects/{project_uuid}/checkpoints/{ref_id}:checkout": post: tags: - repository @@ -6075,9 +6075,9 @@ paths: description: |- Affect current working copy of the project, i.e. get_project will now return the check out - operationId: simcore_service_webserver.version_control_handlers._checkout_handler + operationId: simcore_service_webserver.version_control._rest_handlers._checkout_handler parameters: - - description: 'A repository ref (commit, tag or branch)' + - description: "A repository ref (commit, tag or branch)" required: true schema: title: Ref Id @@ -6085,7 +6085,7 @@ paths: - type: string format: uuid - type: string - description: 'A repository ref (commit, tag or branch)' + description: "A repository ref (commit, tag or branch)" name: ref_id in: path - description: Project unique identifier @@ -6098,27 +6098,27 @@ paths: name: project_uuid in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' - '/repos/projects/{project_uuid}/checkpoints/{ref_id}/workbench/view': + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" + "/repos/projects/{project_uuid}/checkpoints/{ref_id}/workbench/view": get: tags: - repository summary: View Project Workbench description: Returns a view of the workbench for a given project's version - operationId: simcore_service_webserver.version_control_handlers._view_project_workbench_handler + operationId: simcore_service_webserver.version_control._rest_handlers._view_project_workbench_handler parameters: - - description: 'A repository ref (commit, tag or branch)' + - description: "A repository ref (commit, tag or branch)" required: true schema: title: Ref Id @@ -6126,7 +6126,7 @@ paths: - type: string format: uuid - type: string - description: 'A repository ref (commit, tag or branch)' + description: "A repository ref (commit, tag or branch)" name: ref_id in: path - description: Project unique identifier @@ -6139,12 +6139,12 @@ paths: name: project_uuid in: path responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[WorkbenchView]' + title: "Envelope[WorkbenchView]" type: object properties: data: @@ -6187,21 +6187,21 @@ paths: default: {} description: A view (i.e. read-only and visual) of the project's workbench error: - $ref: '#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema/properties/error' - '422': + $ref: "#/paths/~1repos~1projects~1%7Bproject_uuid%7D~1checkpoints/post/responses/201/content/application~1json/schema/properties/error" + "422": description: Validation Error content: application/json: schema: - $ref: '#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1repos~1projects/get/responses/422/content/application~1json/schema" /activity/status: get: operationId: get_status tags: - activity responses: - '200': - description: 'Object containing queuing, CPU and Memory usage/limits information of services' + "200": + description: "Object containing queuing, CPU and Memory usage/limits information of services" content: application/json: schema: @@ -6234,7 +6234,7 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /tags: get: tags: @@ -6242,19 +6242,19 @@ paths: summary: List Tags operationId: list_tags responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[list[simcore_service_webserver.tags_handlers.TagGet]]' + title: "Envelope[list[simcore_service_webserver.tags_handlers.TagGet]]" type: object properties: data: title: Data type: array items: - $ref: '#/paths/~1tags/post/responses/200/content/application~1json/schema/properties/data' + $ref: "#/paths/~1tags/post/responses/200/content/application~1json/schema/properties/data" error: title: Error post: @@ -6280,17 +6280,17 @@ paths: type: string color: title: Color - pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$' + pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$" type: string additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[TagGet]' + title: "Envelope[TagGet]" type: object properties: data: @@ -6335,7 +6335,7 @@ paths: type: boolean error: title: Error - '/tags/{tag_id}': + "/tags/{tag_id}": delete: tags: - tag @@ -6349,7 +6349,7 @@ paths: name: tag_id in: path responses: - '204': + "204": description: Successful Response patch: tags: @@ -6378,17 +6378,17 @@ paths: type: string color: title: Color - pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$' + pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$" type: string additionalProperties: false required: true responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1tags/post/responses/200/content/application~1json/schema' + $ref: "#/paths/~1tags/post/responses/200/content/application~1json/schema" /publications/service-submission: post: tags: @@ -6410,22 +6410,22 @@ paths: type: string format: binary responses: - '204': + "204": description: Submission has been registered default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /catalog/dags: get: tags: - catalog operationId: list_catalog_dags responses: - '200': + "200": description: List of catalog dags - '422': + "422": description: Validation Error default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: tags: - catalog @@ -6438,13 +6438,13 @@ paths: type: object additionalProperties: true responses: - '201': + "201": description: The dag was successfully created - '422': + "422": description: Validation Error default: - $ref: '#/components/responses/DefaultErrorResponse' - '/catalog/dags/{dag_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/catalog/dags/{dag_id}": parameters: - in: path name: dag_id @@ -6464,21 +6464,21 @@ paths: type: object additionalProperties: true responses: - '200': + "200": description: The dag was replaced in catalog - '422': + "422": description: Validation Error default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - catalog summary: Deletes an existing dag operationId: delete_catalog_dag responses: - '204': + "204": description: Successfully deleted - '422': + "422": description: Validation Error /catalog/services: get: @@ -6487,11 +6487,11 @@ paths: summary: List Services operationId: list_services_handler responses: - '200': + "200": description: Returns list of services from the catalog default: - $ref: '#/components/responses/DefaultErrorResponse' - '/catalog/services/{service_key}/{service_version}': + $ref: "#/components/responses/DefaultErrorResponse" + "/catalog/services/{service_key}/{service_version}": parameters: - in: path name: service_key @@ -6513,10 +6513,10 @@ paths: summary: Get Service operationId: get_service_handler responses: - '200': + "200": description: Returns service default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" patch: tags: - catalog @@ -6529,11 +6529,11 @@ paths: type: object additionalProperties: true responses: - '200': + "200": description: Returns modified service default: - $ref: '#/components/responses/DefaultErrorResponse' - '/catalog/services/{service_key}/{service_version}/inputs': + $ref: "#/components/responses/DefaultErrorResponse" + "/catalog/services/{service_key}/{service_version}/inputs": get: tags: - catalog @@ -6554,7 +6554,7 @@ paths: title: Service Version type: string responses: - '200': + "200": content: application/json: schema: @@ -6597,7 +6597,7 @@ paths: type: object keyId: description: Unique name identifier for this input - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Keyid type: string label: @@ -6611,15 +6611,15 @@ paths: title: Type type: string unit: - description: 'Units, when it refers to a physical quantity' + description: "Units, when it refers to a physical quantity" title: Unit type: string unitLong: - description: 'Long name of the unit, if available' + description: "Long name of the unit, if available" title: Unitlong type: string unitShort: - description: 'Short name for the unit, if available' + description: "Short name for the unit, if available" title: Unitshort type: string widget: @@ -6692,7 +6692,7 @@ paths: title: ServiceInputApiOut type: object description: Successful Response - '422': + "422": content: application/json: schema: @@ -6723,7 +6723,7 @@ paths: type: object description: Validation Error summary: List Service Inputs - '/catalog/services/{service_key}/{service_version}/inputs/{input_key}': + "/catalog/services/{service_key}/{service_version}/inputs/{input_key}": get: tags: - catalog @@ -6747,28 +6747,28 @@ paths: name: input_key required: true schema: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Input Key type: string responses: - '200': + "200": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/200/content/application~1json/schema" description: Successful Response - '422': + "422": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema" description: Validation Error summary: Get Service Input - '/catalog/services/{service_key}/{service_version}/inputs:match': + "/catalog/services/{service_key}/{service_version}/inputs:match": get: tags: - catalog - description: 'Filters inputs of this service that match a given service output. Returns compatible input ports of the service, provided an output port of a connected node.' + description: "Filters inputs of this service that match a given service output. Returns compatible input ports of the service, provided an output port of a connected node." operationId: get_compatible_inputs_given_source_output_handler parameters: - in: path @@ -6803,28 +6803,28 @@ paths: name: fromOutput required: true schema: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Fromoutput type: string responses: - '200': + "200": content: application/json: schema: items: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" type: string title: Response Get Compatible Inputs Given Source Output Catalog Services Service Key Service Version Inputs Match Get type: array description: Successful Response - '422': + "422": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema" description: Validation Error summary: Get Compatible Inputs Given Source Output - '/catalog/services/{service_key}/{service_version}/outputs': + "/catalog/services/{service_key}/{service_version}/outputs": get: tags: - catalog @@ -6845,23 +6845,23 @@ paths: title: Service Version type: string responses: - '200': + "200": content: application/json: schema: items: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1outputs~1%7Boutput_key%7D/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1outputs~1%7Boutput_key%7D/get/responses/200/content/application~1json/schema" title: Response List Service Outputs Catalog Services Service Key Service Version Outputs Get type: array description: Successful Response - '422': + "422": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema" description: Validation Error summary: List Service Outputs - '/catalog/services/{service_key}/{service_version}/outputs/{output_key}': + "/catalog/services/{service_key}/{service_version}/outputs/{output_key}": get: tags: - catalog @@ -6885,11 +6885,11 @@ paths: name: output_key required: true schema: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Output Key type: string responses: - '200': + "200": content: application/json: schema: @@ -6932,7 +6932,7 @@ paths: type: object keyId: description: Unique name identifier for this input - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Keyid type: string label: @@ -6946,20 +6946,20 @@ paths: title: Type type: string unit: - description: 'Units, when it refers to a physical quantity' + description: "Units, when it refers to a physical quantity" title: Unit type: string unitLong: - description: 'Long name of the unit, if available' + description: "Long name of the unit, if available" title: Unitlong type: string unitShort: - description: 'Short name for the unit, if available' + description: "Short name for the unit, if available" title: Unitshort type: string widget: allOf: - - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/200/content/application~1json/schema/properties/widget/allOf/0' + - $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/200/content/application~1json/schema/properties/widget/allOf/0" deprecated: true description: custom widget to use instead of the default one determined from the data-type title: Widget @@ -6972,14 +6972,14 @@ paths: title: ServiceOutputApiOut type: object description: Successful Response - '422': + "422": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema" description: Validation Error summary: Get Service Output - '/catalog/services/{service_key}/{service_version}/outputs:match': + "/catalog/services/{service_key}/{service_version}/outputs:match": get: tags: - catalog @@ -7018,28 +7018,28 @@ paths: name: toInput required: true schema: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" title: Toinput type: string responses: - '200': + "200": content: application/json: schema: items: - pattern: '^[-_a-zA-Z0-9]+$' + pattern: "^[-_a-zA-Z0-9]+$" type: string title: Response Get Compatible Outputs Given Target Input Catalog Services Service Key Service Version Outputs Match Get type: array description: Successful Response - '422': + "422": content: application/json: schema: - $ref: '#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema' + $ref: "#/paths/~1catalog~1services~1%7Bservice_key%7D~1%7Bservice_version%7D~1inputs/get/responses/422/content/application~1json/schema" description: Validation Error summary: Get Compatible Outputs Given Target Input - '/catalog/services/{service_key}/{service_version}/resources': + "/catalog/services/{service_key}/{service_version}/resources": get: tags: - catalog @@ -7061,15 +7061,15 @@ paths: title: Service Version type: string responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1projects~1%7Bproject_id%7D~1nodes~1%7Bnode_id%7D~1resources/get/responses/200/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' - '/clusters:ping': + $ref: "#/components/responses/DefaultErrorResponse" + "/clusters:ping": post: summary: test connectivity with cluster operationId: ping_cluster_handler @@ -7090,18 +7090,18 @@ paths: authentication: description: Dask gateway authentication anyOf: - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2' + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2" required: - endpoint - authentication additionalProperties: false responses: - '204': + "204": description: connectivity is OK default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /clusters: get: summary: List my clusters @@ -7109,7 +7109,7 @@ paths: tags: - cluster responses: - '200': + "200": description: list of the clusters I have access to content: application/json: @@ -7121,12 +7121,12 @@ paths: data: type: array items: - $ref: '#/paths/~1clusters/post/responses/201/content/application~1json/schema/properties/data' + $ref: "#/paths/~1clusters/post/responses/201/content/application~1json/schema/properties/data" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" post: summary: Create a new cluster operationId: create_cluster_handler @@ -7204,7 +7204,7 @@ paths: - authentication additionalProperties: false responses: - '201': + "201": description: cluster created content: application/json: @@ -7246,15 +7246,15 @@ paths: authentication: description: Dask gateway authentication anyOf: - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2' + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2" accessRights: type: object description: object containing the GroupID as key and read/write/execution permissions as value x-patternProperties: ^\S+$: - $ref: '#/paths/~1clusters~1%7Bcluster_id%7D/patch/requestBody/content/application~1json/schema/properties/accessRights/x-patternProperties/%5E%5CS%2B%24' + $ref: "#/paths/~1clusters~1%7Bcluster_id%7D/patch/requestBody/content/application~1json/schema/properties/accessRights/x-patternProperties/%5E%5CS%2B%24" required: - id - name @@ -7266,14 +7266,14 @@ paths: - id: 1 name: AWS cluster type: AWS - endpoint: 'https://registry.osparc-development.fake.dev' + endpoint: "https://registry.osparc-development.fake.dev" authentication: type: simple username: someuser password: somepassword owner: 2 accessRights: - '2': + "2": read: true write: true delete: true @@ -7281,8 +7281,8 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' - '/clusters/{cluster_id}': + $ref: "#/components/responses/DefaultErrorResponse" + "/clusters/{cluster_id}": parameters: - name: cluster_id in: path @@ -7295,14 +7295,14 @@ paths: summary: Gets one cluster operationId: get_cluster_handler responses: - '200': + "200": description: got cluster content: application/json: schema: - $ref: '#/paths/~1clusters/post/responses/201/content/application~1json/schema' + $ref: "#/paths/~1clusters/post/responses/201/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" patch: summary: Update one cluster operationId: update_cluster_handler @@ -7341,9 +7341,9 @@ paths: authentication: description: Dask gateway authentication anyOf: - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1' - - $ref: '#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2' + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/0" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/1" + - $ref: "#/paths/~1clusters/post/requestBody/content/application~1json/schema/properties/authentication/anyOf/2" accessRights: type: object description: object containing the GroupID as key and read/write/execution permissions as value @@ -7367,25 +7367,25 @@ paths: - delete additionalProperties: false responses: - '200': + "200": description: the modified cluster content: application/json: schema: - $ref: '#/paths/~1clusters/post/responses/201/content/application~1json/schema' + $ref: "#/paths/~1clusters/post/responses/201/content/application~1json/schema" default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: tags: - cluster summary: Deletes one cluster operationId: delete_cluster_handler responses: - '204': + "204": description: cluster has been successfully deleted default: - $ref: '#/components/responses/DefaultErrorResponse' - '/clusters/{cluster_id}:ping': + $ref: "#/components/responses/DefaultErrorResponse" + "/clusters/{cluster_id}:ping": parameters: - name: cluster_id in: path @@ -7398,11 +7398,11 @@ paths: tags: - cluster responses: - '204': + "204": description: connectivity is OK default: - $ref: '#/components/responses/DefaultErrorResponse' - '/clusters/{cluster_id}/details': + $ref: "#/components/responses/DefaultErrorResponse" + "/clusters/{cluster_id}/details": parameters: - name: cluster_id in: path @@ -7415,7 +7415,7 @@ paths: summary: Gets one cluster details operationId: get_cluster_details_handler responses: - '200': + "200": description: got cluster content: application/json: @@ -7446,22 +7446,22 @@ paths: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /tasks: get: operationId: list_tasks tags: - tasks responses: - '200': + "200": description: Returns the list of active tasks (running and/or done) content: application/json: schema: type: array items: - $ref: '#/paths/~1projects/post/responses/202/content/application~1json/schema' - '/tasks/{task_id}': + $ref: "#/paths/~1projects/post/responses/202/content/application~1json/schema" + "/tasks/{task_id}": parameters: - name: task_id in: path @@ -7473,7 +7473,7 @@ paths: tags: - tasks responses: - '200': + "200": description: Returns the task status content: application/json: @@ -7498,23 +7498,23 @@ paths: started: type: string pattern: '\d{4}-(12|11|10|0?[1-9])-(31|30|[0-2]?\d)T(2[0-3]|1\d|0?[0-9])(:(\d|[0-5]\d)){2}(\.\d{3})?Z' - example: '2018-07-01T11:13:43Z' + example: "2018-07-01T11:13:43Z" error: nullable: true default: null default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" delete: operationId: cancel_and_delete_task description: Aborts and remove the task tags: - tasks responses: - '204': + "204": description: Task was successfully aborted default: - $ref: '#/components/responses/DefaultErrorResponse' - '/tasks/{task_id}/result': + $ref: "#/components/responses/DefaultErrorResponse" + "/tasks/{task_id}/result": parameters: - name: task_id in: path @@ -7529,7 +7529,7 @@ paths: 2XX: description: Retrieve the task result and returns directly its HTTP code default: - $ref: '#/components/responses/DefaultErrorResponse' + $ref: "#/components/responses/DefaultErrorResponse" /services: get: tags: @@ -7538,12 +7538,12 @@ paths: description: Returns a list latest version of services operationId: list_services responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[list[simcore_service_webserver.studies_dispatcher.handlers_rest.ServiceGet]]' + title: "Envelope[list[simcore_service_webserver.studies_dispatcher.handlers_rest.ServiceGet]]" type: object properties: data: @@ -7596,11 +7596,11 @@ paths: key: simcore/services/dynamic/sim4life title: Sim4Life Mattermost description: It is also sim4life for the web - thumbnail: 'https://via.placeholder.com/170x120.png' + thumbnail: "https://via.placeholder.com/170x120.png" file_extensions: - smash - h5 - view_url: 'https://host.com/view?viewer_key=simcore/services/dynamic/raw-graphs&viewer_version=1.2.3' + view_url: "https://host.com/view?viewer_key=simcore/services/dynamic/raw-graphs&viewer_version=1.2.3" error: title: Error /viewers: @@ -7623,12 +7623,12 @@ paths: name: file_type in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - title: 'Envelope[list[simcore_service_webserver.studies_dispatcher.handlers_rest.Viewer]]' + title: "Envelope[list[simcore_service_webserver.studies_dispatcher.handlers_rest.Viewer]]" type: object properties: data: @@ -7655,7 +7655,7 @@ paths: maxLength: 2083 minLength: 1 type: string - description: 'Base url to execute viewer. Needs appending file_size,[file_name] and download_link as query parameters' + description: "Base url to execute viewer. Needs appending file_size,[file_name] and download_link as query parameters" format: uri description: |- API model for a viewer resource @@ -7695,12 +7695,12 @@ paths: name: file_type in: query responses: - '200': + "200": description: Successful Response content: application/json: schema: - $ref: '#/paths/~1viewers/get/responses/200/content/application~1json/schema' + $ref: "#/paths/~1viewers/get/responses/200/content/application~1json/schema" /view: get: tags: @@ -7769,9 +7769,9 @@ paths: description: This pair uniquely identifies a services required: true responses: - '302': + "302": description: Opens osparc and starts viewer for selected data - '/study/{study_id}': + "/study/{study_id}": get: tags: - nih-sparc @@ -7787,7 +7787,7 @@ paths: name: study_id in: path responses: - '302': + "302": description: Opens osparc and opens a copy of publised study components: responses: @@ -7823,7 +7823,7 @@ components: - INFO - ERROR message: - description: 'log message. If logger is USER, then it MUST be human readable' + description: "log message. If logger is USER, then it MUST be human readable" type: string logger: description: name of the logger receiving this message @@ -7831,7 +7831,7 @@ components: required: - message example: - message: 'Hi there, Mr user' + message: "Hi there, Mr user" level: INFO logger: user-logger errors: diff --git a/services/web/server/src/simcore_service_webserver/application.py b/services/web/server/src/simcore_service_webserver/application.py index 370af587fdb..ac0a80dd626 100644 --- a/services/web/server/src/simcore_service_webserver/application.py +++ b/services/web/server/src/simcore_service_webserver/application.py @@ -7,7 +7,6 @@ from aiohttp import web from servicelib.aiohttp.application import create_safe_application -from simcore_service_webserver.invitations import setup_invitations from ._meta import WELCOME_GC_MSG, WELCOME_MSG, info from .activity.plugin import setup_activity @@ -23,6 +22,7 @@ from .exporter.plugin import setup_exporter from .garbage_collector import setup_garbage_collector from .groups import setup_groups +from .invitations import setup_invitations from .login.plugin import setup_login from .long_running_tasks import setup_long_running_tasks from .meta_modeling import setup_meta_modeling @@ -44,7 +44,7 @@ from .tags import setup_tags from .tracing import setup_app_tracing from .users import setup_users -from .version_control import setup_version_control +from .version_control.plugin import setup_version_control logger = logging.getLogger(__name__) diff --git a/services/web/server/src/simcore_service_webserver/director_v2_handlers.py b/services/web/server/src/simcore_service_webserver/director_v2_handlers.py index 7214cecfdb5..f1c94a3b6ee 100644 --- a/services/web/server/src/simcore_service_webserver/director_v2_handlers.py +++ b/services/web/server/src/simcore_service_webserver/director_v2_handlers.py @@ -1,6 +1,6 @@ import asyncio import logging -from typing import Any, Optional +from typing import Any from aiohttp import web from models_library.clusters import ClusterID @@ -19,7 +19,7 @@ from .director_v2_exceptions import DirectorServiceError from .login.decorators import RQT_USERID_KEY, login_required from .security_decorators import permission_required -from .version_control_db import CommitID +from .version_control.db import CommitID log = logging.getLogger(__name__) @@ -156,7 +156,7 @@ async def stop_computation(request: web.Request) -> web.Response: class ComputationTaskGet(BaseModel): - cluster_id: Optional[ClusterID] + cluster_id: ClusterID | None @routes.get(f"/{VTAG}/computations/{{project_id}}") diff --git a/services/web/server/src/simcore_service_webserver/login/handlers_confirmation.py b/services/web/server/src/simcore_service_webserver/login/handlers_confirmation.py index 7c69566df94..833176eadcf 100644 --- a/services/web/server/src/simcore_service_webserver/login/handlers_confirmation.py +++ b/services/web/server/src/simcore_service_webserver/login/handlers_confirmation.py @@ -1,5 +1,4 @@ import logging -from typing import Optional from aiohttp import web from aiohttp.web import RouteTableDef @@ -12,11 +11,11 @@ from servicelib.error_codes import create_error_code from servicelib.mimetype_constants import MIMETYPE_APPLICATION_JSON from simcore_postgres_database.errors import UniqueViolation -from simcore_service_webserver.session_access import session_access_required from yarl import URL from ..products import Product, get_current_product from ..security_api import encrypt_password +from ..session_access import session_access_required from ..utils import MINUTE from ..utils_aiohttp import create_redirect_response from ..utils_rate_limiting import global_rate_limit_route @@ -70,7 +69,7 @@ async def validate_confirmation_and_redirect(request: web.Request): path_params = parse_request_path_parameters_as(_PathParam, request) - confirmation: Optional[ConfirmationTokenDict] = await validate_confirmation_code( + confirmation: ConfirmationTokenDict | None = await validate_confirmation_code( path_params.code.get_secret_value(), db=db, cfg=cfg ) diff --git a/services/web/server/src/simcore_service_webserver/login/utils_email.py b/services/web/server/src/simcore_service_webserver/login/utils_email.py index bc2f9fab448..0a326e8eb79 100644 --- a/services/web/server/src/simcore_service_webserver/login/utils_email.py +++ b/services/web/server/src/simcore_service_webserver/login/utils_email.py @@ -3,10 +3,10 @@ from pathlib import Path from aiohttp import web -from simcore_service_webserver.products import get_product_template_path from .._resources import resources from ..email_core import AttachmentTuple, send_email_from_template +from ..products import get_product_template_path log = logging.getLogger(__name__) diff --git a/services/web/server/src/simcore_service_webserver/meta_modeling_handlers.py b/services/web/server/src/simcore_service_webserver/meta_modeling_handlers.py index 628c548ea3f..ea6dd6a4158 100644 --- a/services/web/server/src/simcore_service_webserver/meta_modeling_handlers.py +++ b/services/web/server/src/simcore_service_webserver/meta_modeling_handlers.py @@ -2,7 +2,7 @@ """ import logging -from typing import Callable, NamedTuple, Optional +from typing import Callable, NamedTuple from aiohttp import web from models_library.projects import ProjectID @@ -20,8 +20,8 @@ from .meta_modeling_version_control import VersionControlForMetaModeling from .security_decorators import permission_required from .utils_aiohttp import create_url_for_function, envelope_json_response -from .version_control_models import CheckpointID, CommitID, TagProxy -from .version_control_tags import parse_workcopy_project_tag_name +from .version_control.models import CheckpointID, CommitID, TagProxy +from .version_control.vc_tags import parse_workcopy_project_tag_name log = logging.getLogger(__name__) @@ -76,7 +76,7 @@ async def _get_project_iterations_range( project_uuid: ProjectID, commit_id: CommitID, offset: int = 0, - limit: Optional[int] = None, + limit: int | None = None, ) -> _IterationsRange: assert offset >= 0 # nosec @@ -96,8 +96,8 @@ async def _get_project_iterations_range( iter_items: list[IterationItem] = [] for n, tags in enumerate(tags_per_child): try: - iteration: Optional[ProjectIteration] = None - workcopy_id: Optional[ProjectID] = None + iteration: ProjectIteration | None = None + workcopy_id: ProjectID | None = None for tag in tags: if pim := ProjectIteration.from_tag_name( diff --git a/services/web/server/src/simcore_service_webserver/meta_modeling_iterations.py b/services/web/server/src/simcore_service_webserver/meta_modeling_iterations.py index ba2033fb8c2..c1504495992 100644 --- a/services/web/server/src/simcore_service_webserver/meta_modeling_iterations.py +++ b/services/web/server/src/simcore_service_webserver/meta_modeling_iterations.py @@ -7,7 +7,7 @@ import logging import re from copy import deepcopy -from typing import Any, Dict, Generator, Iterator, List, Literal, Optional, Tuple, Union +from typing import Any, Generator, Iterator, Literal, Optional from aiohttp import web from models_library.basic_types import MD5Str, SHA1Str @@ -26,15 +26,15 @@ VersionControlForMetaModeling, ) from .utils import compute_sha1_on_small_dataset, now_str -from .version_control_errors import UserUndefined +from .version_control.errors import UserUndefined log = logging.getLogger(__name__) -NodesDict = Dict[NodeID, Node] -NodeOutputsDict = Dict[OutputID, OutputTypes] -Parameters = Tuple[NodeOutputsDict] -_ParametersNodesPair = Tuple[Parameters, NodesDict] +NodesDict = dict[NodeID, Node] +NodeOutputsDict = dict[OutputID, OutputTypes] +Parameters = tuple[NodeOutputsDict] +_ParametersNodesPair = tuple[Parameters, NodesDict] def _compute_params_checksum(parameters: Parameters) -> MD5Str: @@ -43,16 +43,16 @@ def _compute_params_checksum(parameters: Parameters) -> MD5Str: return compute_sha1_on_small_dataset(parameters) -def _build_project_iterations(project_nodes: NodesDict) -> List[_ParametersNodesPair]: +def _build_project_iterations(project_nodes: NodesDict) -> list[_ParametersNodesPair]: """Builds changing instances (i.e. iterations) of the meta-project This interface only knows about project/node models and parameters """ # select iterable nodes - iterable_nodes_defs: List[ServiceDockerData] = [] # schemas of iterable nodes - iterable_nodes: List[Node] = [] # iterable nodes - iterable_nodes_ids: List[NodeID] = [] + iterable_nodes_defs: list[ServiceDockerData] = [] # schemas of iterable nodes + iterable_nodes: list[Node] = [] # iterable nodes + iterable_nodes_ids: list[NodeID] = [] for node_id, node in project_nodes.items(): if is_iterator_service(node.key): @@ -80,8 +80,8 @@ def _build_project_iterations(project_nodes: NodesDict) -> List[_ParametersNodes assert isinstance(g, Iterator) # nosec nodes_generators.append(g) - updated_nodes_per_iter: List[NodesDict] = [] - parameters_per_iter: List[Tuple[NodeOutputsDict]] = [] + updated_nodes_per_iter: list[NodesDict] = [] + parameters_per_iter: list[tuple[NodeOutputsDict]] = [] for parameters in itertools.product(*nodes_generators): # Q: what if iter are infinite? @@ -138,7 +138,7 @@ class ProjectIteration(BaseModel): """ # version-control info - repo_id: Optional[int] = None + repo_id: int | None = None repo_commit_id: CommitID = Field( ..., description="this id makes it unique but does not guarantees order. See iter_index for that", @@ -149,7 +149,7 @@ class ProjectIteration(BaseModel): ..., description="Index that allows iterations to be sortable", ) - total_count: Union[int, Literal["unbound"]] = "unbound" + total_count: int | Literal["unbound"] = "unbound" parameters_checksum: SHA1Str = Field(...) @classmethod @@ -182,14 +182,14 @@ def to_tag_name(self) -> str: def compose_iteration_tag_name( repo_commit_id: CommitID, iteration_index: IterationID, - total_count: Union[int, str], + total_count: int | str, parameters_checksum: SHA1Str, ) -> str: """Composes unique tag name for iter_index-th iteration of repo_commit_id out of total_count""" return f"iteration:{repo_commit_id}/{iteration_index}/{total_count}/{parameters_checksum}" -def parse_iteration_tag_name(name: str) -> Dict[str, Any]: +def parse_iteration_tag_name(name: str) -> dict[str, Any]: if m := re.match( r"^iteration:(?P\d+)/(?P\d+)/(?P-*\d+)/(?P.*)$", name, @@ -204,7 +204,7 @@ def parse_iteration_tag_name(name: str) -> Dict[str, Any]: async def get_or_create_runnable_projects( request: web.Request, project_uuid: ProjectID, -) -> Tuple[List[ProjectID], List[CommitID]]: +) -> tuple[list[ProjectID], list[CommitID]]: """ Returns ids and refid of projects that can run If project_uuid is a std-project, then it returns itself @@ -219,13 +219,13 @@ async def get_or_create_runnable_projects( except UserUndefined as err: raise web.HTTPForbidden(reason="Unauthenticated request") from err - project_nodes: Dict[NodeID, Node] = { + project_nodes: dict[NodeID, Node] = { nid: Node.parse_obj(n) for nid, n in project["workbench"].items() } # init returns - runnable_project_vc_commits: List[CommitID] = [] - runnable_project_ids: List[ProjectID] = [ + runnable_project_vc_commits: list[CommitID] = [] + runnable_project_ids: list[ProjectID] = [ project_uuid, ] @@ -321,19 +321,19 @@ async def get_or_create_runnable_projects( async def get_runnable_projects_ids( request: web.Request, project_uuid: ProjectID, -) -> List[ProjectID]: +) -> list[ProjectID]: vc_repo = VersionControlForMetaModeling(request) assert vc_repo.user_id # nosec project: ProjectDict = await vc_repo.get_project(str(project_uuid)) assert project["uuid"] == str(project_uuid) # nosec - project_nodes: Dict[NodeID, Node] = { + project_nodes: dict[NodeID, Node] = { nid: Node.parse_obj(n) for nid, n in project["workbench"].items() } # init returns - runnable_project_ids: List[ProjectID] = [] + runnable_project_ids: list[ProjectID] = [] # std-project is_meta_project = any( diff --git a/services/web/server/src/simcore_service_webserver/meta_modeling_version_control.py b/services/web/server/src/simcore_service_webserver/meta_modeling_version_control.py index cad0b62a425..d771f3036e5 100644 --- a/services/web/server/src/simcore_service_webserver/meta_modeling_version_control.py +++ b/services/web/server/src/simcore_service_webserver/meta_modeling_version_control.py @@ -4,28 +4,27 @@ import logging from types import SimpleNamespace -from typing import List, Optional from aiopg.sa.result import RowProxy from models_library.projects import ProjectIDStr from models_library.utils.fastapi_encoders import jsonable_encoder from .projects.project_models import ProjectDict -from .version_control_changes import ( +from .version_control.db import VersionControlRepository +from .version_control.errors import UserUndefined +from .version_control.models import CommitID, TagProxy +from .version_control.vc_changes import ( compute_workbench_checksum, eval_workcopy_project_id, ) -from .version_control_db import VersionControlRepository -from .version_control_errors import UserUndefined -from .version_control_models import CommitID, TagProxy -from .version_control_tags import compose_workcopy_project_tag_name +from .version_control.vc_tags import compose_workcopy_project_tag_name log = logging.getLogger(__name__) class VersionControlForMetaModeling(VersionControlRepository): async def get_workcopy_project_id( - self, repo_id: int, commit_id: Optional[int] = None + self, repo_id: int, commit_id: int | None = None ) -> ProjectIDStr: async with self.engine.acquire() as conn: if commit_id is None: @@ -44,7 +43,7 @@ async def get_workcopy_project(self, repo_id: int, commit_id: int) -> ProjectDic return dict(project.items()) async def get_project( - self, project_id: ProjectIDStr, *, include: Optional[List[str]] = None + self, project_id: ProjectIDStr, *, include: list[str] | None = None ) -> ProjectDict: async with self.engine.acquire() as conn: if self.user_id is None: @@ -165,7 +164,7 @@ async def create_workcopy_and_branch_from_commit( async def get_children_tags( self, repo_id: int, commit_id: int - ) -> List[List[TagProxy]]: + ) -> list[list[TagProxy]]: async with self.engine.acquire() as conn: commits = ( await self.CommitsOrm(conn) diff --git a/services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py b/services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py index 5f3ca7e12bd..2ffb79b17e3 100644 --- a/services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py +++ b/services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py @@ -25,11 +25,11 @@ from pydantic import parse_obj_as from servicelib.aiohttp.typing_extension import Handler from servicelib.error_codes import create_error_code -from simcore_service_webserver.projects.project_models import ProjectDict from .._constants import INDEX_RESOURCE_NAME from ..garbage_collector_settings import GUEST_USER_RC_LOCK_FORMAT from ..products import get_product_name +from ..projects.project_models import ProjectDict from ..projects.projects_db import ANY_USER, ProjectDBAPI from ..projects.projects_exceptions import ( ProjectInvalidRightsError, diff --git a/services/web/server/src/simcore_service_webserver/utils.py b/services/web/server/src/simcore_service_webserver/utils.py index a2a733e1a82..aa0164a474a 100644 --- a/services/web/server/src/simcore_service_webserver/utils.py +++ b/services/web/server/src/simcore_service_webserver/utils.py @@ -11,7 +11,7 @@ from collections import OrderedDict from datetime import datetime from pathlib import Path -from typing import Any +from typing import Any, cast import orjson from models_library.basic_types import SHA1Str @@ -179,4 +179,4 @@ def compute_sha1_on_small_dataset(d: Any) -> SHA1Str: """ # SEE options in https://github.com/ijl/orjson#option data_bytes = orjson.dumps(d, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SORT_KEYS) - return hashlib.sha1(data_bytes).hexdigest() # nosec + return cast(SHA1Str, hashlib.sha1(data_bytes).hexdigest()) # nosec diff --git a/services/web/server/src/simcore_service_webserver/version_control/__init__.py b/services/web/server/src/simcore_service_webserver/version_control/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/services/web/server/src/simcore_service_webserver/version_control_core.py b/services/web/server/src/simcore_service_webserver/version_control/_core.py similarity index 82% rename from services/web/server/src/simcore_service_webserver/version_control_core.py rename to services/web/server/src/simcore_service_webserver/version_control/_core.py index f1685c86f2d..b9194cef445 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_core.py +++ b/services/web/server/src/simcore_service_webserver/version_control/_core.py @@ -9,17 +9,14 @@ more fine grained concepts as tags and commits directly """ import logging -from typing import List, Optional, Tuple from uuid import UUID from aiopg.sa.result import RowProxy from pydantic import NonNegativeInt, PositiveInt, validate_arguments -from .version_control_db import CommitLog, VersionControlRepository -from .version_control_errors import CleanRequiredError -from .version_control_models import Checkpoint, RefID, WorkbenchView - -CFG = {"arbitrary_types_allowed": True} +from .db import VersionControlRepository +from .errors import CleanRequiredError +from .models import Checkpoint, CommitLog, RefID, WorkbenchView log = logging.getLogger(__name__) @@ -28,8 +25,8 @@ async def list_repos( vc_repo: VersionControlRepository, *, offset: NonNegativeInt = 0, - limit: Optional[PositiveInt] = None, -) -> Tuple[List[RowProxy], PositiveInt]: + limit: PositiveInt | None = None, +) -> tuple[list[RowProxy], PositiveInt]: # NOTE: this layer does NOT add much .. why not use vc_repo directly? repos_rows, total_number_of_repos = await vc_repo.list_repos(offset, limit) @@ -43,21 +40,21 @@ async def list_checkpoints( project_uuid: UUID, *, offset: NonNegativeInt = 0, - limit: Optional[PositiveInt] = None, -) -> Tuple[List[Checkpoint], PositiveInt]: + limit: PositiveInt | None = None, +) -> tuple[list[Checkpoint], PositiveInt]: repo_id = await vc_repo.get_repo_id(project_uuid) if not repo_id: return [], 0 - logs: List[CommitLog] + logs: list[CommitLog] logs, total_number_of_commits = await vc_repo.log( repo_id, offset=offset, limit=limit ) checkpoints = [Checkpoint.from_commit_log(commit, tags) for commit, tags in logs] assert len(checkpoints) <= limit if limit else True # nosec - assert total_number_of_commits > 0 + assert total_number_of_commits > 0 # nosec return checkpoints, total_number_of_commits @@ -67,7 +64,7 @@ async def create_checkpoint( project_uuid: UUID, *, tag: str, - message: Optional[str] = None, + message: str | None = None, ) -> Checkpoint: repo_id = await vc_repo.get_repo_id(project_uuid) if repo_id is None: @@ -98,8 +95,8 @@ async def update_checkpoint( project_uuid: UUID, ref_id: RefID, *, - message: Optional[str] = None, - tag: Optional[str] = None, + message: str | None = None, + tag: str | None = None, ) -> Checkpoint: repo_id, commit_id = await vc_repo.as_repo_and_commit_ids(project_uuid, ref_id) @@ -142,8 +139,6 @@ async def get_workbench( repo_id, commit_id = await vc_repo.as_repo_and_commit_ids(project_uuid, ref_id) # prefer actual project to snapshot - # TODO: tmp disabled - # content: Dict = await vc_repo.get_snapshot_content(repo_id, commit_id) content = await vc_repo.get_workbench_view(repo_id, commit_id) return WorkbenchView.parse_obj(content) @@ -151,10 +146,14 @@ async def get_workbench( # # All above with validated arguments # -list_repos_safe = validate_arguments(list_repos, config=CFG) -list_checkpoints_safe = validate_arguments(list_checkpoints, config=CFG) -create_checkpoint_safe = validate_arguments(create_checkpoint, config=CFG) -get_checkpoint_safe = validate_arguments(get_checkpoint, config=CFG) -update_checkpoint_safe = validate_arguments(update_checkpoint, config=CFG) -checkout_checkpoint_safe = validate_arguments(checkout_checkpoint, config=CFG) -get_workbench_safe = validate_arguments(get_workbench, config=CFG) + +_CONFIG = {"arbitrary_types_allowed": True} + + +list_repos_safe = validate_arguments(list_repos, config=_CONFIG) # type: ignore +list_checkpoints_safe = validate_arguments(list_checkpoints, config=_CONFIG) # type: ignore +create_checkpoint_safe = validate_arguments(create_checkpoint, config=_CONFIG) # type: ignore +get_checkpoint_safe = validate_arguments(get_checkpoint, config=_CONFIG) # type: ignore +update_checkpoint_safe = validate_arguments(update_checkpoint, config=_CONFIG) # type: ignore +checkout_checkpoint_safe = validate_arguments(checkout_checkpoint, config=_CONFIG) # type: ignore +get_workbench_safe = validate_arguments(get_workbench, config=_CONFIG) # type: ignore diff --git a/services/web/server/src/simcore_service_webserver/version_control_handlers.py b/services/web/server/src/simcore_service_webserver/version_control/_rest_handlers.py similarity index 90% rename from services/web/server/src/simcore_service_webserver/version_control_handlers.py rename to services/web/server/src/simcore_service_webserver/version_control/_rest_handlers.py index 64f9af77c91..52ab8d16abe 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_handlers.py +++ b/services/web/server/src/simcore_service_webserver/version_control/_rest_handlers.py @@ -6,16 +6,16 @@ from pydantic.decorator import validate_arguments from servicelib.rest_constants import RESPONSE_MODEL_POLICY -from ._meta import api_version_prefix as VTAG -from .login.decorators import login_required -from .security_decorators import permission_required -from .utils_aiohttp import ( +from .._meta import api_version_prefix as VTAG +from ..login.decorators import login_required +from ..security_decorators import permission_required +from ..utils_aiohttp import ( create_url_for_function, envelope_json_response, get_routes_view, rename_routes_as_handler_function, ) -from .version_control_core import ( +from ._core import ( checkout_checkpoint_safe, create_checkpoint_safe, get_checkpoint_safe, @@ -24,9 +24,10 @@ list_repos_safe, update_checkpoint_safe, ) -from .version_control_db import HEAD, VersionControlRepository -from .version_control_handlers_base import handle_request_errors -from .version_control_models import ( +from ._rest_handlers_base import handle_request_errors +from .db import VersionControlRepository +from .models import ( + HEAD, Checkpoint, CheckpointAnnotations, CheckpointApiModel, @@ -40,10 +41,6 @@ logger = logging.getLogger(__name__) -# FIXME: access rights using same approach as in access_layer.py in storage. -# A user can only check snapshots (subresource) of its project (parent resource) - - @validate_arguments def _normalize_refid(ref_id: RefID) -> RefID: if ref_id == "HEAD": @@ -60,7 +57,6 @@ def _normalize_refid(ref_id: RefID) -> RefID: @permission_required("project.read") @handle_request_errors async def _list_repos_handler(request: web.Request): - # FIXME: check access to non owned projects user_id = request[RQT_USERID_KEY] url_for = create_url_for_function(request) vc_repo = VersionControlRepository(request) @@ -115,7 +111,7 @@ async def _create_checkpoint_handler(request: web.Request): checkpoint: Checkpoint = await create_checkpoint_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, **_body.dict(include={"tag", "message"}), ) @@ -148,7 +144,7 @@ async def _list_checkpoints_handler(request: web.Request): checkpoints, total = await list_checkpoints_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, offset=_offset, limit=_limit, ) @@ -206,7 +202,7 @@ async def _get_checkpoint_handler(request: web.Request): checkpoint: Checkpoint = await get_checkpoint_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, ref_id=_ref_id, ) @@ -240,7 +236,7 @@ async def _update_checkpoint_annotations_handler(request: web.Request): checkpoint: Checkpoint = await update_checkpoint_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, ref_id=_ref_id, **_body.dict(include={"tag", "message"}, exclude_none=True), ) @@ -271,7 +267,7 @@ async def _checkout_handler(request: web.Request): checkpoint: Checkpoint = await checkout_checkpoint_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, ref_id=_ref_id, ) @@ -303,13 +299,13 @@ async def _view_project_workbench_handler(request: web.Request): checkpoint: Checkpoint = await get_checkpoint_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, ref_id=_ref_id, ) view: WorkbenchView = await get_workbench_safe( vc_repo, - project_uuid=_project_uuid, # type: ignore + project_uuid=_project_uuid, ref_id=checkpoint.id, ) diff --git a/services/web/server/src/simcore_service_webserver/version_control_handlers_base.py b/services/web/server/src/simcore_service_webserver/version_control/_rest_handlers_base.py similarity index 84% rename from services/web/server/src/simcore_service_webserver/version_control_handlers_base.py rename to services/web/server/src/simcore_service_webserver/version_control/_rest_handlers_base.py index c5586ffd049..83bf810ec11 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_handlers_base.py +++ b/services/web/server/src/simcore_service_webserver/version_control/_rest_handlers_base.py @@ -6,8 +6,8 @@ from servicelib.aiohttp.typing_extension import Handler from servicelib.json_serialization import json_dumps -from .projects.projects_exceptions import ProjectNotFoundError -from .version_control_errors import InvalidParameterError, NoCommitError, NotFoundError +from ..projects.projects_exceptions import ProjectNotFoundError +from .errors import InvalidParameterError, NoCommitError, NotFoundError logger = logging.getLogger(__name__) @@ -49,7 +49,3 @@ async def wrapped(request: web.Request): ) from err return wrapped - - -# FIXME: access rights using same approach as in access_layer.py in storage. -# A user can only check snapshots (subresource) of its project (parent resource) diff --git a/services/web/server/src/simcore_service_webserver/version_control_db.py b/services/web/server/src/simcore_service_webserver/version_control/db.py similarity index 89% rename from services/web/server/src/simcore_service_webserver/version_control_db.py rename to services/web/server/src/simcore_service_webserver/version_control/db.py index 6d809502fb2..9e7e069cf17 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_db.py +++ b/services/web/server/src/simcore_service_webserver/version_control/db.py @@ -1,12 +1,13 @@ import json import logging from types import SimpleNamespace -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any from uuid import UUID import sqlalchemy as sa from aiopg.sa import SAConnection from aiopg.sa.result import RowProxy +from models_library.basic_types import SHA1Str from models_library.projects import ProjectIDStr from pydantic.types import NonNegativeInt, PositiveInt from servicelib.json_serialization import json_dumps @@ -22,26 +23,17 @@ from simcore_postgres_database.utils_aiopg_orm import BaseOrm from sqlalchemy.dialects.postgresql import insert as pg_insert -from .db_base_repository import BaseRepository -from .projects.project_models import ProjectProxy -from .version_control_changes import compute_workbench_checksum -from .version_control_errors import ( +from ..db_base_repository import BaseRepository +from ..projects.project_models import ProjectProxy +from .errors import ( CleanRequiredError, InvalidParameterError, NoCommitError, NotFoundError, ) -from .version_control_models import ( - HEAD, - CommitID, - CommitLog, - CommitProxy, - RefID, - RepoProxy, - SHA1Str, - TagProxy, -) -from .version_control_tags import parse_workcopy_project_tag_name +from .models import HEAD, CommitID, CommitLog, CommitProxy, RefID, RepoProxy, TagProxy +from .vc_changes import compute_workbench_checksum +from .vc_tags import parse_workcopy_project_tag_name log = logging.getLogger(__name__) @@ -51,8 +43,6 @@ class VersionControlRepository(BaseRepository): db layer to access multiple tables within projects_version_control """ - # FIXME: optimize all db queries - class ReposOrm(BaseOrm[int]): def __init__(self, connection: SAConnection): super().__init__( @@ -76,9 +66,9 @@ def __init__(self, connection: SAConnection): connection, readonly={"id", "created", "modified"}, # pylint: disable=no-member - writeonce=set( + writeonce={ c for c in projects_vc_commits.columns.keys() if c != "message" - ), + }, ) class TagsOrm(BaseOrm[int]): @@ -118,7 +108,7 @@ def __init__(self, connection: SAConnection): async def _get_head_branch( self, repo_id: int, conn: SAConnection - ) -> Optional[RowProxy]: + ) -> RowProxy | None: if h := await self.HeadsOrm(conn).fetch("head_branch_id", rowid=repo_id): branch = ( await self.BranchesOrm(conn) @@ -126,15 +116,17 @@ async def _get_head_branch( .fetch("id name head_commit_id") ) return branch + return None async def _get_HEAD_commit( self, repo_id: int, conn: SAConnection - ) -> Optional[CommitProxy]: + ) -> CommitProxy | None: if branch := await self._get_head_branch(repo_id, conn): commit = ( await self.CommitsOrm(conn).set_filter(id=branch.head_commit_id).fetch() ) return commit + return None async def _fetch_workcopy_project_id( self, repo_id: int, commit_id: int, conn: SAConnection @@ -153,9 +145,9 @@ async def _fetch_workcopy_project_id( async def _update_state( self, repo_id: int, conn: SAConnection - ) -> Tuple[RepoProxy, Optional[CommitProxy], ProjectProxy]: + ) -> tuple[RepoProxy, CommitProxy | None, ProjectProxy]: - head_commit: Optional[CommitProxy] = await self._get_HEAD_commit(repo_id, conn) + head_commit: CommitProxy | None = await self._get_HEAD_commit(repo_id, conn) # current repo repo_orm = self.ReposOrm(conn).set_filter(id=repo_id) @@ -175,7 +167,7 @@ async def _update_state( assert workcopy_project # nosec # uses checksum cached in repo table to avoid re-computing checksum - checksum: Optional[SHA1Str] = repo.project_checksum + checksum: SHA1Str | None = repo.project_checksum if not checksum or ( checksum and repo.modified < workcopy_project.last_change_date ): @@ -188,7 +180,7 @@ async def _update_state( @staticmethod async def _upsert_snapshot( project_checksum: str, - project: Union[RowProxy, SimpleNamespace], + project: RowProxy | SimpleNamespace, conn: SAConnection, ): @@ -197,7 +189,6 @@ async def _upsert_snapshot( insert_stmt = pg_insert(projects_vc_snapshots).values( checksum=project_checksum, content={ - # FIXME: empty status produces a set() that sqlalchemy cannot serialize. Quick fix "workbench": json.loads(json_dumps(project.workbench)), "ui": json.loads(json_dumps(project.ui)), }, @@ -213,24 +204,24 @@ async def _upsert_snapshot( async def list_repos( self, offset: NonNegativeInt = 0, - limit: Optional[PositiveInt] = None, - ) -> Tuple[List[RowProxy], NonNegativeInt]: + limit: PositiveInt | None = None, + ) -> tuple[list[RowProxy], NonNegativeInt]: async with self.engine.acquire() as conn: repo_orm = self.ReposOrm(conn) - rows: List[RowProxy] + rows: list[RowProxy] rows, total_count = await repo_orm.fetch_page( "project_uuid", offset=offset, limit=limit ) return rows, total_count - async def get_repo_id(self, project_uuid: UUID) -> Optional[int]: + async def get_repo_id(self, project_uuid: UUID) -> int | None: async with self.engine.acquire() as conn: repo_orm = self.ReposOrm(conn).set_filter(project_uuid=str(project_uuid)) repo = await repo_orm.fetch("id") - return repo.id if repo else None + return int(repo.id) if repo else None async def init_repo(self, project_uuid: UUID) -> int: async with self.engine.acquire() as conn: @@ -251,9 +242,7 @@ async def init_repo(self, project_uuid: UUID) -> int: assert branch_id is not None assert isinstance(branch_id, int) # nosec - main_branch: Optional[RowProxy] = await branches_orm.fetch( - rowid=branch_id - ) + main_branch: RowProxy | None = await branches_orm.fetch(rowid=branch_id) assert main_branch # nosec assert main_branch.name == "main" # nosec @@ -264,7 +253,7 @@ async def init_repo(self, project_uuid: UUID) -> int: return repo_id async def commit( - self, repo_id: int, tag: Optional[str] = None, message: Optional[str] = None + self, repo_id: int, tag: str | None = None, message: str | None = None ) -> int: """add changes, commits and tags (if tag is not None) @@ -274,8 +263,6 @@ async def commit( raise InvalidParameterError(name="tag", reason="is a reserved word") async with self.engine.acquire() as conn: - # FIXME: get head commit in one execution - # get head branch branch = await self._get_head_branch(repo_id, conn) if not branch: @@ -342,7 +329,7 @@ async def get_commit_log(self, commit_id: int) -> CommitLog: if commit: assert isinstance(commit, RowProxy) # nosec - tags: List[TagProxy] = ( + tags: list[TagProxy] = ( await self.TagsOrm(conn) .set_filter(commit_id=commit.id, hidden=False) .fetch_all("name message") @@ -354,24 +341,23 @@ async def log( self, repo_id: int, offset: NonNegativeInt = 0, - limit: Optional[PositiveInt] = None, - ) -> Tuple[List[CommitLog], NonNegativeInt]: + limit: PositiveInt | None = None, + ) -> tuple[list[CommitLog], NonNegativeInt]: async with self.engine.acquire() as conn: commits_orm = self.CommitsOrm(conn).set_filter(repo_id=repo_id) tags_orm = self.TagsOrm(conn) - commits: List[CommitProxy] + commits: list[CommitProxy] commits, total_count = await commits_orm.fetch_page( offset=offset, limit=limit, - # TODO: sortby should have sort_by=sa.desc(commits_orm.columns["created"]), ) logs = [] for commit in commits: - tags: List[TagProxy] + tags: list[TagProxy] tags = await tags_orm.set_filter(commit_id=commit.id).fetch_all() logs.append((commit, tags)) @@ -381,8 +367,8 @@ async def update_annotations( self, repo_id: int, commit_id: CommitID, - message: Optional[str] = None, - tag_name: Optional[str] = None, + message: str | None = None, + tag_name: str | None = None, ): async with self.engine.acquire() as conn: async with conn.begin(): @@ -405,7 +391,7 @@ async def update_annotations( async def as_repo_and_commit_ids( self, project_uuid: UUID, ref_id: RefID - ) -> Tuple[int, CommitID]: + ) -> tuple[int, CommitID]: """Translates (project-uuid, ref-id) to (repo-id, commit-id) :return: tuple with repo and commit identifiers @@ -513,7 +499,7 @@ async def checkout(self, repo_id: int, commit_id: int) -> int: async def get_snapshot_content( self, repo_id: int, commit_id: int - ) -> Dict[str, Any]: + ) -> dict[str, Any]: async with self.engine.acquire() as conn: if ( @@ -526,11 +512,12 @@ async def get_snapshot_content( .set_filter(checksum=commit.snapshot_checksum) .fetch("content") ): - return snapshot.content + content: dict[str, Any] = snapshot.content + return content raise NotFoundError(name="snapshot for commit", value=(repo_id, commit_id)) - async def get_workbench_view(self, repo_id: int, commit_id: int) -> Dict[str, Any]: + async def get_workbench_view(self, repo_id: int, commit_id: int) -> dict[str, Any]: async with self.engine.acquire() as conn: if ( commit := await self.CommitsOrm(conn) @@ -549,11 +536,9 @@ async def get_workbench_view(self, repo_id: int, commit_id: int) -> Dict[str, An repo_id, commit_id, conn ) - # FIXME: in general this is wrong. For the moment, - # all wcopies except for the repo's main workcopy (i.e. repo.project_uuid) are READ-ONLY - # + # NOTE: For the moment, all wcopies except for the repo's main workcopy + # (i.e. repo.project_uuid) are READ-ONLY if workcopy_project_id != repo.project_uuid: - # FIXME: not aligned with content ... if project := ( await self.ProjectsOrm(conn) .set_filter(uuid=workcopy_project_id) diff --git a/services/web/server/src/simcore_service_webserver/version_control_errors.py b/services/web/server/src/simcore_service_webserver/version_control/errors.py similarity index 100% rename from services/web/server/src/simcore_service_webserver/version_control_errors.py rename to services/web/server/src/simcore_service_webserver/version_control/errors.py diff --git a/services/web/server/src/simcore_service_webserver/version_control_models.py b/services/web/server/src/simcore_service_webserver/version_control/models.py similarity index 56% rename from services/web/server/src/simcore_service_webserver/version_control_models.py rename to services/web/server/src/simcore_service_webserver/version_control/models.py index 4caaa2ffc89..ce1178341b9 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_models.py +++ b/services/web/server/src/simcore_service_webserver/version_control/models.py @@ -1,47 +1,44 @@ from datetime import datetime -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any, TypeAlias, Union from aiopg.sa.result import RowProxy from models_library.basic_types import SHA1Str from models_library.projects import ProjectID from models_library.projects_nodes import Node -from pydantic import BaseModel, PositiveInt, StrictBool, StrictFloat, StrictInt +from pydantic import BaseModel, Field, PositiveInt, StrictBool, StrictFloat, StrictInt from pydantic.networks import HttpUrl -BuiltinTypes = Union[StrictBool, StrictInt, StrictFloat, str] +BuiltinTypes: TypeAlias = Union[StrictBool, StrictInt, StrictFloat, str] # alias for readability # SEE https://pydantic-docs.helpmanual.io/usage/models/#orm-mode-aka-arbitrary-class-instances -BranchProxy = RowProxy -CommitProxy = RowProxy -RepoProxy = RowProxy -TagProxy = RowProxy -CommitLog = Tuple[CommitProxy, List[TagProxy]] +BranchProxy: TypeAlias = RowProxy +CommitProxy: TypeAlias = RowProxy +RepoProxy: TypeAlias = RowProxy +TagProxy: TypeAlias = RowProxy +CommitLog: TypeAlias = tuple[CommitProxy, list[TagProxy]] HEAD = f"{__file__}/ref/HEAD" -CommitID = int -BranchID = int -RefID = Union[CommitID, str] +CommitID: TypeAlias = int +BranchID: TypeAlias = int +RefID: TypeAlias = Union[CommitID, str] -CheckpointID = PositiveInt +CheckpointID: TypeAlias = PositiveInt class Checkpoint(BaseModel): id: CheckpointID checksum: SHA1Str created_at: datetime - tags: Tuple[str, ...] - # TODO: so front-end can proper break tree branches - # branches: Tuple[str, ...] = tuple() - - message: Optional[str] = None - parents_ids: Tuple[PositiveInt, ...] = None # type: ignore + tags: tuple[str, ...] + message: str | None = None + parents_ids: tuple[PositiveInt, ...] = Field(default=None) @classmethod - def from_commit_log(cls, commit: RowProxy, tags: List[RowProxy]) -> "Checkpoint": + def from_commit_log(cls, commit: RowProxy, tags: list[RowProxy]) -> "Checkpoint": return cls( id=commit.id, checksum=commit.snapshot_checksum, @@ -58,10 +55,10 @@ class WorkbenchView(BaseModel): class Config: orm_mode = True - # FIXME: Tmp replacing UUIDS by str due to a problem serializing to json UUID keys + # NOTE: Tmp replacing UUIDS by str due to a problem serializing to json UUID keys # in the response https://github.com/samuelcolvin/pydantic/issues/2096#issuecomment-814860206 - workbench: Dict[str, Node] - ui: Dict[str, Any] = {} + workbench: dict[str, Node] + ui: dict[str, Any] = {} # API models --------------- @@ -78,15 +75,29 @@ class CheckpointApiModel(Checkpoint): class CheckpointNew(BaseModel): tag: str - message: Optional[str] = None + message: str | None = None # new_branch: Optional[str] = None class CheckpointAnnotations(BaseModel): - tag: Optional[str] = None - message: Optional[str] = None + tag: str | None = None + message: str | None = None class WorkbenchViewApiModel(WorkbenchView): url: HttpUrl checkpoint_url: HttpUrl + + +__all__: tuple[str, ...] = ( + "BranchID", + "BranchProxy", + "CheckpointID", + "CommitID", + "CommitLog", + "CommitProxy", + "HEAD", + "RefID", + "RepoProxy", + "TagProxy", +) diff --git a/services/web/server/src/simcore_service_webserver/version_control.py b/services/web/server/src/simcore_service_webserver/version_control/plugin.py similarity index 80% rename from services/web/server/src/simcore_service_webserver/version_control.py rename to services/web/server/src/simcore_service_webserver/version_control/plugin.py index 6f8af0716a9..b58c50a81e2 100644 --- a/services/web/server/src/simcore_service_webserver/version_control.py +++ b/services/web/server/src/simcore_service_webserver/version_control/plugin.py @@ -8,8 +8,8 @@ from aiohttp import web from servicelib.aiohttp.application_setup import ModuleCategory, app_module_setup -from . import version_control_handlers -from ._constants import APP_SETTINGS_KEY +from .._constants import APP_SETTINGS_KEY +from . import _rest_handlers log = logging.getLogger(__name__) @@ -26,4 +26,4 @@ def setup_version_control(app: web.Application): assert app[APP_SETTINGS_KEY].WEBSERVER_VERSION_CONTROL # nosec - app.add_routes(version_control_handlers.routes) + app.add_routes(_rest_handlers.routes) diff --git a/services/web/server/src/simcore_service_webserver/version_control_changes.py b/services/web/server/src/simcore_service_webserver/version_control/vc_changes.py similarity index 80% rename from services/web/server/src/simcore_service_webserver/version_control_changes.py rename to services/web/server/src/simcore_service_webserver/version_control/vc_changes.py index 177aa6b2ca3..c95896e0f1c 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_changes.py +++ b/services/web/server/src/simcore_service_webserver/version_control/vc_changes.py @@ -9,24 +9,20 @@ """ -from typing import Any, Dict, Optional, Union +from typing import Any from uuid import UUID, uuid3 from models_library.basic_types import SHA1Str from models_library.projects import ProjectID, ProjectIDStr from models_library.projects_nodes import Node -from .projects.project_models import ProjectProxy -from .utils import compute_sha1_on_small_dataset +from ..projects.project_models import ProjectProxy +from ..utils import compute_sha1_on_small_dataset -def compute_workbench_checksum(workbench: Dict[str, Any]) -> SHA1Str: +def compute_workbench_checksum(workbench: dict[str, Any]) -> SHA1Str: # - # UI is NOT accounted in the checksum - # TODO: review other fields to mask? - # TODO: search for async def compute_node_hash - # - # - Add options with include/exclude fields (e.g. to avoid status) + # NOTE that UI is NOT accounted in the checksum # normalized = { str(k): (Node(**v) if not isinstance(v, Node) else v) @@ -56,18 +52,17 @@ def compute_workbench_checksum(workbench: Dict[str, Any]) -> SHA1Str: def _eval_checksum(repo, project: ProjectProxy) -> SHA1Str: # cached checksum of project workcopy - checksum: Optional[SHA1Str] = repo.project_checksum + checksum: SHA1Str | None = repo.project_checksum is_invalid = not checksum or (checksum and repo.modified < project.last_change_date) if is_invalid: # invalid -> recompute checksum = compute_workbench_checksum(project.workbench) - # TODO: cache assert checksum # nosec return checksum def eval_workcopy_project_id( - repo_project_uuid: Union[ProjectID, ProjectIDStr], snapshot_checksum: SHA1Str + repo_project_uuid: ProjectID | ProjectIDStr, snapshot_checksum: SHA1Str ) -> ProjectID: """ A working copy is a real project associated to a snapshot so it can be operated diff --git a/services/web/server/src/simcore_service_webserver/version_control_tags.py b/services/web/server/src/simcore_service_webserver/version_control/vc_tags.py similarity index 80% rename from services/web/server/src/simcore_service_webserver/version_control_tags.py rename to services/web/server/src/simcore_service_webserver/version_control/vc_tags.py index 6d9c1846917..5b9d86df791 100644 --- a/services/web/server/src/simcore_service_webserver/version_control_tags.py +++ b/services/web/server/src/simcore_service_webserver/version_control/vc_tags.py @@ -1,5 +1,4 @@ import re -from typing import Optional from models_library.basic_regex import UUID_RE_BASE from models_library.projects import ProjectID @@ -9,7 +8,7 @@ def compose_workcopy_project_tag_name(workcopy_project_id: ProjectID) -> str: return f"project:{workcopy_project_id}" -def parse_workcopy_project_tag_name(name: str) -> Optional[ProjectID]: +def parse_workcopy_project_tag_name(name: str) -> ProjectID | None: if m := re.match(rf"^project:(?P{UUID_RE_BASE})$", name): data = m.groupdict() return ProjectID(data["workcopy_project_id"]) diff --git a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control.py b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control.py index a2bbaae157e..9e554366708 100644 --- a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control.py +++ b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control.py @@ -2,22 +2,22 @@ # pylint: disable=unused-argument # pylint: disable=unused-variable -from typing import Any, Dict +from typing import Any import pytest from models_library.projects import Workbench from openapi_core.schema.specs.models import Spec as OpenApiSpecs from pydantic import BaseModel from simcore_service_webserver._meta import API_VTAG as VX -from simcore_service_webserver.version_control import version_control_handlers -from simcore_service_webserver.version_control_db import compute_workbench_checksum +from simcore_service_webserver.version_control.db import compute_workbench_checksum +from simcore_service_webserver.version_control.plugin import _rest_handlers -ProjectDict = Dict[str, Any] +ProjectDict = dict[str, Any] @pytest.mark.parametrize( "route", - version_control_handlers.routes, + _rest_handlers.routes, ids=lambda r: f"{r.method.upper()} {r.path}", ) def test_route_against_openapi_specs(route, openapi_specs: OpenApiSpecs): diff --git a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_core.py b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_core.py index 74bda770644..fbfe0cb18f7 100644 --- a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_core.py +++ b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_core.py @@ -11,13 +11,13 @@ from faker import Faker from simcore_service_webserver._constants import RQT_USERID_KEY from simcore_service_webserver.projects import projects_api -from simcore_service_webserver.version_control_core import ( +from simcore_service_webserver.version_control._core import ( checkout_checkpoint, create_checkpoint, list_checkpoints, update_checkpoint, ) -from simcore_service_webserver.version_control_db import HEAD, VersionControlRepository +from simcore_service_webserver.version_control.db import HEAD, VersionControlRepository ProjectDict = dict[str, Any] diff --git a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_handlers.py b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_handlers.py index 691ac468148..8d05de65a50 100644 --- a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_handlers.py +++ b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_handlers.py @@ -15,7 +15,7 @@ from pydantic.main import BaseModel from pytest_simcore.helpers.utils_assert import assert_status from simcore_service_webserver._meta import API_VTAG as VX -from simcore_service_webserver.version_control_models import ( +from simcore_service_webserver.version_control.models import ( CheckpointApiModel, RepoApiModel, ) diff --git a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_tags.py b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_tags.py index dcbd7aa508e..1e77bba0383 100644 --- a/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_tags.py +++ b/services/web/server/tests/unit/with_dbs/03/version_control/test_version_control_tags.py @@ -1,5 +1,5 @@ from faker import Faker -from simcore_service_webserver.version_control_tags import ( +from simcore_service_webserver.version_control.vc_tags import ( compose_workcopy_project_tag_name, parse_workcopy_project_tag_name, )