Skip to content

Commit 33ffa7f

Browse files
committed
setup
Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
1 parent affba84 commit 33ffa7f

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.

maintainer_guidelines.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Maintainer's Guide
2+
3+
## Tips
4+
5+
Here are a few tips for repository maintainers.
6+
7+
* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
8+
* Work from your own fork. As you are making contributions to the project, you should be working from your own fork just as outside contributors do. This keeps the branches in github to a minimum and reduces unnecessary CI runs.
9+
* Try to proactively label issues with backport labels if it's obvious that a change should be backported to previous releases.
10+
* When landing pull requests, if there is more than one commit, try to squash into a single commit. Usually this can just be done with the GitHub UI when merging the PR. Use "Squash and merge".
11+
* Triage issues once in a while in order to keep the repository alive. During the triage:
12+
* If some issues are stale for too long because they are no longer valid/relevant or because the discussion reached no significant action items to perform, close them and invite the users to reopen if they need it.
13+
* If some PRs are no longer valid but still needed, ask the user to rebase them
14+
* If some issues and PRs are still relevant, use labels to help organize tasks
15+
* If you find an issue that you want to create a fix for and submit a pull request, be sure to assign it to yourself so that others maintainers don't start working on it at the same time.
16+
17+
## Branch Management
18+
19+
The `main` branch is the bleeding edge. New major versions of the module
20+
are cut from this branch and tagged. If you intend to submit a pull request
21+
you should use `main HEAD` as your starting point.
22+
23+
Each major release will result in a new branch and tag. For example, the
24+
release of version 1.0.0 of the project results in a `v1.0.0` tag on the
25+
release commit, and a new branch `release-1.y.z` for subsequent minor and patch
26+
level releases of that major version if necessary. However, development will continue
27+
apace on `main` for the next major version - e.g. 2.0.0. Version branches
28+
are only created for each major version. Minor and patch level releases
29+
are simply tagged.

0 commit comments

Comments
 (0)