Skip to content

Commit 4082721

Browse files
authored
Merge pull request #2 from tsurdilo/smallupdates
setup
2 parents affba84 + 33ffa7f commit 4082721

File tree

11 files changed

+178
-34
lines changed

11 files changed

+178
-34
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @tsurdilo @antmendoza

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug encountered with the Serverless Workflow Python SDK
4+
labels: kind/bug
5+
6+
---
7+
8+
**What happened**:
9+
10+
**What you expected to happen**:
11+
12+
**How to reproduce it**:
13+
14+
**Anything else we need to know?**:
15+
16+
**Environment**:

.github/ISSUE_TEMPLATE/enhancement.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Enhancement Request
3+
about: Suggest an enhancement to the Serverless Workflow Python SDK
4+
labels: kind/feature
5+
6+
---
7+
8+
**What would you like to be added**:
9+
10+
**Why is this needed**:

.github/ISSUE_TEMPLATE/question.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Question
3+
about: Ask a question about the Serverless Workflow Python SDK
4+
labels: kind/question
5+
6+
---
7+
8+
**What is the question**:

.github/OWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
reviewers:
2+
- tsurdilo
3+
- antmendoza
4+
approvers:
5+
- tsurdilo
6+
- antmendoza
7+
labels:
8+
- sig/contributor-experience

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**Many thanks for submitting your Pull Request :heart:!**
2+
3+
**What this PR does / why we need it**:
4+
5+
**Special notes for reviewers**:
6+
7+
**Additional information (if needed):**

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,8 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# Editors
132+
.idea
133+
.vscode
134+
*.iml

MAINTAINERS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Serverless Workflow Python SDK Maintainers
2+
3+
* [Antonio Mendoza Pérez](https://github.com/antmendoza)

README.md

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Serverless Workflow Specification - Typescript SDK
1+
# Serverless Workflow Specification - Python SDK
22

33
Provides the Python API/SPI for the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification)
44

@@ -18,24 +18,23 @@ With the SDK you can:
1818
## **WIP** Programmatically build workflow definitions
1919

2020
```
21-
workflow = Workflow(id_="greeting",
22-
name="Greeting Workflow",
23-
description="Greet Someone",
24-
version='1.0',
25-
specVersion='0.8',
26-
start="Greet",
27-
states=[],
28-
functions=[]
29-
)
30-
21+
workflow = Workflow(id_="greeting",
22+
name="Greeting Workflow",
23+
description="Greet Someone",
24+
version='1.0',
25+
specVersion='0.8',
26+
start="Greet",
27+
states=[],
28+
functions=[]
29+
)
3130
```
3231

3332
## Parse workflow JSON and YAML definitions
3433

3534
### Convert from JSON or YAML source
3635

