Skip to content

Commit

Permalink
Update unreleased documentation (#559)
Browse files Browse the repository at this point in the history
* Update versions.json

* Deployed 74bd617 to unreleased in versions with MkDocs 1.5.3 and mike 2.0.0

* Sort docs versions

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
  • Loading branch information
github-actions[bot] and GitHub Actions Bot authored Jan 11, 2024
1 parent 96fbc10 commit 10dda5d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
26 changes: 21 additions & 5 deletions versions/unreleased/api-ref/prefect/cli/deploy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8733,8 +8733,7 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>prefect/cli/deploy.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 75</span>
<span class="normal"> 76</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 76</span>
<span class="normal"> 77</span>
<span class="normal"> 78</span>
<span class="normal"> 79</span>
Expand Down Expand Up @@ -8962,7 +8961,16 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">
<span class="normal">301</span>
<span class="normal">302</span>
<span class="normal">303</span>
<span class="normal">304</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@app</span><span class="o">.</span><span class="n">command</span><span class="p">()</span>
<span class="normal">304</span>
<span class="normal">305</span>
<span class="normal">306</span>
<span class="normal">307</span>
<span class="normal">308</span>
<span class="normal">309</span>
<span class="normal">310</span>
<span class="normal">311</span>
<span class="normal">312</span>
<span class="normal">313</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@app</span><span class="o">.</span><span class="n">command</span><span class="p">()</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">deploy</span><span class="p">(</span>
<span class="n">entrypoint</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="n">typer</span><span class="o">.</span><span class="n">Argument</span><span class="p">(</span>
<span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -9101,6 +9109,11 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">
<span class="s2">&quot; provided, this flag will be ignored.&quot;</span>
<span class="p">),</span>
<span class="p">),</span>
<span class="n">prefect_file</span><span class="p">:</span> <span class="n">Path</span> <span class="o">=</span> <span class="n">typer</span><span class="o">.</span><span class="n">Option</span><span class="p">(</span>
<span class="n">Path</span><span class="p">(</span><span class="s2">&quot;prefect.yaml&quot;</span><span class="p">),</span>
<span class="s2">&quot;--prefect-file&quot;</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Specify a custom path to a prefect.yaml file&quot;</span><span class="p">,</span>
<span class="p">),</span>
<span class="n">ci</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="n">typer</span><span class="o">.</span><span class="n">Option</span><span class="p">(</span>
<span class="kc">False</span><span class="p">,</span>
<span class="s2">&quot;--ci&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -9150,8 +9163,9 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">
<span class="s2">&quot;enforce_parameter_schema&quot;</span><span class="p">:</span> <span class="n">enforce_parameter_schema</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">deploy_configs</span><span class="p">,</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">_load_deploy_configs_and_actions</span><span class="p">(</span><span class="n">ci</span><span class="o">=</span><span class="n">ci</span><span class="p">)</span>

<span class="n">deploy_configs</span><span class="p">,</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">_load_deploy_configs_and_actions</span><span class="p">(</span>
<span class="n">prefect_file</span><span class="o">=</span><span class="n">prefect_file</span><span class="p">,</span> <span class="n">ci</span><span class="o">=</span><span class="n">ci</span>
<span class="p">)</span>
<span class="n">parsed_names</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">names</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;*&quot;</span> <span class="ow">in</span> <span class="n">name</span><span class="p">:</span>
Expand All @@ -9177,6 +9191,7 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">
<span class="n">actions</span><span class="o">=</span><span class="n">actions</span><span class="p">,</span>
<span class="n">deploy_all</span><span class="o">=</span><span class="n">deploy_all</span><span class="p">,</span>
<span class="n">ci</span><span class="o">=</span><span class="n">ci</span><span class="p">,</span>
<span class="n">prefect_file</span><span class="o">=</span><span class="n">prefect_file</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Accommodate passing in -n flow-name/deployment-name as well as -n deployment-name</span>
Expand All @@ -9189,6 +9204,7 @@ <h2 id="prefect.cli.deploy.deploy" class="doc doc-heading">
<span class="n">actions</span><span class="o">=</span><span class="n">actions</span><span class="p">,</span>
<span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">,</span>
<span class="n">ci</span><span class="o">=</span><span class="n">ci</span><span class="p">,</span>
<span class="n">prefect_file</span><span class="o">=</span><span class="n">prefect_file</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">ValueError</span> <span class="k">as</span> <span class="n">exc</span><span class="p">:</span>
<span class="n">exit_with_error</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">exc</span><span class="p">))</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8731,7 +8731,8 @@ <h1 id="creating-human-in-the-loop-workflows">Creating Human-in-the-Loop Workflo
<p>When a flow run is paused or suspended, you can receive input from the user. This is useful when you need to ask the user for additional information or feedback before resuming the flow run.</p>
<h2 id="waiting-for-input">Waiting for input<a class="headerlink" href="#waiting-for-input" title="Permanent link">&para;</a></h2>
<p>To receive input you must use the <code>wait_for_input</code> parameter in the <code>pause_flow_run</code> or <code>suspend_flow_run</code> functions. This parameter accepts a subclass of <code>prefect.input.RunInput</code>. <code>RunInput</code> is a subclass of <code>pydantic.BaseModel</code> and can be used to define the input that you want to receive:</p>
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">prefect.input</span> <span class="kn">import</span> <span class="n">RunInput</span>
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">flow</span><span class="p">,</span> <span class="n">pause_flow_run</span>
<span class="kn">from</span> <span class="nn">prefect.input</span> <span class="kn">import</span> <span class="n">RunInput</span>

<span class="k">class</span> <span class="nc">UserNameInput</span><span class="p">(</span><span class="n">RunInput</span><span class="p">):</span>
<span class="n">name</span><span class="p">:</span> <span class="nb">str</span>
Expand Down Expand Up @@ -8788,7 +8789,7 @@ <h2 id="handling-custom-validation">Handling custom validation<a class="headerli
</code></pre></div>
<p>In the example, we use Pydantic's <code>validator</code> decorator to define a custom validation method for the <code>color</code> field. We can use it in a flow like this:</p>
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">pydantic</span>
<span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">flow</span>
<span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">flow</span><span class="p">,</span> <span class="n">pause_flow_run</span>
<span class="kn">from</span> <span class="nn">prefect.input</span> <span class="kn">import</span> <span class="n">RunInput</span>


Expand All @@ -8813,7 +8814,7 @@ <h2 id="handling-custom-validation">Handling custom validation<a class="headerli
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Literal</span>

<span class="kn">import</span> <span class="nn">pydantic</span>
<span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">flow</span><span class="p">,</span> <span class="n">pause_flow_run</span><span class="p">,</span> <span class="n">get_run_logger</span>
<span class="kn">from</span> <span class="nn">prefect</span> <span class="kn">import</span> <span class="n">flow</span><span class="p">,</span> <span class="n">get_run_logger</span><span class="p">,</span> <span class="n">pause_flow_run</span>
<span class="kn">from</span> <span class="nn">prefect.input</span> <span class="kn">import</span> <span class="n">RunInput</span>


Expand Down
2 changes: 1 addition & 1 deletion versions/unreleased/search/search_index.json

Large diffs are not rendered by default.

Binary file modified versions/unreleased/sitemap.xml.gz
Binary file not shown.

0 comments on commit 10dda5d

Please sign in to comment.