Skip to content

Commit

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

* Deployed 9d9cc90 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 10, 2024
1 parent 9b484c9 commit 2d79c58
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 78 deletions.
246 changes: 170 additions & 76 deletions versions/unreleased/api-ref/prefect/deployments/deployments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4740,6 +4740,17 @@
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#prefect.deployments.deployments.Deployment.validate_schedule" class="md-nav__link">
<span class="md-ellipsis">

validate_schedule

</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -8811,6 +8822,17 @@
</span>
</a>

</li>

<li class="md-nav__item">
<a href="#prefect.deployments.deployments.Deployment.validate_schedule" class="md-nav__link">
<span class="md-ellipsis">

validate_schedule

</span>
</a>

</li>

</ul>
Expand Down Expand Up @@ -9880,7 +9902,20 @@ <h2 id="prefect.deployments.deployments.Deployment" class="doc doc-heading">
<span class="normal">894</span>
<span class="normal">895</span>
<span class="normal">896</span>
<span class="normal">897</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@experimental_field</span><span class="p">(</span>
<span class="normal">897</span>
<span class="normal">898</span>
<span class="normal">899</span>
<span class="normal">900</span>
<span class="normal">901</span>
<span class="normal">902</span>
<span class="normal">903</span>
<span class="normal">904</span>
<span class="normal">905</span>
<span class="normal">906</span>
<span class="normal">907</span>
<span class="normal">908</span>
<span class="normal">909</span>
<span class="normal">910</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@experimental_field</span><span class="p">(</span>
<span class="s2">&quot;work_pool_name&quot;</span><span class="p">,</span>
<span class="n">group</span><span class="o">=</span><span class="s2">&quot;work_pools&quot;</span><span class="p">,</span>
<span class="n">when</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">x</span> <span class="o">!=</span> <span class="n">DEFAULT_AGENT_WORK_POOL_NAME</span><span class="p">,</span>
Expand Down Expand Up @@ -10177,6 +10212,19 @@ <h2 id="prefect.deployments.deployments.Deployment" class="doc doc-heading">

<span class="k">return</span> <span class="n">field_value</span>

<span class="nd">@validator</span><span class="p">(</span><span class="s2">&quot;schedule&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">validate_schedule</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;We do not support COUNT-based (# of occurrences) RRule schedules for deployments.&quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">value</span><span class="p">:</span>
<span class="n">rrule_value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="s2">&quot;rrule&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rrule_value</span> <span class="ow">and</span> <span class="s2">&quot;COUNT&quot;</span> <span class="ow">in</span> <span class="n">rrule_value</span><span class="o">.</span><span class="n">upper</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;RRule schedules with `COUNT` are not supported. Please use `UNTIL`&quot;</span>
<span class="s2">&quot; or the `/deployments/</span><span class="si">{id}</span><span class="s2">/schedule` endpoint to schedule a fixed&quot;</span>
<span class="s2">&quot; number of flow runs.&quot;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">value</span>

<span class="nd">@classmethod</span>
<span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">load_from_yaml</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">path</span><span class="p">:</span> <span class="nb">str</span><span class="p">):</span>
Expand Down Expand Up @@ -10602,20 +10650,7 @@ <h3 id="prefect.deployments.deployments.Deployment.apply" class="doc doc-heading

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">721</span>
<span class="normal">722</span>
<span class="normal">723</span>
<span class="normal">724</span>
<span class="normal">725</span>
<span class="normal">726</span>
<span class="normal">727</span>
<span class="normal">728</span>
<span class="normal">729</span>
<span class="normal">730</span>
<span class="normal">731</span>
<span class="normal">732</span>
<span class="normal">733</span>
<span class="normal">734</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">734</span>
<span class="normal">735</span>
<span class="normal">736</span>
<span class="normal">737</span>
Expand Down Expand Up @@ -10681,7 +10716,20 @@ <h3 id="prefect.deployments.deployments.Deployment.apply" class="doc doc-heading
<span class="normal">797</span>
<span class="normal">798</span>
<span class="normal">799</span>
<span class="normal">800</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="normal">800</span>
<span class="normal">801</span>
<span class="normal">802</span>
<span class="normal">803</span>
<span class="normal">804</span>
<span class="normal">805</span>
<span class="normal">806</span>
<span class="normal">807</span>
<span class="normal">808</span>
<span class="normal">809</span>
<span class="normal">810</span>
<span class="normal">811</span>
<span class="normal">812</span>
<span class="normal">813</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">apply</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">upload</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> <span class="n">work_queue_concurrency</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="kc">None</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">UUID</span><span class="p">:</span>
Expand Down Expand Up @@ -10923,20 +10971,7 @@ <h3 id="prefect.deployments.deployments.Deployment.build_from_flow" class="doc d

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">802</span>
<span class="normal">803</span>
<span class="normal">804</span>
<span class="normal">805</span>
<span class="normal">806</span>
<span class="normal">807</span>
<span class="normal">808</span>
<span class="normal">809</span>
<span class="normal">810</span>
<span class="normal">811</span>
<span class="normal">812</span>
<span class="normal">813</span>
<span class="normal">814</span>
<span class="normal">815</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">815</span>
<span class="normal">816</span>
<span class="normal">817</span>
<span class="normal">818</span>
Expand Down Expand Up @@ -11018,7 +11053,20 @@ <h3 id="prefect.deployments.deployments.Deployment.build_from_flow" class="doc d
<span class="normal">894</span>
<span class="normal">895</span>
<span class="normal">896</span>
<span class="normal">897</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@classmethod</span>
<span class="normal">897</span>
<span class="normal">898</span>
<span class="normal">899</span>
<span class="normal">900</span>
<span class="normal">901</span>
<span class="normal">902</span>
<span class="normal">903</span>
<span class="normal">904</span>
<span class="normal">905</span>
<span class="normal">906</span>
<span class="normal">907</span>
<span class="normal">908</span>
<span class="normal">909</span>
<span class="normal">910</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@classmethod</span>
<span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">build_from_flow</span><span class="p">(</span>
<span class="bp">cls</span><span class="p">,</span>
Expand Down Expand Up @@ -11205,20 +11253,7 @@ <h3 id="prefect.deployments.deployments.Deployment.load" class="doc doc-heading"

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">601</span>
<span class="normal">602</span>
<span class="normal">603</span>
<span class="normal">604</span>
<span class="normal">605</span>
<span class="normal">606</span>
<span class="normal">607</span>
<span class="normal">608</span>
<span class="normal">609</span>
<span class="normal">610</span>
<span class="normal">611</span>
<span class="normal">612</span>
<span class="normal">613</span>
<span class="normal">614</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">614</span>
<span class="normal">615</span>
<span class="normal">616</span>
<span class="normal">617</span>
Expand Down Expand Up @@ -11257,7 +11292,20 @@ <h3 id="prefect.deployments.deployments.Deployment.load" class="doc doc-heading"
<span class="normal">650</span>
<span class="normal">651</span>
<span class="normal">652</span>
<span class="normal">653</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="normal">653</span>
<span class="normal">654</span>
<span class="normal">655</span>
<span class="normal">656</span>
<span class="normal">657</span>
<span class="normal">658</span>
<span class="normal">659</span>
<span class="normal">660</span>
<span class="normal">661</span>
<span class="normal">662</span>
<span class="normal">663</span>
<span class="normal">664</span>
<span class="normal">665</span>
<span class="normal">666</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">load</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Queries the API for a deployment with this name for this flow, and if found,</span>
Expand Down Expand Up @@ -11368,24 +11416,24 @@ <h3 id="prefect.deployments.deployments.Deployment.update" class="doc doc-headin

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">655</span>
<span class="normal">656</span>
<span class="normal">657</span>
<span class="normal">658</span>
<span class="normal">659</span>
<span class="normal">660</span>
<span class="normal">661</span>
<span class="normal">662</span>
<span class="normal">663</span>
<span class="normal">664</span>
<span class="normal">665</span>
<span class="normal">666</span>
<span class="normal">667</span>
<span class="normal">668</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">668</span>
<span class="normal">669</span>
<span class="normal">670</span>
<span class="normal">671</span>
<span class="normal">672</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="normal">672</span>
<span class="normal">673</span>
<span class="normal">674</span>
<span class="normal">675</span>
<span class="normal">676</span>
<span class="normal">677</span>
<span class="normal">678</span>
<span class="normal">679</span>
<span class="normal">680</span>
<span class="normal">681</span>
<span class="normal">682</span>
<span class="normal">683</span>
<span class="normal">684</span>
<span class="normal">685</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">update</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">ignore_none</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Performs an in-place update with the provided settings.</span>
Expand Down Expand Up @@ -11478,20 +11526,7 @@ <h3 id="prefect.deployments.deployments.Deployment.upload_to_storage" class="doc

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">674</span>
<span class="normal">675</span>
<span class="normal">676</span>
<span class="normal">677</span>
<span class="normal">678</span>
<span class="normal">679</span>
<span class="normal">680</span>
<span class="normal">681</span>
<span class="normal">682</span>
<span class="normal">683</span>
<span class="normal">684</span>
<span class="normal">685</span>
<span class="normal">686</span>
<span class="normal">687</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">687</span>
<span class="normal">688</span>
<span class="normal">689</span>
<span class="normal">690</span>
Expand Down Expand Up @@ -11523,7 +11558,20 @@ <h3 id="prefect.deployments.deployments.Deployment.upload_to_storage" class="doc
<span class="normal">716</span>
<span class="normal">717</span>
<span class="normal">718</span>
<span class="normal">719</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="normal">719</span>
<span class="normal">720</span>
<span class="normal">721</span>
<span class="normal">722</span>
<span class="normal">723</span>
<span class="normal">724</span>
<span class="normal">725</span>
<span class="normal">726</span>
<span class="normal">727</span>
<span class="normal">728</span>
<span class="normal">729</span>
<span class="normal">730</span>
<span class="normal">731</span>
<span class="normal">732</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@sync_compatible</span>
<span class="k">async</span> <span class="k">def</span> <span class="nf">upload_to_storage</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">storage_block</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">ignore_file</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;.prefectignore&quot;</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]:</span>
Expand Down Expand Up @@ -11614,6 +11662,52 @@ <h3 id="prefect.deployments.deployments.Deployment.validate_automation_names" cl
</div>


<div class="doc doc-object doc-function">



<h3 id="prefect.deployments.deployments.Deployment.validate_schedule" class="doc doc-heading">
<code class="highlight language-python"><span class="n">validate_schedule</span></code>

<a href="#prefect.deployments.deployments.Deployment.validate_schedule" class="headerlink" title="Permanent link">&para;</a></h3>


<div class="doc doc-contents ">

<p>We do not support COUNT-based (# of occurrences) RRule schedules for deployments.</p>

<details class="quote">
<summary>Source code in <code>prefect/deployments/deployments.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">578</span>
<span class="normal">579</span>
<span class="normal">580</span>
<span class="normal">581</span>
<span class="normal">582</span>
<span class="normal">583</span>
<span class="normal">584</span>
<span class="normal">585</span>
<span class="normal">586</span>
<span class="normal">587</span>
<span class="normal">588</span>
<span class="normal">589</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@validator</span><span class="p">(</span><span class="s2">&quot;schedule&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">validate_schedule</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;We do not support COUNT-based (# of occurrences) RRule schedules for deployments.&quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">value</span><span class="p">:</span>
<span class="n">rrule_value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="s2">&quot;rrule&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rrule_value</span> <span class="ow">and</span> <span class="s2">&quot;COUNT&quot;</span> <span class="ow">in</span> <span class="n">rrule_value</span><span class="o">.</span><span class="n">upper</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="s2">&quot;RRule schedules with `COUNT` are not supported. Please use `UNTIL`&quot;</span>
<span class="s2">&quot; or the `/deployments/</span><span class="si">{id}</span><span class="s2">/schedule` endpoint to schedule a fixed&quot;</span>
<span class="s2">&quot; number of flow runs.&quot;</span>
<span class="p">)</span>
<span class="k">return</span> <span class="n">value</span>
</code></pre></div></td></tr></table></div>
</details>
</div>

</div>



</div>

Expand Down
Loading

0 comments on commit 2d79c58

Please sign in to comment.