Skip to content

Commit

Permalink
✨ Meta-modeling infrastructure: iterators (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Jan 13, 2022
1 parent f4d75f3 commit fe7b308
Show file tree
Hide file tree
Showing 72 changed files with 3,513 additions and 349 deletions.
11 changes: 8 additions & 3 deletions api/specs/webserver/components/schemas/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ components:
- data
properties:
data:
$ref: '#/components/schemas/PipelineCreatedSchema'
$ref: "#/components/schemas/PipelineCreatedSchema"
error:
nullable: true
default: null

PipelineCreatedSchema:
type: object
required:
- pipeline_id
- pipelines_id
properties:
pipeline_id:
type: string
example: 123e4567-e89b-12d3-a456-426655440000
description: "ID for created pipeline (=project identifier)"
ref_ids:
type: array
items:
type: integer
description: "Checkpoints IDs for created pipeline"
229 changes: 229 additions & 0 deletions api/specs/webserver/openapi-meta-projects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
paths:
/projects/{project_uuid}/checkpoint/{ref_id}/iterations:
get:
tags:
- meta-projects
summary: List Project Iterations
description: Lists current project's iterations
operationId: "simcore_service_webserver.meta_modeling_handlers._list_meta_project_iterations_handler"
parameters:
- description: Project unique identifier
required: true
schema:
title: Project Uuid
type: string
description: Project unique identifier
format: uuid
name: project_uuid
in: path
- required: true
schema:
title: Ref Id
anyOf:
- type: integer
- type: string
name: ref_id
in: path
- description: index to the first item to return (pagination)
required: false
schema:
title: Offset
exclusiveMinimum: false
type: integer
description: index to the first item to return (pagination)
default: 0
minimum: 0
name: offset
in: query
- description: maximum number of items to return (pagination)
required: false
schema:
title: Limit
maximum: 50.0
minimum: 1.0
type: integer
description: maximum number of items to return (pagination)
default: 20
name: limit
in: query
responses:
"200":
description: Successful Response
content:
application/json:
schema:
$ref: "#/components/schemas/Page_IterationAsItem_"
"404":
description:
This project has no iterations.Only meta-project have iterations
and they must be explicitly created.
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
components:
schemas:
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: "#/components/schemas/ValidationError"
IterationAsItem:
title: IterationAsItem
required:
- name
- parent
- workcopy_project_id
- workcopy_project_url
- url
type: object
properties:
name:
title: Name
type: string
description: Iteration's resource name [AIP-122](https://google.aip.dev/122)
parent:
title: Parent
allOf:
- $ref: "#/components/schemas/ParentMetaProjectRef"
description: Reference to the the meta-project that defines this iteration
workcopy_project_id:
title: Workcopy's Project Id
type: string
description:
ID to this iteration's working copy.A working copy is a real
project where this iteration is run
format: uuid
workcopy_project_url:
title: Workcopy's Project Url
maxLength: 2083
minLength: 1
type: string
format: uri
url:
title: Url
maxLength: 2083
minLength: 1
type: string
format: uri
PageLinks:
title: PageLinks
required:
- self
- first
- last
type: object
properties:
self:
title: Self
maxLength: 65536
minLength: 1
type: string
format: uri
first:
title: First
maxLength: 65536
minLength: 1
type: string
format: uri
prev:
title: Prev
maxLength: 65536
minLength: 1
type: string
format: uri
next:
title: Next
maxLength: 65536
minLength: 1
type: string
format: uri
last:
title: Last
maxLength: 65536
minLength: 1
type: string
format: uri
additionalProperties: false
PageMetaInfoLimitOffset:
title: PageMetaInfoLimitOffset
required:
- total
- count
type: object
properties:
limit:
title: Limit
exclusiveMinimum: true
type: integer
default: 20
minimum: 0
total:
title: Total
minimum: 0.0
type: integer
offset:
title: Offset
minimum: 0.0
type: integer
default: 0
count:
title: Count
minimum: 0.0
type: integer
Page_IterationAsItem_:
title: Page[IterationAsItem]
required:
- _meta
- _links
- data
type: object
properties:
_meta:
$ref: "#/components/schemas/PageMetaInfoLimitOffset"
_links:
$ref: "#/components/schemas/PageLinks"
data:
title: Data
type: array
items:
$ref: "#/components/schemas/IterationAsItem"
ParentMetaProjectRef:
title: ParentMetaProjectRef
required:
- project_id
- ref_id
type: object
properties:
project_id:
title: Project Id
type: string
format: uuid
ref_id:
title: Ref Id
type: integer
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
type: string
msg:
title: Message
type: string
type:
title: Error Type
type: string
5 changes: 3 additions & 2 deletions api/specs/webserver/openapi-services.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
paths:
/computation/pipeline/{project_id}/start:
post:
description: Starts a pipeline of a given project
description: Starts the pipeline(s) of a given (meta) project
tags:
- service
operationId: start_pipeline
Expand Down Expand Up @@ -43,7 +43,7 @@ paths:

/computation/pipeline/{project_id}/stop:
post:
description: Stops a pipeline of a given project
description: Stops (all) pipeline(s) of a given (meta) project
tags:
- service
operationId: stop_pipeline
Expand All @@ -54,6 +54,7 @@ paths:
description: Succesffully stopped the pipeline
default:
$ref: "#/components/responses/DefaultErrorResponse"

# PROJECT SERVICES -----------------------------------------------------------------
components:
parameters:
Expand Down
5 changes: 5 additions & 0 deletions api/specs/webserver/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ paths:
/projects/{study_uuid}/tags/{tag_id}:
$ref: "./openapi-projects.yaml#/paths/~1projects~1{study_uuid}~1tags~1{tag_id}"

# META-PROJECTS -------------------------------------------------------------------------

/projects/{project_uuid}/checkpoint/{ref_id}/iterations:
$ref: "./openapi-meta-projects.yaml#/paths/~1projects~1{project_uuid}~1checkpoint~1{ref_id}~1iterations"

# REPOSITORY -------------------------------------------------------------------------
/repos/projects:
$ref: "./openapi-version-control.yaml#/paths/~1repos~1projects"
Expand Down
Loading

0 comments on commit fe7b308

Please sign in to comment.