diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..df516d3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @tsurdilo @antmendoza \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..51138ea --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,16 @@ +--- +name: Bug Report +about: Report a bug encountered with the Serverless Workflow Python SDK +labels: kind/bug + +--- + +**What happened**: + +**What you expected to happen**: + +**How to reproduce it**: + +**Anything else we need to know?**: + +**Environment**: \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 0000000..cccbf1d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,10 @@ +--- +name: Enhancement Request +about: Suggest an enhancement to the Serverless Workflow Python SDK +labels: kind/feature + +--- + +**What would you like to be added**: + +**Why is this needed**: \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..502a85a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,8 @@ +--- +name: Question +about: Ask a question about the Serverless Workflow Python SDK +labels: kind/question + +--- + +**What is the question**: \ No newline at end of file diff --git a/.github/OWNERS b/.github/OWNERS new file mode 100644 index 0000000..725676b --- /dev/null +++ b/.github/OWNERS @@ -0,0 +1,8 @@ +reviewers: + - tsurdilo + - antmendoza +approvers: + - tsurdilo + - antmendoza +labels: + - sig/contributor-experience \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..157cd18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +**Many thanks for submitting your Pull Request :heart:!** + +**What this PR does / why we need it**: + +**Special notes for reviewers**: + +**Additional information (if needed):** \ No newline at end of file diff --git a/.gitignore b/.gitignore index b6e4761..81b4242 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,8 @@ dmypy.json # Pyre type checker .pyre/ + +# Editors +.idea +.vscode +*.iml diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..bcd7697 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,3 @@ +# Serverless Workflow Python SDK Maintainers + +* [Antonio Mendoza Pérez](https://github.com/antmendoza) diff --git a/README.md b/README.md index 4a66c24..663eb76 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Serverless Workflow Specification - Typescript SDK +# Serverless Workflow Specification - Python SDK Provides the Python API/SPI for the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification) @@ -18,16 +18,15 @@ With the SDK you can: ## **WIP** Programmatically build workflow definitions ``` - workflow = Workflow(id_="greeting", - name="Greeting Workflow", - description="Greet Someone", - version='1.0', - specVersion='0.8', - start="Greet", - states=[], - functions=[] - ) - +workflow = Workflow(id_="greeting", + name="Greeting Workflow", + description="Greet Someone", + version='1.0', + specVersion='0.8', + start="Greet", + states=[], + functions=[] +) ``` ## Parse workflow JSON and YAML definitions @@ -35,7 +34,7 @@ With the SDK you can: ### Convert from JSON or YAML source ``` - swf_content = """id: greeting +swf_content = """id: greeting name: Greeting Workflow version: '1.0' description: Greet Someone @@ -65,18 +64,17 @@ You can see a full example in the [test_workflow.py](./tests/test_workflow.py) f ### Parse workflow to JSON / YAML ``` - workflow = Workflow(id_="greeting", - name="Greeting Workflow", - description="Greet Someone", - version='1.0', - specVersion='0.8', - start="Greet", - states=[], - functions=[] - ) - - print(workflow.to_json()) - print(workflow.to_yaml()) +workflow = Workflow(id_="greeting", + name="Greeting Workflow", + description="Greet Someone", + version='1.0', + specVersion='0.8', + start="Greet", + states=[], + functions=[] +) +print(workflow.to_json()) +print(workflow.to_yaml()) ``` 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 ## Validate workflow definitions ``` - workflow = Workflow(id_="greeting", - name="Greeting Workflow", - description="Greet Someone", - version='1.0', - specVersion='0.8', - start="Greet", - states=[], - functions=[] - ) - WorkflowValidator(Workflow(workflow)).validate() +workflow = Workflow(id_="greeting", + name="Greeting Workflow", + description="Greet Someone", + version='1.0', + specVersion='0.8', + start="Greet", + states=[], + functions=[] +) +WorkflowValidator(Workflow(workflow)).validate() ``` The `validate` method will raise an exception if the provided workflow does not complaint specification. diff --git a/code-of-conduct.md b/code-of-conduct.md new file mode 100644 index 0000000..c868ede --- /dev/null +++ b/code-of-conduct.md @@ -0,0 +1,59 @@ +## CNCF Community Code of Conduct v1.0 + +Other languages available: +- [Chinese/中文](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/zh.md) +- [German/Deutsch](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/de.md) +- [Spanish/Español](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/es.md) +- [French/Français](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/fr.md) +- [Italian/Italiano](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/it.md) +- [Japanese/日本語](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/jp.md) +- [Korean/한국어](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ko.md) +- [Ukrainian/Українська](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/uk.md) +- [Russian/Русский](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ru.md) +- [Portuguese/Português](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pt.md) +- [Arabic/العربية](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ar.md) +- [Polish/Polski](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pl.md) + +### Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of fostering +an open and welcoming community, we pledge to respect all people who contribute +through reporting issues, posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for +everyone, regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, body size, race, ethnicity, age, +religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing others' private information, such as physical or electronic addresses, + without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are not +aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers +commit themselves to fairly and consistently applying these principles to every aspect +of managing this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +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. + +This Code of Conduct is adapted from the Contributor Covenant +(http://contributor-covenant.org), version 1.2.0, available at +http://contributor-covenant.org/version/1/2/0/ + + +### CNCF Events Code of Conduct + +CNCF events are governed by the Linux Foundation [Code of Conduct](https://events.linuxfoundation.org/code-of-conduct/) available on the event page. +This is designed to be compatible with the above policy and also includes more details on responding to incidents. \ No newline at end of file diff --git a/maintainer_guidelines.md b/maintainer_guidelines.md new file mode 100644 index 0000000..6603a26 --- /dev/null +++ b/maintainer_guidelines.md @@ -0,0 +1,29 @@ +# Maintainer's Guide + +## Tips + +Here are a few tips for repository maintainers. + +* Stay on top of your pull requests. PRs that languish for too long can become difficult to merge. +* 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. +* Try to proactively label issues with backport labels if it's obvious that a change should be backported to previous releases. +* 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". +* Triage issues once in a while in order to keep the repository alive. During the triage: + * 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. + * If some PRs are no longer valid but still needed, ask the user to rebase them + * If some issues and PRs are still relevant, use labels to help organize tasks + * 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. + +## Branch Management + +The `main` branch is the bleeding edge. New major versions of the module +are cut from this branch and tagged. If you intend to submit a pull request +you should use `main HEAD` as your starting point. + +Each major release will result in a new branch and tag. For example, the +release of version 1.0.0 of the project results in a `v1.0.0` tag on the +release commit, and a new branch `release-1.y.z` for subsequent minor and patch +level releases of that major version if necessary. However, development will continue +apace on `main` for the next major version - e.g. 2.0.0. Version branches +are only created for each major version. Minor and patch level releases +are simply tagged. \ No newline at end of file
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: