Skip to content

Commit

Permalink
Merge pull request #102 from trickest/fix/version-definition
Browse files Browse the repository at this point in the history
Update workflow version definition
  • Loading branch information
mhmdiaa authored Dec 6, 2023
2 parents 0f54b24 + 033721e commit bcea6ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/execute/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ func readWorkflowYAMLandCreateVersion(fileName string, workflowName string, obje
Nodes map[string]*types.Node `json:"nodes"`
Connections []types.Connection `json:"connections"`
PrimitiveNodes map[string]*types.PrimitiveNode `json:"primitiveNodes"`
Annotations map[string]*types.Annotation `json:"annotations"`
}{
Nodes: nodes,
Connections: connections,
Expand Down Expand Up @@ -965,6 +966,7 @@ func createToolWorkflow(wfName string, space *types.SpaceDetailed, project *type
Nodes map[string]*types.Node `json:"nodes"`
Connections []types.Connection `json:"connections"`
PrimitiveNodes map[string]*types.PrimitiveNode `json:"primitiveNodes"`
Annotations map[string]*types.Annotation `json:"annotations"`
}{
Nodes: map[string]*types.Node{
node.Name: node,
Expand Down
14 changes: 14 additions & 0 deletions types/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,21 @@ type WorkflowVersionDetailed struct {
Nodes map[string]*Node `json:"nodes"`
Connections []Connection `json:"connections"`
PrimitiveNodes map[string]*PrimitiveNode `json:"primitiveNodes"`
Annotations map[string]*Annotation `json:"annotations"`
} `json:"data"`
}

type Annotation struct {
Content string `json:"content"`
Width float64 `json:"width"`
Height float64 `json:"height"`
Name string `json:"name"`
Coordinates struct {
X float64 `json:"x"`
Y float64 `json:"y"`
} `json:"coordinates"`
}

type WorkflowVersionStripped struct {
ID uuid.UUID `json:"id"`
WorkflowInfo uuid.UUID `json:"workflow_info"`
Expand All @@ -64,6 +76,7 @@ type WorkflowVersionStripped struct {
Nodes map[string]*Node `json:"nodes"`
Connections []Connection `json:"connections"`
PrimitiveNodes map[string]*PrimitiveNode `json:"primitiveNodes"`
Annotations map[string]*Annotation `json:"annotations"`
} `json:"data"`
}

Expand Down Expand Up @@ -139,4 +152,5 @@ type NodeInput struct {
Description *string `json:"description,omitempty"`
WorkerConnected *bool `json:"workerConnected,omitempty"`
Multi *bool `json:"multi,omitempty"`
Visible *bool `json:"visible"`
}

0 comments on commit bcea6ed

Please sign in to comment.