From 4f279c387633bc74c31f51775297f7ccd353d5c7 Mon Sep 17 00:00:00 2001 From: Pedro Crespo <32402063+pcrespov@users.noreply.github.com> Date: Thu, 24 Mar 2022 13:34:11 +0100 Subject: [PATCH] @sanderegg review: doc and examples --- .../src/models_library/projects_nodes_io.py | 19 +++++++++++++++++-- .../catalog_utils.py | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/models-library/src/models_library/projects_nodes_io.py b/packages/models-library/src/models_library/projects_nodes_io.py index 504e89c9ed4..6b4de2cec03 100644 --- a/packages/models-library/src/models_library/projects_nodes_io.py +++ b/packages/models-library/src/models_library/projects_nodes_io.py @@ -126,9 +126,10 @@ def pre_fill_label_with_filename_ext(cls, v, values): class Config: extra = Extra.forbid schema_extra = { + # a project file "example": { "store": "0", - "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", "eTag": "859fda0cb82fc4acb4686510a172d9a9-1", "label": "input.txt", }, @@ -137,7 +138,12 @@ class Config: { "store": "0", "path": "api/0a3b2c56-dbcd-4871-b93b-d454b7883f9f/input.txt", - } + }, + # w/ store id as int + { + "store": 0, + "path": "94453a6a-c8d4-52b3-a22d-ccbf81f8d636/d4442ca4-23fd-5b6b-ba6d-0b75f711c109/y_1D.txt", + }, ], } @@ -174,6 +180,15 @@ class Config: "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", "label": "initial_WTstates", }, + "examples": [ + # with store id as str + { + "store": "1", + "dataset": "N:dataset:ea2325d8-46d7-4fbd-a644-30f6433070b4", + "path": "N:package:32df09ba-e8d6-46da-bd54-f696157de6ce", + "label": "initial_WTstates", + }, + ], } diff --git a/services/web/server/src/simcore_service_webserver/catalog_utils.py b/services/web/server/src/simcore_service_webserver/catalog_utils.py index 801506516c4..bab64ce5d02 100644 --- a/services/web/server/src/simcore_service_webserver/catalog_utils.py +++ b/services/web/server/src/simcore_service_webserver/catalog_utils.py @@ -127,7 +127,7 @@ def can_connect( This check IS PERMISSIVE and is used for checks in the UI where one needs to give some "flexibility" since: - has to be a fast evaluation - - there are not error messages when check fails + - there are no error messages when check fails - some configurations might need several UI steps to be valid For more strict checks use the "strict" variant