3736
```
38-
swf_content = """id: greeting
37+
swf_content = """id: greeting
3938
name: Greeting Workflow
4039
version: '1.0'
4140
description: Greet Someone
@@ -65,18 +64,17 @@ You can see a full example in the [test_workflow.py](./tests/test_workflow.py) f
6564
### Parse workflow to JSON / YAML
6665

6766
```
68-
workflow = Workflow(id_="greeting",
69-
name="Greeting Workflow",
70-
description="Greet Someone",
71-
version='1.0',
72-
specVersion='0.8',
73-
start="Greet",
74-
states=[],
75-
functions=[]
76-
)
77-
78-
print(workflow.to_json())
79-
print(workflow.to_yaml())
67+
workflow = Workflow(id_="greeting",
68+
name="Greeting Workflow",
69+
description="Greet Someone",
70+
version='1.0',
71+
specVersion='0.8',
72+
start="Greet",
73+
states=[],
74+
functions=[]
75+
)
76+
print(workflow.to_json())
77+
print(workflow.to_yaml())
8078
```
8179

8280
You can see a full example in the [test_workflow.py](./tests/test_workflow.py) file
@@ -85,16 +83,16 @@ You can see a full example in the [test_workflow.py](./tests/test_workflow.py) f
8583
## Validate workflow definitions
8684

8785
```
88-
workflow = Workflow(id_="greeting",
89-
name="Greeting Workflow",
90-
description="Greet Someone",
91-
version='1.0',
92-
specVersion='0.8',
93-
start="Greet",
94-
states=[],
95-
functions=[]
96-
)
97-
WorkflowValidator(Workflow(workflow)).validate()
86+
workflow = Workflow(id_="greeting",
87+
name="Greeting Workflow",
88+
description="Greet Someone",
89+
version='1.0',
90+
specVersion='0.8',
91+
start="Greet",
92+
states=[],
93+
functions=[]
94+
)
95+
WorkflowValidator(Workflow(workflow)).validate()
9896
9997
```
10098
The `validate` method will raise an exception if the provided workflow does not complaint specification.

code-of-conduct.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## CNCF Community Code of Conduct v1.0
2+
3+
Other languages available:
4+
- [Chinese/中文](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/zh.md)
5+
- [German/Deutsch](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/de.md)
6+
- [Spanish/Español](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/es.md)
7+
- [French/Français](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/fr.md)
8+
- [Italian/Italiano](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/it.md)
9+
- [Japanese/日本語](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/jp.md)
10+
- [Korean/한국어](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ko.md)
11+
- [Ukrainian/Українська](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/uk.md)
12+
- [Russian/Русский](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ru.md)
13+
- [Portuguese/Português](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pt.md)
14+
- [Arabic/العربية](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ar.md)
15+
- [Polish/Polski](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pl.md)
16+
17+
### Contributor Code of Conduct
18+
19+
As contributors and maintainers of this project, and in the interest of fostering
20+
an open and welcoming community, we pledge to respect all people who contribute
21+
through reporting issues, posting feature requests, updating documentation,
22+
submitting pull requests or patches, and other activities.
23+
24+
We are committed to making participation in this project a harassment-free experience for
25+
everyone, regardless of level of experience, gender, gender identity and expression,
26+
sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
27+
religion, or nationality.
28+
29+
Examples of unacceptable behavior by participants include:
30+
31+
* The use of sexualized language or imagery
32+
* Personal attacks
33+
* Trolling or insulting/derogatory comments
34+
* Public or private harassment
35+
* Publishing others' private information, such as physical or electronic addresses,
36+
without explicit permission
37+
* Other unethical or unprofessional conduct.
38+
39+
Project maintainers have the right and responsibility to remove, edit, or reject
40+
comments, commits, code, wiki edits, issues, and other contributions that are not
41+
aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers
42+
commit themselves to fairly and consistently applying these principles to every aspect
43+
of managing this project. Project maintainers who do not follow or enforce the Code of
44+
Conduct may be permanently removed from the project team.
45+
46+
This code of conduct applies both within project spaces and in public spaces
47+
when an individual is representing the project or its community.
48+
49+
Instances of abusive, harassing, or otherwise unacceptable behavior in Kubernetes may be reported by contacting the [Kubernetes Code of Conduct Committee](https://git.k8s.io/community/committee-code-of-conduct) via conduct@kubernetes.io. For other projects, please contact a CNCF project maintainer or our mediator, Mishi Choudhary via mishi@linux.com.
50+
51+
This Code of Conduct is adapted from the Contributor Covenant
52+
(http://contributor-covenant.org), version 1.2.0, available at
53+
http://contributor-covenant.org/version/1/2/0/
54+
55+
56+
### CNCF Events Code of Conduct
57+
58+
CNCF events are governed by the Linux Foundation [Code of Conduct](https://events.linuxfoundation.org/code-of-conduct/) available on the event page.
59+
This is designed to be compatible with the above policy and also includes more details on responding to incidents.

0 commit comments

Comments
 (0)