From 9a5e7e6d0583a01b0aaff606dd5b7e465e47b552 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Tue, 4 Jul 2023 16:31:05 +0200 Subject: [PATCH 01/13] add newly generated openapi.json --- api/openapi.json | 2134 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 1942 insertions(+), 192 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index 862b62a4..a9a81d29 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -1,13 +1,9 @@ { "openapi": "3.0.2", "info": { - "title": "osparc.io web API", - "description": "osparc-simcore public web API specifications", - "version": "0.4.0", - "x-logo": { - "url": "https://raw.githubusercontent.com/ITISFoundation/osparc-manual/b809d93619512eb60c827b7e769c6145758378d0/_media/osparc-logo.svg", - "altText": "osparc-simcore logo" - } + "title": "osparc.io web API (dev)", + "description": "osparc-simcore public API specifications", + "version": "0.4.5-dev" }, "paths": { "/v0/meta": { @@ -107,7 +103,7 @@ "files" ], "summary": "List Files", - "description": "Lists all files stored in the system", + "description": "Lists all files stored in the system\n\nSEE get_files_page for a paginated version of this function", "operationId": "list_files", "responses": { "200": { @@ -132,6 +128,67 @@ ] } }, + "/v0/files/page": { + "get": { + "tags": [ + "files" + ], + "summary": "Get Files Page", + "operationId": "get_files_page", + "parameters": [ + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_File_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, "/v0/files/content": { "put": { "tags": [ @@ -222,7 +279,63 @@ } }, "404": { - "description": "File not found" + "description": "File not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + }, + "delete": { + "tags": [ + "files" + ], + "summary": "Delete File", + "operationId": "delete_file", + "parameters": [ + { + "required": true, + "schema": { + "title": "File Id", + "type": "string", + "format": "uuid" + }, + "name": "file_id", + "in": "path" + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "404": { + "description": "File not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" + } + } + } }, "422": { "description": "Validation Error", @@ -266,7 +379,14 @@ "description": "Successful Response" }, "404": { - "description": "File not found" + "description": "File not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" + } + } + } }, "200": { "description": "Returns a arbitrary binary data", @@ -308,7 +428,7 @@ "solvers" ], "summary": "List Solvers", - "description": "Lists all available solvers (latest version)", + "description": "Lists all available solvers (latest version)\n\nSEE get_solvers_page for paginated version of this function", "operationId": "list_solvers", "responses": { "200": { @@ -333,13 +453,69 @@ ] } }, + "/v0/solvers/page": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Solvers Page", + "operationId": "get_solvers_page", + "parameters": [ + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_Solver_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/v0/solvers/releases": { "get": { "tags": [ "solvers" ], "summary": "Lists All Releases", - "description": "Lists all released solvers (all released versions)", + "description": "Lists all released solvers i.e. all released versions\n\nSEE get_solvers_releases_page for a paginated version of this function", "operationId": "list_solvers_releases", "responses": { "200": { @@ -364,6 +540,62 @@ ] } }, + "/v0/solversreleases/page": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Solvers Releases Page", + "operationId": "get_solvers_releases_page", + "parameters": [ + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_Solver_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/v0/solvers/{solver_key}/latest": { "get": { "tags": [ @@ -377,7 +609,7 @@ "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -419,14 +651,14 @@ "solvers" ], "summary": "List Solver Releases", - "description": "Lists all releases of a given solver", + "description": "Lists all releases of a given (one) solver\n\nSEE get_solver_releases_page for a paginated version of this function", "operationId": "list_solver_releases", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -466,34 +698,46 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}": { + "/v0/solvers/{solver_key}/releases/page": { "get": { "tags": [ "solvers" ], - "summary": "Get Solver Release", - "description": "Gets a specific release of a solver", - "operationId": "get_solver_release", + "summary": "Get Solver Releases Page", + "operationId": "get_solver_releases_page", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", "in": "path" }, { - "required": true, + "required": false, "schema": { - "title": "Version", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "type": "string" + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 }, - "name": "version", - "in": "path" + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" } ], "responses": { @@ -502,7 +746,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Solver" + "$ref": "#/components/schemas/LimitOffsetPage_Solver_" } } } @@ -517,28 +761,23 @@ } } } - }, - "security": [ - { - "HTTPBasic": [] - } - ] + } } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs": { + "/v0/solvers/{solver_key}/releases/{version}": { "get": { "tags": [ "solvers" ], - "summary": "List Jobs", - "description": "List of all jobs in a specific released solver", - "operationId": "list_jobs", + "summary": "Get Solver Release", + "description": "Gets a specific release of a solver", + "operationId": "get_solver_release", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -548,6 +787,7 @@ "required": true, "schema": { "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", "type": "string" }, "name": "version", @@ -560,11 +800,7 @@ "content": { "application/json": { "schema": { - "title": "Response List Jobs V0 Solvers Solver Key Releases Version Jobs Get", - "type": "array", - "items": { - "$ref": "#/components/schemas/Job" - } + "$ref": "#/components/schemas/Solver" } } } @@ -585,20 +821,22 @@ "HTTPBasic": [] } ] - }, - "post": { + } + }, + "/v0/solvers/{solver_key}/releases/{version}/ports": { + "get": { "tags": [ "solvers" ], - "summary": "Create Job", - "description": "Creates a job in a specific release with given inputs.\n\nNOTE: This operation does **not** start the job", - "operationId": "create_job", + "summary": "List Solver Ports", + "description": "Lists inputs and outputs of a given solver\n\nNew in *version 0.5.0* (only with API_SERVER_DEV_FEATURES_ENABLED=1)", + "operationId": "list_solver_ports", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -608,29 +846,20 @@ "required": true, "schema": { "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", "type": "string" }, "name": "version", "in": "path" } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobInputs" - } - } - }, - "required": true - }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/OnePage_SolverPort_" } } } @@ -653,20 +882,20 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}": { + "/v0/solvers/{solver_key}/releases/{version}/jobs": { "get": { "tags": [ "solvers" ], - "summary": "Get Job", - "description": "Gets job of a given solver", - "operationId": "get_job", + "summary": "List Jobs", + "description": "List of jobs in a specific released solver (limited to 20 jobs)\n\nSEE get_jobs_page for paginated version of this function", + "operationId": "list_jobs", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -681,16 +910,6 @@ }, "name": "version", "in": "path" - }, - { - "required": true, - "schema": { - "title": "Job Id", - "type": "string", - "format": "uuid" - }, - "name": "job_id", - "in": "path" } ], "responses": { @@ -699,9 +918,80 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" - } - } + "title": "Response List Jobs V0 Solvers Solver Key Releases Version Jobs Get", + "type": "array", + "items": { + "$ref": "#/components/schemas/Job" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + }, + "post": { + "tags": [ + "solvers" + ], + "summary": "Create Job", + "description": "Creates a job in a specific release with given inputs.\n\nNOTE: This operation does **not** start the job", + "operationId": "create_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobInputs" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } } }, "422": { @@ -722,19 +1012,102 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:start": { - "post": { + "/v0/solvers/{solver_key}/releases/{version}/jobs/page": { + "get": { "tags": [ "solvers" ], - "summary": "Start Job", - "operationId": "start_job", + "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].", + "operationId": "get_jobs_page", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_Job_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Job", + "description": "Gets job of a given solver", + "operationId": "get_job", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -767,7 +1140,77 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + }, + "delete": { + "tags": [ + "solvers" + ], + "summary": "Delete Job", + "description": "Deletes an existing solver job\n\nNew in *version 0.5*", + "operationId": "delete_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" } } } @@ -790,19 +1233,20 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:stop": { + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:start": { "post": { "tags": [ "solvers" ], - "summary": "Stop Job", - "operationId": "stop_job", + "summary": "Start Job", + "description": "Starts job job_id created with the solver solver_key:version\n\nNew in *version 0.4.3*: cluster_id", + "operationId": "start_job", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -827,6 +1271,16 @@ }, "name": "job_id", "in": "path" + }, + { + "required": false, + "schema": { + "title": "Cluster Id", + "minimum": 0, + "type": "integer" + }, + "name": "cluster_id", + "in": "query" } ], "responses": { @@ -835,7 +1289,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/JobStatus" } } } @@ -858,19 +1312,19 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:inspect": { + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:stop": { "post": { "tags": [ "solvers" ], - "summary": "Inspect Job", - "operationId": "inspect_job", + "summary": "Stop Job", + "operationId": "stop_job", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -903,7 +1357,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/Job" } } } @@ -926,19 +1380,19 @@ ] } }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/outputs": { - "get": { + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}:inspect": { + "post": { "tags": [ "solvers" ], - "summary": "Get Job Outputs", - "operationId": "get_job_outputs", + "summary": "Inspect Job", + "operationId": "inspect_job", "parameters": [ { "required": true, "schema": { "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string" }, "name": "solver_key", @@ -971,7 +1425,993 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobOutputs" + "$ref": "#/components/schemas/JobStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/outputs": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Job Outputs", + "operationId": "get_job_outputs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobOutputs" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/outputs/logfile": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Job Output Logfile", + "description": "Special extra output with persistent logs file for the solver run.\n\nNOTE: this is not a log stream but a predefined output that is only\navailable after the job is done.\n\nNew in *version 0.4.0*", + "operationId": "get_job_output_logfile", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "307": { + "description": "Successful Response" + }, + "200": { + "description": "Returns a log file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Log not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/metadata": { + "get": { + "tags": [ + "solvers" + ], + "summary": "Get Job Custom Metadata", + "description": "Gets custom metadata from a job", + "operationId": "get_job_custom_metadata", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "title": "Response Get Job Custom Metadata V0 Solvers Solver Key Releases Version Jobs Job Id Metadata Get", + "type": "object" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "solvers" + ], + "summary": "Create Job Custom Metadata", + "description": "Attaches custom metadata to a job.", + "operationId": "create_job_custom_metadata", + "parameters": [ + { + "required": true, + "schema": { + "title": "Solver Key", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", + "type": "string" + }, + "name": "solver_key", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Version", + "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", + "type": "string" + }, + "name": "version", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Metadata", + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/": { + "get": { + "tags": [ + "studies" + ], + "summary": "List Studies", + "operationId": "list_studies", + "parameters": [ + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_Study_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}": { + "get": { + "tags": [ + "studies" + ], + "summary": "Get Study", + "operationId": "get_study", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Study" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/ports": { + "get": { + "tags": [ + "studies" + ], + "summary": "List Study Ports", + "description": "Lists metadata on ports of a given study\n\nNew in *version 0.5.0* (only with API_SERVER_DEV_FEATURES_ENABLED=1)", + "operationId": "list_study_ports", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OnePage_StudyPort_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/v0/studies/{study_id}/jobs": { + "get": { + "tags": [ + "studies" + ], + "summary": "List Study Jobs", + "operationId": "list_study_jobs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": false, + "schema": { + "title": "Limit", + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 50 + }, + "name": "limit", + "in": "query" + }, + { + "required": false, + "schema": { + "title": "Offset", + "minimum": 0, + "type": "integer", + "default": 0 + }, + "name": "offset", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LimitOffsetPage_Job_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "studies" + ], + "summary": "Create Study Job", + "operationId": "create_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}": { + "get": { + "tags": [ + "studies" + ], + "summary": "Get Study Job", + "operationId": "get_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "studies" + ], + "summary": "Delete Study Job", + "operationId": "delete_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}:start": { + "post": { + "tags": [ + "studies" + ], + "summary": "Start Study Job", + "operationId": "start_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}:stop": { + "post": { + "tags": [ + "studies" + ], + "summary": "Stop Study Job", + "operationId": "stop_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}:inspect": { + "post": { + "tags": [ + "studies" + ], + "summary": "Inspect Study Job", + "operationId": "inspect_study_job", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}/outputs": { + "post": { + "tags": [ + "studies" + ], + "summary": "Get Study Job Outputs", + "operationId": "get_study_job_outputs", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobOutputs" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}/outputs/logfile": { + "post": { + "tags": [ + "studies" + ], + "summary": "Get Study Job Output Logfile", + "operationId": "get_study_job_output_logfile", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "307": { + "description": "Successful Response" + }, + "200": { + "description": "Returns a log file", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Log not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v0/studies/{study_id}/jobs/{job_id}/metadata": { + "get": { + "tags": [ + "studies" + ], + "summary": "Get Study Job Custom Metadata", + "description": "Gets custom metadata from a job", + "operationId": "get_study_job_custom_metadata", + "parameters": [ + { + "required": true, + "schema": { + "title": "Study Id", + "type": "string", + "format": "uuid" + }, + "name": "study_id", + "in": "path" + }, + { + "required": true, + "schema": { + "title": "Job Id", + "type": "string", + "format": "uuid" + }, + "name": "job_id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "title": "Response Get Study Job Custom Metadata V0 Studies Study Id Jobs Job Id Metadata Get", + "type": "object" } } } @@ -986,41 +2426,24 @@ } } } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/v0/solvers/{solver_key}/releases/{version}/jobs/{job_id}/outputs/logfile": { - "get": { + } + }, + "post": { "tags": [ - "solvers" + "studies" ], - "summary": "Get Job Output Logfile", - "description": "Special extra output with persistent logs file for the solver run.\n\nNOTE: this is not a log stream but a predefined output that is only\navailable after the job is done.", - "operationId": "get_job_output_logfile", + "summary": "Create Study Job Custom Metadata", + "description": "Attaches custom metadata to a job", + "operationId": "create_study_job_custom_metadata", "parameters": [ { "required": true, "schema": { - "title": "Solver Key", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", - "type": "string" - }, - "name": "solver_key", - "in": "path" - }, - { - "required": true, - "schema": { - "title": "Version", - "pattern": "^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){2}(-(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*)(\\.(0|[1-9]\\d*|\\d*[-a-zA-Z][-\\da-zA-Z]*))*)?(\\+[-\\da-zA-Z]+(\\.[-\\da-zA-Z-]+)*)?$", - "type": "string" + "title": "Study Id", + "type": "string", + "format": "uuid" }, - "name": "version", + "name": "study_id", "in": "path" }, { @@ -1034,35 +2457,26 @@ "in": "path" } ], - "responses": { - "307": { - "description": "Successful Response" + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Metadata", + "type": "object" + } + } }, + "required": true + }, + "responses": { "200": { - "description": "Returns a log file", + "description": "Successful Response", "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "text/plain": { - "schema": { - "type": "string" - } + "application/json": { + "schema": {} } } }, - "404": { - "description": "Log not found" - }, "422": { "description": "Validation Error", "content": { @@ -1073,12 +2487,7 @@ } } } - }, - "security": [ - { - "HTTPBasic": [] - } - ] + } } } }, @@ -1098,6 +2507,20 @@ } } }, + "ErrorGet": { + "title": "ErrorGet", + "required": [ + "errors" + ], + "type": "object", + "properties": { + "errors": { + "title": "Errors", + "type": "array", + "items": {} + } + } + }, "File": { "title": "File", "required": [ @@ -1188,7 +2611,7 @@ }, "name": { "title": "Name", - "pattern": "^([^\\s/]+/?)+$", + "pattern": "^([^\\s/]+/?){1,10}$", "type": "string" }, "inputs_checksum": { @@ -1204,7 +2627,7 @@ }, "runner_name": { "title": "Runner Name", - "pattern": "^([^\\s/]+/?)+$", + "pattern": "^([^\\s/]+/?){1,10}$", "type": "string", "description": "Runner that executes job" }, @@ -1229,7 +2652,7 @@ "maxLength": 2083, "minLength": 1, "type": "string", - "description": "Link to the job outputs (sub-collection", + "description": "Link to the job outputs (sub-collection)", "format": "uri" } }, @@ -1239,9 +2662,9 @@ "runner_name": "solvers/isolve/releases/1.3.4", "inputs_checksum": "12345", "created_at": "2021-01-22T23:59:52.322176", - "url": "https://api.osparc.io/v0/jobs/f622946d-fd29-35b9-a193-abdd1095167c", + "url": "https://api.osparc.io/v0/solvers/isolve/releases/1.3.4/jobs/f622946d-fd29-35b9-a193-abdd1095167c", "runner_url": "https://api.osparc.io/v0/solvers/isolve/releases/1.3.4", - "outputs_url": "https://api.osparc.io/v0/jobs/f622946d-fd29-35b9-a193-abdd1095167c/outputs" + "outputs_url": "https://api.osparc.io/v0/solvers/isolve/releases/1.3.4/jobs/f622946d-fd29-35b9-a193-abdd1095167c/outputs" } }, "JobInputs": { @@ -1270,6 +2693,10 @@ }, { "type": "string" + }, + { + "type": "array", + "items": {} } ] } @@ -1282,9 +2709,8 @@ "title": "Temperature", "enabled": true, "input_file": { - "id": "0a3b2c56-dbcd-4871-b93b-d454b7883f9f", "filename": "input.txt", - "content_type": "text/plain" + "id": "0a3b2c56-dbcd-4871-b93b-d454b7883f9f" } } } @@ -1322,6 +2748,10 @@ }, { "type": "string" + }, + { + "type": "array", + "items": {} } ] } @@ -1335,9 +2765,8 @@ "title": "Specific Absorption Rate", "enabled": false, "output_file": { - "id": "0a3b2c56-dbcd-4871-b93b-d454b7883f9f", "filename": "sar_matrix.txt", - "content_type": "text/plain" + "id": "0a3b2c56-dbcd-4871-b93b-d454b7883f9f" } } } @@ -1357,18 +2786,19 @@ "format": "uuid" }, "state": { - "$ref": "#/components/schemas/TaskStates" + "$ref": "#/components/schemas/RunningState" }, "progress": { "title": "Progress", - "maximum": 100.0, - "minimum": 0.0, + "maximum": 100, + "minimum": 0, "type": "integer", "default": 0 }, "submitted_at": { "title": "Submitted At", "type": "string", + "description": "Last modification timestamp of the solver job", "format": "date-time" }, "started_at": { @@ -1392,11 +2822,188 @@ "started_at": "2021-04-01 07:16:43.670610" } }, + "LimitOffsetPage_File_": { + "title": "LimitOffsetPage[File]", + "required": [ + "items", + "total", + "links" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/File" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + }, + "limit": { + "title": "Limit", + "minimum": 1, + "type": "integer" + }, + "offset": { + "title": "Offset", + "minimum": 0, + "type": "integer" + }, + "links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "LimitOffsetPage_Job_": { + "title": "LimitOffsetPage[Job]", + "required": [ + "items", + "total", + "links" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/Job" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + }, + "limit": { + "title": "Limit", + "minimum": 1, + "type": "integer" + }, + "offset": { + "title": "Offset", + "minimum": 0, + "type": "integer" + }, + "links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "LimitOffsetPage_Solver_": { + "title": "LimitOffsetPage[Solver]", + "required": [ + "items", + "total", + "links" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/Solver" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + }, + "limit": { + "title": "Limit", + "minimum": 1, + "type": "integer" + }, + "offset": { + "title": "Offset", + "minimum": 0, + "type": "integer" + }, + "links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "LimitOffsetPage_Study_": { + "title": "LimitOffsetPage[Study]", + "required": [ + "items", + "total", + "links" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/Study" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + }, + "limit": { + "title": "Limit", + "minimum": 1, + "type": "integer" + }, + "offset": { + "title": "Offset", + "minimum": 0, + "type": "integer" + }, + "links": { + "$ref": "#/components/schemas/Links" + } + } + }, + "Links": { + "title": "Links", + "type": "object", + "properties": { + "first": { + "title": "First", + "type": "string", + "example": "/api/v1/users?limit=1&offset1" + }, + "last": { + "title": "Last", + "type": "string", + "example": "/api/v1/users?limit=1&offset1" + }, + "self": { + "title": "Self", + "type": "string", + "example": "/api/v1/users?limit=1&offset1" + }, + "next": { + "title": "Next", + "type": "string", + "example": "/api/v1/users?limit=1&offset1" + }, + "prev": { + "title": "Prev", + "type": "string", + "example": "/api/v1/users?limit=1&offset1" + } + } + }, "Meta": { "title": "Meta", "required": [ "name", - "version" + "version", + "docs_url", + "docs_dev_url" ], "type": "object", "properties": { @@ -1423,16 +3030,14 @@ "maxLength": 65536, "minLength": 1, "type": "string", - "format": "uri", - "default": "https://docs.osparc.io" + "format": "uri" }, "docs_dev_url": { "title": "Docs Dev Url", "maxLength": 65536, "minLength": 1, "type": "string", - "format": "uri", - "default": "https://api.osparc.io/dev/docs" + "format": "uri" } }, "example": { @@ -1442,10 +3047,54 @@ "v1": "1.3.4", "v2": "2.4.45" }, - "doc_url": "https://api.osparc.io/doc", - "doc_dev_url": "https://api.osparc.io/dev/doc" + "docs_url": "https://api.osparc.io/dev/doc", + "docs_dev_url": "https://api.osparc.io/dev/doc" } }, + "OnePage_SolverPort_": { + "title": "OnePage[SolverPort]", + "required": [ + "items" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/SolverPort" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + } + }, + "description": "A single page is used to envelope a small sequence that does not require\npagination\n\nIf total > MAXIMUM_NUMBER_OF_ITEMS_PER_PAGE, we should consider extending this\nentrypoint to proper pagination" + }, + "OnePage_StudyPort_": { + "title": "OnePage[StudyPort]", + "required": [ + "items" + ], + "type": "object", + "properties": { + "items": { + "title": "Items", + "type": "array", + "items": { + "$ref": "#/components/schemas/StudyPort" + } + }, + "total": { + "title": "Total", + "minimum": 0, + "type": "integer" + } + }, + "description": "A single page is used to envelope a small sequence that does not require\npagination\n\nIf total > MAXIMUM_NUMBER_OF_ITEMS_PER_PAGE, we should consider extending this\nentrypoint to proper pagination" + }, "Profile": { "title": "Profile", "required": [ @@ -1519,6 +3168,22 @@ } } }, + "RunningState": { + "title": "RunningState", + "enum": [ + "UNKNOWN", + "PUBLISHED", + "NOT_STARTED", + "PENDING", + "STARTED", + "RETRY", + "SUCCESS", + "FAILED", + "ABORTED" + ], + "type": "string", + "description": "State of execution of a project's computational workflow\n\nSEE StateType for task state" + }, "Solver": { "title": "Solver", "required": [ @@ -1532,7 +3197,7 @@ "properties": { "id": { "title": "Id", - "pattern": "^(simcore)/(services)/comp(/[\\w/-]+)+$", + "pattern": "^simcore/services/comp/([a-z0-9][a-z0-9_.-]*/)*([a-z0-9-_]+[a-z0-9])$", "type": "string", "description": "Solver identifier" }, @@ -1574,21 +3239,99 @@ "url": "https://api.osparc.io/v0/solvers/simcore%2Fservices%2Fcomp%2Fisolve/releases/2.1.1" } }, - "TaskStates": { - "title": "TaskStates", - "enum": [ - "UNKNOWN", - "PUBLISHED", - "NOT_STARTED", - "PENDING", - "STARTED", - "RETRY", - "SUCCESS", - "FAILED", - "ABORTED" + "SolverPort": { + "title": "SolverPort", + "required": [ + "key", + "kind" ], - "type": "string", - "description": "An enumeration." + "type": "object", + "properties": { + "key": { + "title": "Key name", + "pattern": "^[^_\\W0-9]\\w*$", + "type": "string", + "description": "port identifier name" + }, + "kind": { + "title": "Kind", + "enum": [ + "input", + "output" + ], + "type": "string" + }, + "content_schema": { + "title": "Content Schema", + "type": "object", + "description": "jsonschema for the port's value. SEE https://json-schema.org" + } + }, + "example": { + "key": "input_2", + "kind": "input", + "content_schema": { + "title": "Sleep interval", + "type": "integer", + "x_unit": "second", + "minimum": 0, + "maximum": 5 + } + } + }, + "Study": { + "title": "Study", + "required": [ + "uid" + ], + "type": "object", + "properties": { + "uid": { + "title": "Uid", + "type": "string", + "format": "uuid" + } + } + }, + "StudyPort": { + "title": "StudyPort", + "required": [ + "key", + "kind" + ], + "type": "object", + "properties": { + "key": { + "title": "Key name", + "type": "string", + "description": "port identifier name.Correponds to the UUID of the parameter/probe node in the study", + "format": "uuid" + }, + "kind": { + "title": "Kind", + "enum": [ + "input", + "output" + ], + "type": "string" + }, + "content_schema": { + "title": "Content Schema", + "type": "object", + "description": "jsonschema for the port's value. SEE https://json-schema.org" + } + }, + "example": { + "key": "input_2", + "kind": "input", + "content_schema": { + "title": "Sleep interval", + "type": "integer", + "x_unit": "second", + "minimum": 0, + "maximum": 5 + } + } }, "UserRoleEnum": { "title": "UserRoleEnum", @@ -1637,7 +3380,14 @@ "title": "Location", "type": "array", "items": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] } }, "msg": { From c9ae76de2515bb550196959481d0878bc5a3b647 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Thu, 6 Jul 2023 14:53:36 +0200 Subject: [PATCH 02/13] adapt tests so they pass --- clients/python/client/osparc/__init__.py | 3 ++- clients/python/test_osparc_client/test_meta.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 2efc72bc..415b63b5 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -24,7 +24,6 @@ Profile, ProfileUpdate, Solver, - TaskStates, UserRoleEnum, UsersGroup, ValidationError, @@ -35,6 +34,8 @@ UsersApi ) +from osparc_client import RunningState as TaskStates + __all__ = [ # imports from osparc_client "__version__", diff --git a/clients/python/test_osparc_client/test_meta.py b/clients/python/test_osparc_client/test_meta.py index 3a0983de..a1838093 100644 --- a/clients/python/test_osparc_client/test_meta.py +++ b/clients/python/test_osparc_client/test_meta.py @@ -48,6 +48,8 @@ def make_instance(self, include_optional): return Meta( name = '0', version = '0.5.0', + docs_url = 'https://docs.osparc.io', + docs_dev_url = 'https://api.osparc.io/dev/docs' ) def testMeta(self): From f51fa3130b6d7242d4e221dbddf542bcbecaaf9a Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Mon, 10 Jul 2023 12:19:53 +0200 Subject: [PATCH 03/13] update openapi.json --- api/openapi.json | 103 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 86 insertions(+), 17 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index a9a81d29..f7d8dad5 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -540,7 +540,7 @@ ] } }, - "/v0/solversreleases/page": { + "/v0/solvers/releases/page": { "get": { "tags": [ "solvers" @@ -1649,8 +1649,7 @@ "content": { "application/json": { "schema": { - "title": "Response Get Job Custom Metadata V0 Solvers Solver Key Releases Version Jobs Job Id Metadata Get", - "type": "object" + "$ref": "#/components/schemas/JobMetadata" } } } @@ -1667,13 +1666,13 @@ } } }, - "post": { + "put": { "tags": [ "solvers" ], - "summary": "Create Job Custom Metadata", - "description": "Attaches custom metadata to a job.", - "operationId": "create_job_custom_metadata", + "summary": "Replace Job Custom Metadata", + "description": "Changes job's custom metadata", + "operationId": "replace_job_custom_metadata", "parameters": [ { "required": true, @@ -1710,8 +1709,7 @@ "content": { "application/json": { "schema": { - "title": "Metadata", - "type": "object" + "$ref": "#/components/schemas/JobMetadataReplace" } } }, @@ -2410,8 +2408,7 @@ "content": { "application/json": { "schema": { - "title": "Response Get Study Job Custom Metadata V0 Studies Study Id Jobs Job Id Metadata Get", - "type": "object" + "$ref": "#/components/schemas/JobMetadata" } } } @@ -2428,13 +2425,13 @@ } } }, - "post": { + "put": { "tags": [ "studies" ], - "summary": "Create Study Job Custom Metadata", - "description": "Attaches custom metadata to a job", - "operationId": "create_study_job_custom_metadata", + "summary": "Replace Study Job Custom Metadata", + "description": "Changes job's custom metadata", + "operationId": "replace_study_job_custom_metadata", "parameters": [ { "required": true, @@ -2461,8 +2458,7 @@ "content": { "application/json": { "schema": { - "title": "Metadata", - "type": "object" + "$ref": "#/components/schemas/JobMetadataReplace" } } }, @@ -2715,6 +2711,79 @@ } } }, + "JobMetadata": { + "title": "JobMetadata", + "required": [ + "job_id", + "metadata", + "url" + ], + "type": "object", + "properties": { + "job_id": { + "title": "Job Id", + "type": "string", + "description": "Parent Job", + "format": "uuid" + }, + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "description": "Custom key-value map" + }, + "url": { + "title": "Url", + "maxLength": 2083, + "minLength": 1, + "type": "string", + "description": "Link to get this resource (self)", + "format": "uri" + } + } + }, + "JobMetadataReplace": { + "title": "JobMetadataReplace", + "type": "object", + "properties": { + "metadata": { + "title": "Metadata", + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "description": "Custom key-value map" + } + } + }, "JobOutputs": { "title": "JobOutputs", "required": [ From 5fea52a5c7dff3c4cb6ad9a492d3be04fc0036c0 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Mon, 10 Jul 2023 13:35:22 +0200 Subject: [PATCH 04/13] minor fix --- clients/python/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/python/Makefile b/clients/python/Makefile index c0016f1b..bda7d2b1 100644 --- a/clients/python/Makefile +++ b/clients/python/Makefile @@ -115,8 +115,9 @@ dist: artifacts_dir ## builds distribution wheel dist-ci: python-client dist ## build wheel and tar ball in a single command .PHONY: build-n-install-osparc-dev -build-n-install-osparc-dev: dist-ci ## install the built osparc package in editable mode - python -m pip install -e client/ --find-links=artifacts/dist +build-n-install-osparc-dev: python-client ## install the built osparc package in editable mode + python -m pip install -e artifacts/client + python -m pip install -e client/ ## DOCKER ------------------------------------------------------------------------------- From 1229409d1691363896d93c2ec3e8cde45d5e1b11 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Mon, 10 Jul 2023 14:02:26 +0200 Subject: [PATCH 05/13] minor changes --- clients/python/Makefile | 8 +++++--- clients/python/client/osparc/__init__.py | 3 +-- clients/python/client/osparc/models.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/clients/python/Makefile b/clients/python/Makefile index bda7d2b1..dbcf126e 100644 --- a/clients/python/Makefile +++ b/clients/python/Makefile @@ -26,6 +26,8 @@ python-client: validate-api-specification artifacts_dir ## generate python clien --package-name=osparc_client \ --release-note="Updated to $(APP_VERSION)" black $(PYTHON_DIR)/artifacts/client/*.py + @-mkdir $(PYTHON_DIR)/client/osparc/data/ + @cp $(REPO_ROOT)/api/openapi.json $(PYTHON_DIR)/client/osparc/data/ .PHONY: python-client-from-templates python-client-from-templates: validate-api-specification artifacts_dir ## generate python client using templates in a specified directory (usage: 'make python-client-from-templates -e TEMPLATE_DIR=path/to/templates') @@ -47,6 +49,8 @@ python-client-from-templates: validate-api-specification artifacts_dir ## genera --release-note="Updated to $(APP_VERSION)" \ --template-dir=/tmp/python_templates black $(PYTHON_DIR)/artifacts/client/*.py + @-mkdir $(PYTHON_DIR)/client/osparc/data/ + @cp $(REPO_ROOT)/api/openapi.json $(PYTHON_DIR)/client/osparc/data/ .PHONY: generator-help generator-help: ## help on client-api generator @@ -94,7 +98,7 @@ pylint: _check_venv_active ## runs linter (only to check errors. SEE .pylintrc e .PHONY: test-dev test-dev: _check_venv_active ## runs tests during development # runs tests for development (e.g w/ pdb) - pytest -vv --exitfirst --failed-first --durations=10 --pdb --ignore=$(ARTIFACTS_DIR)/client $(PYTHON_DIR) + python -m pytest -vv --exitfirst --failed-first --durations=10 --pdb $(PYTHON_DIR)/test/test_osparc .PHONY: dist dist: artifacts_dir ## builds distribution wheel @@ -102,8 +106,6 @@ dist: artifacts_dir ## builds distribution wheel python -m pip install build # Build a binary wheel and a source tarball python -m build --sdist --wheel $(ARTIFACTS_DIR)/client - @-mkdir $(PYTHON_DIR)/client/osparc/data/ - @cp $(REPO_ROOT)/api/openapi.json $(PYTHON_DIR)/client/osparc/data/ python -m build --sdist --wheel $(PYTHON_DIR)/client @-rm -rf $(ARTIFACTS_DIR)/dist @mkdir $(ARTIFACTS_DIR)/dist diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 0a231449..855009d8 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -2,6 +2,7 @@ 0.5.0 osparc client """ from ._info import openapi + from osparc_client import ( __version__, ApiClient, @@ -39,8 +40,6 @@ __all__ = [ # imports from osparc_client "__version__", - "api", - "models", "FilesApi", "MetaApi", "SolversApi", diff --git a/clients/python/client/osparc/models.py b/clients/python/client/osparc/models.py index 53fcd952..10dff6b7 100644 --- a/clients/python/client/osparc/models.py +++ b/clients/python/client/osparc/models.py @@ -22,11 +22,11 @@ Profile, ProfileUpdate, Solver, - TaskStates, UserRoleEnum, UsersGroup, ValidationError, ) +from osparc_client.models import RunningState as TaskStates __all__ = [ "BodyUploadFileV0FilesContentPut", From bc8ee1fa47d2a90f0bcced44682b1408629ad311 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Mon, 10 Jul 2023 14:07:33 +0200 Subject: [PATCH 06/13] import new names directly in osparc --- clients/python/client/osparc/__init__.py | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 855009d8..7dfc25cf 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -33,6 +33,22 @@ MetaApi, SolversApi, UsersApi, + + + StudiesApi, + OnePageSolverPort, + StudyPort, + Study, + LimitOffsetPageStudy, + LimitOffsetPageFile, + JobMetadataReplace, + LimitOffsetPageJob, + Links, + SolverPort, + JobMetadata, + LimitOffsetPageSolver, + ErrorGet, + OnePageStudyPort, ) from osparc_client import RunningState as TaskStates @@ -67,6 +83,20 @@ "ApiValueError", "ApiKeyError", "ApiException", + "StudiesApi", + "OnePageSolverPort", + "StudyPort", + "Study", + "LimitOffsetPageStudy", + "LimitOffsetPageFile", + "JobMetadataReplace", + "LimitOffsetPageJob", + "Links", + "SolverPort", + "JobMetadata", + "LimitOffsetPageSolver", + "ErrorGet", + "OnePageStudyPort", # imports from osparc "openapi", ] From 19d30c18aed3a8d6c7e40cd029ef56137c61bf4e Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Tue, 18 Jul 2023 08:40:36 +0200 Subject: [PATCH 07/13] upgrade openapi.json to latest from master on osparc-simcore --- api/openapi.json | 52 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index f7d8dad5..19a780a8 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -1609,7 +1609,7 @@ "solvers" ], "summary": "Get Job Custom Metadata", - "description": "Gets custom metadata from a job", + "description": "Gets custom metadata from a job\n\nNew in *version 0.5*", "operationId": "get_job_custom_metadata", "parameters": [ { @@ -1654,6 +1654,16 @@ } } }, + "404": { + "description": "Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" + } + } + } + }, "422": { "description": "Validation Error", "content": { @@ -1664,14 +1674,19 @@ } } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] }, - "put": { + "patch": { "tags": [ "solvers" ], "summary": "Replace Job Custom Metadata", - "description": "Changes job's custom metadata", + "description": "Updates custom metadata from a job\n\nNew in *version 0.5*", "operationId": "replace_job_custom_metadata", "parameters": [ { @@ -1709,7 +1724,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobMetadataReplace" + "$ref": "#/components/schemas/JobMetadataUpdate" } } }, @@ -1720,7 +1735,19 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/JobMetadata" + } + } + } + }, + "404": { + "description": "Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorGet" + } } } }, @@ -1734,7 +1761,12 @@ } } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] } }, "/v0/studies/": { @@ -2458,7 +2490,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobMetadataReplace" + "$ref": "#/components/schemas/JobMetadataUpdate" } } }, @@ -2757,8 +2789,8 @@ } } }, - "JobMetadataReplace": { - "title": "JobMetadataReplace", + "JobMetadataUpdate": { + "title": "JobMetadataUpdate", "type": "object", "properties": { "metadata": { From 30879a3d664489b7f95481f0e27d2ca9e2197338 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Tue, 18 Jul 2023 08:58:13 +0200 Subject: [PATCH 08/13] fix import --- clients/python/client/osparc/__init__.py | 48 ++++++++++++------------ 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 7dfc25cf..873c7594 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -5,6 +5,15 @@ from osparc_client import ( __version__, + + # APIs + FilesApi, + MetaApi, + SolversApi, + StudiesApi, + UsersApi, + + # API client ApiClient, Configuration, OpenApiException, @@ -12,43 +21,36 @@ ApiValueError, ApiKeyError, ApiException, - # model imports + + # models BodyUploadFileV0FilesContentPut, + ErrorGet, File, Groups, HTTPValidationError, Job, JobInputs, + JobMetadata, + JobMetadataUpdate, JobOutputs, JobStatus, + LimitOffsetPageFile, + LimitOffsetPageJob, + LimitOffsetPageSolver, + LimitOffsetPageStudy, + Links, Meta, + OnePageSolverPort, + OnePageStudyPort, Profile, ProfileUpdate, Solver, + SolverPort, + Study, + StudyPort, UserRoleEnum, UsersGroup, ValidationError, - # api imports - FilesApi, - MetaApi, - SolversApi, - UsersApi, - - - StudiesApi, - OnePageSolverPort, - StudyPort, - Study, - LimitOffsetPageStudy, - LimitOffsetPageFile, - JobMetadataReplace, - LimitOffsetPageJob, - Links, - SolverPort, - JobMetadata, - LimitOffsetPageSolver, - ErrorGet, - OnePageStudyPort, ) from osparc_client import RunningState as TaskStates @@ -89,7 +91,7 @@ "Study", "LimitOffsetPageStudy", "LimitOffsetPageFile", - "JobMetadataReplace", + "JobMetadataUpdate", "LimitOffsetPageJob", "Links", "SolverPort", From cc742815844047c1bafcc28f9241009f39c08629 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Wed, 19 Jul 2023 09:49:58 +0200 Subject: [PATCH 09/13] increment version - to be changed --- api/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/config.json b/api/config.json index 16f5253c..82e61fc2 100644 --- a/api/config.json +++ b/api/config.json @@ -2,6 +2,6 @@ "homepage": "https://itisfoundation.github.io/osparc-simcore-clients/", "python": { - "version": "0.5.0" + "version": "0.6.0" } } From b0b7fabc2e7a6e5b7c323f5cf9c4848c2e99c352 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Wed, 19 Jul 2023 15:23:32 +0200 Subject: [PATCH 10/13] use tuple instead of list for __all__ --- clients/python/client/osparc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 2f9e5ec2..83929c65 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -50,7 +50,7 @@ from ._info import openapi -__all__ = [ +__all__: tuple[str, ...] = ( # imports from osparc_client "__version__", "FilesApi", @@ -96,4 +96,4 @@ "OnePageStudyPort", # imports from osparc "openapi", -] +) From 94ab77634c205f16f793ef6c86f1ee1c174dcdc5 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Wed, 19 Jul 2023 16:50:50 +0200 Subject: [PATCH 11/13] fix tests against older python versiosn --- clients/python/client/osparc/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/python/client/osparc/__init__.py b/clients/python/client/osparc/__init__.py index 83929c65..501af224 100644 --- a/clients/python/client/osparc/__init__.py +++ b/clients/python/client/osparc/__init__.py @@ -1,6 +1,8 @@ """ 0.5.0 osparc client """ +from typing import Tuple + from osparc_client import ( # APIs; API client; models ApiClient, ApiException, @@ -50,7 +52,7 @@ from ._info import openapi -__all__: tuple[str, ...] = ( +__all__: Tuple[str, ...] = ( # imports from osparc_client "__version__", "FilesApi", From 23ffd7a8ca747b4c311fa70b067e3ebfb55dbcb6 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Thu, 20 Jul 2023 09:21:02 +0200 Subject: [PATCH 12/13] fix __all__ in api.py and models.py --- clients/python/client/osparc/api.py | 4 ++-- clients/python/client/osparc/models.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/python/client/osparc/api.py b/clients/python/client/osparc/api.py index 2c654b57..84c25941 100644 --- a/clients/python/client/osparc/api.py +++ b/clients/python/client/osparc/api.py @@ -1,5 +1,5 @@ import warnings -from typing import Final +from typing import Final, Tuple from ._warnings_and_errors import VisibleDeprecationWarning @@ -11,4 +11,4 @@ from osparc_client.api import FilesApi, MetaApi, SolversApi, UsersApi -__all__ = ["FilesApi", "MetaApi", "SolversApi", "UsersApi"] +__all__: Tuple[str, ...] = ("FilesApi", "MetaApi", "SolversApi", "UsersApi") diff --git a/clients/python/client/osparc/models.py b/clients/python/client/osparc/models.py index 8e54bf31..888da09c 100644 --- a/clients/python/client/osparc/models.py +++ b/clients/python/client/osparc/models.py @@ -1,5 +1,5 @@ import warnings -from typing import Final +from typing import Final, Tuple from ._warnings_and_errors import VisibleDeprecationWarning @@ -26,7 +26,7 @@ from osparc_client.models import RunningState as TaskStates from osparc_client.models import Solver, UserRoleEnum, UsersGroup, ValidationError -__all__ = [ +__all__: Tuple[str, ...] = ( "BodyUploadFileV0FilesContentPut", "File", "Groups", @@ -43,4 +43,4 @@ "UserRoleEnum", "UsersGroup", "ValidationError", -] +) From 569b49b86c1b92b30a35cd02f0c564baad3e7b85 Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Thu, 20 Jul 2023 09:31:43 +0200 Subject: [PATCH 13/13] separate options on different lines --- clients/python/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/clients/python/Makefile b/clients/python/Makefile index 4aef4680..010da551 100644 --- a/clients/python/Makefile +++ b/clients/python/Makefile @@ -102,7 +102,13 @@ pylint: _check_venv_active ## runs linter (only to check errors. SEE .pylintrc e .PHONY: test-dev test-dev: _check_venv_active ## runs tests during development # runs tests for development (e.g w/ pdb) - python -m pytest -vv --exitfirst --failed-first --durations=10 --pdb $(PYTHON_DIR)/test/test_osparc + python -m pytest \ + -vv \ + --exitfirst \ + --failed-first \ + --durations=10 \ + --pdb \ + $(PYTHON_DIR)/test/test_osparc .PHONY: dist dist: artifacts_dir ## builds distribution wheel