-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
New author tutorials #15990
base: main
Are you sure you want to change the base?
New author tutorials #15990
Conversation
…nly to subsequent runs
…ems to be solved with Prefect
…ized in favor of Prefect-specific problems
… that let you ingest indeterminate amounts of data and analyze the results
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.
Good stuff! Thank you! Left a few suggestions.
1. Open the Prefect dashboard in your browser at [http://localhost:4200](http://localhost:4200). | ||
</Tab> | ||
<Tab title="Prefect Cloud"> | ||
1. Head to [https://app.prefect.cloud/](https://app.prefect.cloud/) and sign in or create a forever-free Prefect Cloud account. |
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.
1. Head to [https://app.prefect.cloud/](https://app.prefect.cloud/) and sign in or create a forever-free Prefect Cloud account. | |
1. Head to [https://app.prefect.cloud/](https://app.prefect.cloud/) and sign in or create a free Prefect Cloud account. |
## Publish your code to a remote repository | ||
|
||
First, you need to take the code from your local machine and publish it to a remote repository. | ||
We've already published the code you need for this tutorial: |
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.
We've already published the code you need for this tutorial: | |
We've already published the code to GitHub that you need for this tutorial: |
<Tab title="Self-hosted"> | ||
|
||
Deploy your flow to a self-hosted Prefect server instance using a `Process` work pool. | ||
All flow runs submitted to this work pool will run in a local subprocess (the mechanics are similar for other work pool types that run on remote infrastructure). |
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.
All flow runs submitted to this work pool will run in a local subprocess (the mechanics are similar for other work pool types that run on remote infrastructure). | |
All flow runs submitted to this work pool will run in a local subprocess (the creation mechanics are similar for other work pool types that run on remote infrastructure). |
## Deploy and schedule your flow | ||
|
||
A [deployment](/3.0/deploy/infrastructure-examples/docker/) is used to determine when, where, and how a flow should run. | ||
Deployments elevate flows to remotely configurable entities that have their own API. |
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.
Deployments elevate flows to remotely configurable entities that have their own API. | |
Deployments elevate flows to remotely configurable entities that have their own API. | |
To set a flow to run on a schedule, you need to create a deployment. |
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.
Please add a redirect for deleted files in mint.json.
return None | ||
``` | ||
|
||
<Expandable title="full example"> |
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.
The expandables are 🔥
issue_details = [] | ||
for issue in all_issues[:5]: # Limit to 5 issues to avoid hitting rate limits | ||
issue_details.append( | ||
fetch_issue_details.submit(repo, issue['number']) # Make requests in parallel |
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.
Either inline, or probably below, maybe call out what .submit
is doing briefly and send folks to another docs page to learn more. It's kind of subtle as is.
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 note where use ".submit" above in short code example.
|
||
## Ingest large amounts of data | ||
|
||
Use pagination to fetch large amounts of data and run tasks in parallel to analyze the data efficiently: |
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.
Use pagination to fetch large amounts of data and run tasks in parallel to analyze the data efficiently: | |
Use pagination to fetch large amounts of data and run tasks concurrently to analyze the data efficiently: |
``` | ||
</Expandable> | ||
|
||
## Structure your code with dependent subflows and tasks |
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.
## Structure your code with dependent subflows and tasks | |
## Structure your code with dependent nested flows and tasks |
Esewhere in the docs we refer to them as nested flows, good to keep the consistency.
## Put it all together | ||
|
||
Here's the complete flow that combines all of these components. | ||
We'll also add retries, caching, and rate limiting to make the workflow more robust. |
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.
Lots of goodies! I suggest linking each of the words to where the reader can learn more about these ideas, and adding a line about the benefit of each one might not be bad.
This PR updates the quickstart and adds three new tutorials. These four tutorials collectively serve as a tutorial series to get developers up to speed on Prefect, though they're written in such a way that a developer can start with any of them.
Checklist
<link to issue>
"If this pull request adds new functionality, it includes unit tests that cover the changesmint.json
.If this pull request adds functions or classes, it includes helpful docstrings.