Skip to content

Commit 826b455

Browse files
committed
docs: added juno sdk to documentation
Signed-off-by: aaronmell <[email protected]>
1 parent 4a9227b commit 826b455

File tree

5 files changed

+96
-3
lines changed

5 files changed

+96
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Just some of the projects that use or rely on Argo Workflows (complete list [her
7171

7272
## Client Libraries
7373

74-
Check out our [Java, Golang, and Python (Hera) clients](docs/client-libraries.md).
74+
Check out our [Java, Golang, Python (Hera), and Typescript (Juno) clients](docs/client-libraries.md).
7575

7676
## Quickstart
7777

@@ -116,7 +116,7 @@ An incomplete list of features Argo Workflows provides:
116116
* Multiple executors
117117
* Multiple pod and workflow garbage collection strategies
118118
* Automatically calculated resource usage per step
119-
* Java, Golang, and Python (Hera) SDKs
119+
* Java, Golang, Python (Hera), and Typescript (Juno) SDKs
120120
* Pod Disruption Budget support
121121
* Single-sign on (OAuth2/OIDC)
122122
* Webhook triggering

USERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,4 @@ In addition, the following projects are **officially** using Argo Workflows:
229229
1. [SQLFlow](https://github.com/sql-machine-learning/sqlflow)
230230
1. [BisQue](https://github.com/UCSB-VRL/bisqueUCSB)
231231
1. [Tator](https://www.tator.io)
232+
1. [Juno](https://github.com/lumindigital/juno)

docs/client-libraries.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ We have libraries for the following languages:
1414
* [Go](#go-sdk)
1515
* [Java](#java-sdk)
1616
* [Python](#hera-python-sdk)
17+
* [Typescript](#juno-typescript-sdk)
1718

1819
Please feel free to contribute more language libraries to help improve the Argo Workflows ecosystem.
1920

@@ -63,3 +64,90 @@ w.create()
6364
```
6465

6566
Learn more in the [Hera walk-through](https://hera.readthedocs.io/en/stable/walk-through/quick-start/).
67+
68+
69+
### Juno Typescript SDK
70+
Juno is a workflow generator that allows you to write you workflows in Typescript. Juno reduces your usage of pass by string and provides types and validation to make writing complex workflows just a little less painful.
71+
72+
Juno is a community-supported project
73+
74+
```ts
75+
import { Arguments } from '../src/api/arguments';
76+
import { DagTask } from '../src/api/dag-task';
77+
import { DagTemplate } from '../src/api/dag-template';
78+
import { Inputs } from '../src/api/inputs';
79+
import { InputParameter } from '../src/api/parameter';
80+
import { Template } from '../src/api/template';
81+
import { Workflow } from '../src/api/workflow';
82+
import { WorkflowSpec } from '../src/api/workflow-spec';
83+
import { IoArgoprojWorkflowV1Alpha1Workflow } from '../src/workflow-interfaces/data-contracts';
84+
import { and, simpleTag } from '../src/api/expression';
85+
import { Container } from '../src/api/container';
86+
87+
export async function generateTemplate(): Promise<IoArgoprojWorkflowV1Alpha1Workflow> {
88+
const messageInputParameter = new InputParameter('message');
89+
90+
const echoTemplateInputs = new Inputs({
91+
parameters: [messageInputParameter],
92+
});
93+
94+
const echoTemplate = new Template('echo', {
95+
container: new Container({
96+
command: ['echo', simpleTag(echoTemplateInputs.parameters?.[0] as InputParameter)],
97+
image: 'alpine:3.7',
98+
}),
99+
inputs: echoTemplateInputs,
100+
});
101+
102+
const taskA = new DagTask('A', {
103+
arguments: new Arguments({
104+
parameters: [messageInputParameter.toArgumentParameter({ value: 'A' })],
105+
}),
106+
template: echoTemplate,
107+
});
108+
109+
const taskB = new DagTask('B', {
110+
arguments: new Arguments({
111+
parameters: [messageInputParameter.toArgumentParameter({ value: 'B' })],
112+
}),
113+
depends: taskA,
114+
template: echoTemplate,
115+
});
116+
117+
const taskC = new DagTask('C', {
118+
arguments: new Arguments({
119+
parameters: [messageInputParameter.toArgumentParameter({ value: 'C' })],
120+
}),
121+
depends: taskA,
122+
template: echoTemplate,
123+
});
124+
125+
const diamondTemplate = new Template('diamond', {
126+
dag: new DagTemplate({
127+
tasks: [
128+
taskA,
129+
taskB,
130+
taskC,
131+
new DagTask('D', {
132+
arguments: new Arguments({
133+
parameters: [messageInputParameter.toArgumentParameter({ value: 'D' })],
134+
}),
135+
depends: and([taskB, taskC]),
136+
template: echoTemplate,
137+
}),
138+
],
139+
}),
140+
});
141+
142+
return new Workflow({
143+
metadata: {
144+
generateName: 'dag-diamond-',
145+
},
146+
spec: new WorkflowSpec({
147+
entrypoint: diamondTemplate,
148+
}),
149+
}).toWorkflow();
150+
}
151+
```
152+
153+
Learn more at [Juno Docs ](https://github.com/lumindigital/juno/blob/main/docs/index.md).

docs/use-cases/machine-learning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* Try out [Hera](https://hera.readthedocs.io/en/stable/) for writing Workflows in Python.
66
* Also read: [How To Get the Most out of Hera for Data Science](https://pipekit.io/blog/how-to-get-the-most-out-of-hera-for-data-science)
7-
* Try out the [Go and Java SDKs](../client-libraries.md).
7+
* Try out the [Go, Java, and Typescript SDKs](../client-libraries.md).
88

99
## Videos
1010

docs/walk-through/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ Start with [Argo CLI](argo-cli.md).
1919

2020
If you would prefer to write Workflows using Python instead of YAML, check out the walk through for
2121
[Hera, the Python SDK for Argo Workflows](https://hera.readthedocs.io/en/stable/walk-through/quick-start/).
22+
23+
## Juno SDK for Typescript Users
24+
25+
You can also write Workflows in typescript, check out the documentation on [Juno](https://github.com/lumindigital/juno/blob/main/docs/index.md)

0 commit comments

Comments
 (0)