Skip to content

Commit

Permalink
@sanderegg review: doc and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Mar 24, 2022
1 parent 52aaad0 commit 4f279c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions packages/models-library/src/models_library/projects_nodes_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand All @@ -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",
},
],
}

Expand Down Expand Up @@ -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",
},
],
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f279c3

Please sign in to comment.