Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9a5e7e6
add newly generated openapi.json
bisgaard-itis Jul 4, 2023
c36ecec
merge master into increment-api-version
bisgaard-itis Jul 6, 2023
c9ae76d
adapt tests so they pass
bisgaard-itis Jul 6, 2023
ae6576e
merge master into increment-api-version
bisgaard-itis Jul 10, 2023
f51fa31
update openapi.json
bisgaard-itis Jul 10, 2023
5fea52a
minor fix
bisgaard-itis Jul 10, 2023
1229409
minor changes
bisgaard-itis Jul 10, 2023
bc8ee1f
import new names directly in osparc
bisgaard-itis Jul 10, 2023
d413009
merge master into increment-api-version
bisgaard-itis Jul 18, 2023
19d30c1
upgrade openapi.json to latest from master on osparc-simcore
bisgaard-itis Jul 18, 2023
30879a3
fix import
bisgaard-itis Jul 18, 2023
70b08cf
merge master into increment-api-version
bisgaard-itis Jul 19, 2023
539f05d
bugfix in BasicTutorial and add StudyTutorial
bisgaard-itis Jul 19, 2023
adfa75b
finish proto version of study tutorial
bisgaard-itis Jul 19, 2023
cc74281
increment version - to be changed
bisgaard-itis Jul 19, 2023
88b8927
merge increment-api-version into tutorial-study-functionality
bisgaard-itis Jul 19, 2023
0863b69
configure tutorial tests to only run with compatible oosparc version
bisgaard-itis Jul 19, 2023
25de66c
cosmetic change
bisgaard-itis Jul 19, 2023
34316ed
add tutorial_client_compatibility.json
bisgaard-itis Jul 19, 2023
d6ed3a5
parametrize tests and make them pass
bisgaard-itis Jul 19, 2023
00c930b
improve tests
bisgaard-itis Jul 19, 2023
39a1f83
small fix to not run tests multiple times
bisgaard-itis Jul 19, 2023
b80d9ae
small change
bisgaard-itis Jul 19, 2023
ea7983c
minor fixes according to PR feedback
bisgaard-itis Jul 19, 2023
b0b7fab
use tuple instead of list for __all__
bisgaard-itis Jul 19, 2023
08b4420
merge increment-api-version into tutorial-study-functionality
bisgaard-itis Jul 19, 2023
94ab776
fix tests against older python versiosn
bisgaard-itis Jul 19, 2023
7043173
merge increment-api-version into tutorial-study-functionality
bisgaard-itis Jul 19, 2023
23ffd7a
fix __all__ in api.py and models.py
bisgaard-itis Jul 20, 2023
569b49b
separate options on different lines
bisgaard-itis Jul 20, 2023
2b77943
increment-api-version into tutorial-study-functionality
bisgaard-itis Jul 20, 2023
5995dcf
make the sleeper study id a parameter
bisgaard-itis Jul 20, 2023
4d2f540
resolve merge conflicts
bisgaard-itis Sep 5, 2023
579a87a
update to lates openapi.json
bisgaard-itis Sep 5, 2023
845fb38
update study tutorial
bisgaard-itis Sep 5, 2023
3613295
remove parameter tag
bisgaard-itis Sep 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 124 additions & 68 deletions api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"files"
],
"summary": "Get Upload Links",
"description": "Get upload links for uploading a file to storage\n\nArguments:\n request -- Request object\n client_file -- ClientFile object\n user_id -- User Id\n\nReturns:\n FileUploadSchema",
"description": "Get upload links for uploading a file to storage",
"operationId": "get_upload_links",
"requestBody": {
"content": {
Expand Down Expand Up @@ -292,14 +292,14 @@
]
}
},
"/v0/files/{file_id}:complete": {
"post": {
"/v0/files/{file_id}": {
"get": {
"tags": [
"files"
],
"summary": "Complete Multipart Upload",
"description": "Complete multipart upload\n\nArguments:\n request: The Request object\n file_id: The Storage id\n file: The File object which is to be completed\n uploaded_parts: The uploaded parts\n completion_link: The completion link\n user_id: The user id\n\nReturns:\n The completed File object",
"operationId": "complete_multipart_upload",
"summary": "Get File",
"description": "Gets metadata for a given file resource",
"operationId": "get_file",
"parameters": [
{
"required": true,
Expand All @@ -312,16 +312,6 @@
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_complete_multipart_upload_v0_files__file_id__complete_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
Expand All @@ -333,6 +323,16 @@
}
}
},
"404": {
"description": "File not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorGet"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
Expand All @@ -349,16 +349,13 @@
"HTTPBasic": []
}
]
}
},
"/v0/files/{file_id}:abort": {
"post": {
},
"delete": {
"tags": [
"files"
],
"summary": "Abort Multipart Upload",
"description": "Abort a multipart upload\n\nArguments:\n request: The Request\n file_id: The StorageFileID\n upload_links: The FileUploadSchema\n user_id: The user id",
"operationId": "abort_multipart_upload",
"summary": "Delete File",
"operationId": "delete_file",
"parameters": [
{
"required": true,
Expand All @@ -371,22 +368,17 @@
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_abort_multipart_upload_v0_files__file_id__abort_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"204": {
"description": "Successful Response"
},
"404": {
"description": "File not found",
"content": {
"application/json": {
"schema": {}
"schema": {
"$ref": "#/components/schemas/ErrorGet"
}
}
}
},
Expand All @@ -408,14 +400,13 @@
]
}
},
"/v0/files/{file_id}": {
"get": {
"/v0/files/{file_id}:abort": {
"post": {
"tags": [
"files"
],
"summary": "Get File",
"description": "Gets metadata for a given file resource",
"operationId": "get_file",
"summary": "Abort Multipart Upload",
"operationId": "abort_multipart_upload",
"parameters": [
{
"required": true,
Expand All @@ -428,24 +419,22 @@
"in": "path"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/File"
}
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_abort_multipart_upload_v0_files__file_id__abort_post"
}
}
},
"404": {
"description": "File not found",
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorGet"
}
"schema": {}
}
}
},
Expand All @@ -465,13 +454,15 @@
"HTTPBasic": []
}
]
},
"delete": {
}
},
"/v0/files/{file_id}:complete": {
"post": {
"tags": [
"files"
],
"summary": "Delete File",
"operationId": "delete_file",
"summary": "Complete Multipart Upload",
"operationId": "complete_multipart_upload",
"parameters": [
{
"required": true,
Expand All @@ -484,16 +475,23 @@
"in": "path"
}
],
"responses": {
"204": {
"description": "Successful Response"
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_complete_multipart_upload_v0_files__file_id__complete_post"
}
}
},
"404": {
"description": "File not found",
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorGet"
"$ref": "#/components/schemas/File"
}
}
}
Expand Down Expand Up @@ -1145,7 +1143,7 @@
"required": true
},
"responses": {
"200": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
Expand Down Expand Up @@ -1179,7 +1177,7 @@
"solvers"
],
"summary": "Get Jobs Page",
"description": "List of jobs on a specific released solver (includes pagination)\n\n\nBreaking change in *version 0.5*: response model changed from list[Job] to pagination Page[Job].",
"description": "List of jobs on a specific released solver (includes pagination)",
"operationId": "get_jobs_page",
"parameters": [
{
Expand Down Expand Up @@ -2051,6 +2049,64 @@
]
}
},
"/v0/studies/{study_id}:clone": {
"post": {
"tags": [
"studies"
],
"summary": "Clone Study",
"operationId": "clone_study",
"parameters": [
{
"required": true,
"schema": {
"title": "Study Id",
"type": "string",
"format": "uuid"
},
"name": "study_id",
"in": "path"
}
],
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Study"
}
}
}
},
"404": {
"description": "Study not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorGet"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"HTTPBasic": []
}
]
}
},
"/v0/studies/{study_id}/ports": {
"get": {
"tags": [
Expand Down Expand Up @@ -2194,7 +2250,7 @@
}
],
"responses": {
"200": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
Expand Down Expand Up @@ -2788,7 +2844,7 @@
"file_id": {
"title": "File Id",
"type": "string",
"description": "The file id",
"description": "The file resource id",
"format": "uuid"
},
"upload_schema": {
Expand Down
33 changes: 17 additions & 16 deletions clients/python/docs/BasicTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@
},
"outputs": [],
"source": [
"import importlib\n",
"if importlib.util.find_spec('osparc') is not None:\n",
"import importlib.util\n",
"if importlib.util.find_spec('osparc') is None:\n",
" ! pip install osparc\n",
"! python -c \"import osparc; print(osparc.__version__)\""
"! python -c \"import osparc; print(osparc.__version__)\"\n",
"\n",
"import osparc\n",
"# this tutorial is compatible with version >= 0.5.0\n",
"CLIENT_VERSION = tuple(map(int, osparc.__version__.split(\".\")))\n",
"assert tuple(map(int, osparc.__version__.split(\".\"))) >= (0, 5, 0)"
]
},
{
Expand Down Expand Up @@ -140,9 +145,6 @@
"\n",
"import osparc\n",
"\n",
"CLIENT_VERSION = tuple(map(int, osparc.__version__.split(\".\")))\n",
"assert CLIENT_VERSION >= (0, 4, 3)\n",
"\n",
"Path(\"file_with_number.txt\").write_text(\"3\")\n",
"\n",
"with osparc.ApiClient(cfg) as api_client:\n",
Expand Down Expand Up @@ -191,17 +193,16 @@
" # 'id': '9fb4f70e-3589-3e9e-991e-3059086c3aae'}\n",
" # output_2 = 4.0\n",
"\n",
" if CLIENT_VERSION >= (0, 5, 0):\n",
" logfile_path: str = solvers_api.get_job_output_logfile(\n",
" solver.id, solver.version, job.id\n",
" )\n",
" zip_path = Path(logfile_path)\n",
" logfile_path: str = solvers_api.get_job_output_logfile(\n",
" solver.id, solver.version, job.id\n",
" )\n",
" zip_path = Path(logfile_path)\n",
"\n",
" with TemporaryDirectory() as tmp_dir:\n",
" with ZipFile(f\"{zip_path}\") as fzip:\n",
" fzip.extractall(tmp_dir)\n",
" logfiles = list(Path(tmp_dir).glob(\"*.log*\"))\n",
" print(\"Unzipped\", logfiles[0], \"contains:\\n\", logfiles[0].read_text())\n",
" with TemporaryDirectory() as tmp_dir:\n",
" with ZipFile(f\"{zip_path}\") as fzip:\n",
" fzip.extractall(tmp_dir)\n",
" logfiles = list(Path(tmp_dir).glob(\"*.log*\"))\n",
" print(\"Unzipped\", logfiles[0], \"contains:\\n\", logfiles[0].read_text())\n",
" #\n",
" # Unzipped extracted/sleeper_2.0.2.logs contains:\n",
" # 2022-06-01T18:15:00.405035847+02:00 Entrypoint for stage production ...\n",
Expand Down
Loading