Skip to content

Commit

Permalink
Deployed 9bf4236 to latest with MkDocs 1.6.1 and mike 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele-Alberti committed Dec 31, 2024
1 parent 9c5a73f commit e542176
Show file tree
Hide file tree
Showing 11 changed files with 5,321 additions and 2,543 deletions.
Binary file modified latest/objects.inv
Binary file not shown.
56 changes: 34 additions & 22 deletions latest/reference/dlunch/__main__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,7 @@ <h3 id="dlunch.__main__.run_app" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>dlunch/__main__.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 28</span>
<span class="normal"> 29</span>
<span class="normal"> 30</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 30</span>
<span class="normal"> 31</span>
<span class="normal"> 32</span>
<span class="normal"> 33</span>
Expand Down Expand Up @@ -1126,7 +1124,15 @@ <h3 id="dlunch.__main__.run_app" class="doc doc-heading">
<span class="normal">114</span>
<span class="normal">115</span>
<span class="normal">116</span>
<span class="normal">117</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@hydra</span><span class="o">.</span><span class="n">main</span><span class="p">(</span><span class="n">config_path</span><span class="o">=</span><span class="s2">&quot;conf&quot;</span><span class="p">,</span> <span class="n">config_name</span><span class="o">=</span><span class="s2">&quot;config&quot;</span><span class="p">,</span> <span class="n">version_base</span><span class="o">=</span><span class="s2">&quot;1.3&quot;</span><span class="p">)</span>
<span class="normal">117</span>
<span class="normal">118</span>
<span class="normal">119</span>
<span class="normal">120</span>
<span class="normal">121</span>
<span class="normal">122</span>
<span class="normal">123</span>
<span class="normal">124</span>
<span class="normal">125</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="nd">@hydra</span><span class="o">.</span><span class="n">main</span><span class="p">(</span><span class="n">config_path</span><span class="o">=</span><span class="s2">&quot;conf&quot;</span><span class="p">,</span> <span class="n">config_name</span><span class="o">=</span><span class="s2">&quot;config&quot;</span><span class="p">,</span> <span class="n">version_base</span><span class="o">=</span><span class="s2">&quot;1.3&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">run_app</span><span class="p">(</span><span class="n">config</span><span class="p">:</span> <span class="n">DictConfig</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Main entrypoint, start the app loop.</span>

Expand All @@ -1136,13 +1142,10 @@ <h3 id="dlunch.__main__.run_app" class="doc doc-heading">
<span class="sd"> Args:</span>
<span class="sd"> config (DictConfig): hydra configuration object.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Starting scheduled cleaning</span>
<span class="k">if</span> <span class="n">config</span><span class="o">.</span><span class="n">panel</span><span class="o">.</span><span class="n">scheduled_tasks</span><span class="p">:</span>
<span class="k">for</span> <span class="n">task</span> <span class="ow">in</span> <span class="n">config</span><span class="o">.</span><span class="n">panel</span><span class="o">.</span><span class="n">scheduled_tasks</span><span class="p">:</span>
<span class="n">schedule_task</span><span class="p">(</span>
<span class="o">**</span><span class="n">task</span><span class="o">.</span><span class="n">kwargs</span><span class="p">,</span>
<span class="nb">callable</span><span class="o">=</span><span class="n">hydra</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">instantiate</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">callable</span><span class="p">,</span> <span class="n">config</span><span class="p">),</span>
<span class="p">)</span>

<span class="c1"># Configure waiter</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;set waiter config&quot;</span><span class="p">)</span>
<span class="n">waiter</span><span class="o">.</span><span class="n">set_config</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>

<span class="c1"># Set auth configurations</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;set auth config and encryption&quot;</span><span class="p">)</span>
Expand Down Expand Up @@ -1178,8 +1181,17 @@ <h3 id="dlunch.__main__.run_app" class="doc doc-heading">
<span class="n">add_basic_auth_users</span><span class="o">=</span><span class="n">auth</span><span class="o">.</span><span class="n">is_basic_auth_active</span><span class="p">(</span><span class="n">config</span><span class="o">=</span><span class="n">config</span><span class="p">),</span>
<span class="p">)</span>

<span class="c1"># Starting scheduled tasks</span>
<span class="k">if</span> <span class="n">config</span><span class="o">.</span><span class="n">panel</span><span class="o">.</span><span class="n">scheduled_tasks</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;starting scheduled tasks&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">task</span> <span class="ow">in</span> <span class="n">config</span><span class="o">.</span><span class="n">panel</span><span class="o">.</span><span class="n">scheduled_tasks</span><span class="p">:</span>
<span class="n">schedule_task</span><span class="p">(</span>
<span class="o">**</span><span class="n">task</span><span class="o">.</span><span class="n">kwargs</span><span class="p">,</span>
<span class="nb">callable</span><span class="o">=</span><span class="n">hydra</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">instantiate</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">callable</span><span class="p">,</span> <span class="n">config</span><span class="p">),</span>
<span class="p">)</span>

<span class="c1"># Call the app factory function</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;calling app factory function&quot;</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;set config for app factory function&quot;</span><span class="p">)</span>
<span class="c1"># Pass the create_app and create_backend function as a lambda function to</span>
<span class="c1"># ensure that each invocation has a dedicated state variable (users&#39;</span>
<span class="c1"># selections are not shared between instances)</span>
Expand Down Expand Up @@ -1366,15 +1378,7 @@ <h3 id="dlunch.__main__.schedule_task" class="doc doc-heading">

<details class="quote">
<summary>Source code in <code>dlunch/__main__.py</code></summary>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">120</span>
<span class="normal">121</span>
<span class="normal">122</span>
<span class="normal">123</span>
<span class="normal">124</span>
<span class="normal">125</span>
<span class="normal">126</span>
<span class="normal">127</span>
<span class="normal">128</span>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">128</span>
<span class="normal">129</span>
<span class="normal">130</span>
<span class="normal">131</span>
Expand Down Expand Up @@ -1415,7 +1419,15 @@ <h3 id="dlunch.__main__.schedule_task" class="doc doc-heading">
<span class="normal">166</span>
<span class="normal">167</span>
<span class="normal">168</span>
<span class="normal">169</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">schedule_task</span><span class="p">(</span>
<span class="normal">169</span>
<span class="normal">170</span>
<span class="normal">171</span>
<span class="normal">172</span>
<span class="normal">173</span>
<span class="normal">174</span>
<span class="normal">175</span>
<span class="normal">176</span>
<span class="normal">177</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="k">def</span> <span class="nf">schedule_task</span><span class="p">(</span>
<span class="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">enabled</span><span class="p">:</span> <span class="nb">bool</span><span class="p">,</span>
<span class="n">hour</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span>
Expand Down
Loading

0 comments on commit e542176

Please sign in to comment.