-
Notifications
You must be signed in to change notification settings - Fork 20
Improve documentation of workflows and its steps #1020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
781b224
to
f229204
Compare
CodSpeed Performance ReportMerging #1020 will not alter performanceComparing Summary
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1020 +/- ##
=======================================
Coverage 84.93% 84.93%
=======================================
Files 214 214
Lines 10408 10408
Branches 1020 1020
=======================================
Hits 8840 8840
Misses 1295 1295
Partials 273 273 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Read most of it and have left a bunch of suggestions you can apply (or not) and a few questions
1ef1a60
to
afbd2e4
Compare
Co-authored-by: Mark Moes <[email protected]>
afbd2e4
to
436ef48
Compare
- add workflow decorator to the workflow page in reference docs. - update workflow-introduction to reference the workflow architecture instead of having copy pasted text. - add empty line between headers and text. - use link definitions for long urls.
436ef48
to
3e983fc
Compare
- [terminate_workflow] | ||
- [validate_workflow] | ||
|
||
under the hood they all use a [workflow] decorator which can be used for tasks that don't fit any of the types above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
under the hood they all use a [workflow] decorator which can be used for tasks that don't fit any of the types above. | |
Under the hood they all use a [workflow] decorator which can be used for tasks that don't fit any of the types above. |
|
||
!!! example | ||
|
||
for inspiration look at an example implementation of the [lazy workflow instances] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for inspiration look at an example implementation of the [lazy workflow instances] | |
For inspiration look at an example implementation of the [lazy workflow instances]. |
|
||
For `@modify_workflow`, `@validate_workflow` and `@terminate_workflow` the `subscription` is directly usable from the first step. | ||
|
||
[Information about all usable step decorators can be found here](../architecture/application/workflow#workflow-steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opinionized nit :) When the entire sentence is a link it becomes more difficult to spot - at least when using a light theme. The contrast between normal and clickable text helps it stand out for me.
[Information about all usable step decorators can be found here](../architecture/application/workflow#workflow-steps) | |
Information about all usable step decorators can be found on [the architecture page on workflows](../architecture/application/workflow#workflow-steps). |
Create a new empty database migration with the following command: | ||
|
||
```shell | ||
PYTHONPATH=. python main.py db revision --head data --message "add User and UserGroup workflows" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think PYTHONPATH=.
is a remnant from the past? I haven't had to use this in our own nor the example orchestrator. Imo it'd be better to have this in a troubleshooting section (if people indeed run into it) rather than prefixing it everywhere
PYTHONPATH=. python main.py db revision --head data --message "add User and UserGroup workflows" | |
python main.py db revision --head data --message "add User and UserGroup workflows" |
Run the migration with the following command: | ||
|
||
```shell | ||
PYTHONPATH=. python main.py db upgrade heads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same suggestion as above
PYTHONPATH=. python main.py db upgrade heads | |
python main.py db upgrade heads |
return {"response": response} | ||
``` | ||
|
||
While this approach works, the switch logic (via match or if isinstance) can become unwieldy as more product types are introduced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this approach works, the switch logic (via match or if isinstance) can become unwieldy as more product types are introduced. | |
While this approach works, the switch logic (via `match` or `if isinstance()`) can become unwieldy as more product types are introduced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few small remaining comments.
Amazing work! 🚀
workflows
to explain everything without code, only referencing with links to docs with code.workflows
to explain how to create workflows, moving old docs from the architecture and beginner workshop.workflows
page with the different types of workflow util functions inrefence-docs/workflows
folder.re-usable step
andsingledispatch
code examples inrefence-docs/workflows/workflow-steps
Todo's:
Related: #533