Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 16, 2024
1 parent 3213333 commit 6e1f5ed
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 3 deletions.
12 changes: 12 additions & 0 deletions _modules/pedal/sandbox/commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,18 @@ <h1>Source code for pedal.sandbox.commands</h1><div class="highlight"><pre>



<div class="viewcode-block" id="get_function">
<a class="viewcode-back" href="../../../developers/tools/sandbox.html#pedal.sandbox.commands.get_function">[docs]</a>
<span class="k">def</span> <span class="nf">get_function</span><span class="p">(</span><span class="n">function_name</span><span class="p">,</span> <span class="n">report</span><span class="o">=</span><span class="n">MAIN_REPORT</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Creates an executable function from the given name, based on the</span>
<span class="sd"> students&#39; namespace. This will be executed using the call method.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">sandbox</span><span class="p">:</span> <span class="n">Sandbox</span> <span class="o">=</span> <span class="n">report</span><span class="p">[</span><span class="n">TOOL_NAME</span><span class="p">][</span><span class="s1">&#39;sandbox&#39;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">sandbox</span><span class="o">.</span><span class="n">get_function</span><span class="p">(</span><span class="n">function_name</span><span class="p">)</span></div>



<div class="viewcode-block" id="get_python_errors">
<a class="viewcode-back" href="../../../developers/tools/sandbox.html#pedal.sandbox.commands.get_python_errors">[docs]</a>
<span class="k">def</span> <span class="nf">get_python_errors</span><span class="p">(</span><span class="n">report</span><span class="o">=</span><span class="n">MAIN_REPORT</span><span class="p">):</span>
Expand Down
11 changes: 11 additions & 0 deletions _modules/pedal/sandbox/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,17 @@ <h1>Source code for pedal.sandbox.sandbox</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="n">SandboxVariable</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span>

<div class="viewcode-block" id="Sandbox.get_function">
<a class="viewcode-back" href="../../../developers/tools/sandbox.html#pedal.sandbox.sandbox.Sandbox.get_function">[docs]</a>
<span class="k">def</span> <span class="nf">get_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">by_name</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Creates an executable function from the given name, based</span>
<span class="sd"> on the student&#39;s namespace. This will be executed using the call</span>
<span class="sd"> method.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">by_name</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


<span class="k">def</span> <span class="fm">__getitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">item</span><span class="p">):</span>
<span class="n">value</span><span class="p">,</span> <span class="n">exception</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span>
<span class="k">try</span><span class="p">:</span>
Expand Down
1 change: 1 addition & 0 deletions developers/tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ <h1>Developer Tools Reference<a class="headerlink" href="#developer-tools-refere
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.evaluate"><code class="docutils literal notranslate"><span class="pre">evaluate()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_call_arguments"><code class="docutils literal notranslate"><span class="pre">get_call_arguments()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_exception"><code class="docutils literal notranslate"><span class="pre">get_exception()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_function"><code class="docutils literal notranslate"><span class="pre">get_function()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_input"><code class="docutils literal notranslate"><span class="pre">get_input()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_module"><code class="docutils literal notranslate"><span class="pre">get_module()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="tools/sandbox.html#pedal.sandbox.commands.get_output"><code class="docutils literal notranslate"><span class="pre">get_output()</span></code></a></li>
Expand Down
17 changes: 17 additions & 0 deletions developers/tools/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.evaluate"><code class="docutils literal notranslate"><span class="pre">Sandbox.evaluate()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.functions"><code class="docutils literal notranslate"><span class="pre">Sandbox.functions</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.get_context"><code class="docutils literal notranslate"><span class="pre">Sandbox.get_context()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.get_function"><code class="docutils literal notranslate"><span class="pre">Sandbox.get_function()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.get_names_by_type"><code class="docutils literal notranslate"><span class="pre">Sandbox.get_names_by_type()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.get_values_by_type"><code class="docutils literal notranslate"><span class="pre">Sandbox.get_values_by_type()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#pedal.sandbox.sandbox.Sandbox.get_variables_by_type"><code class="docutils literal notranslate"><span class="pre">Sandbox.get_variables_by_type()</span></code></a></li>
Expand Down Expand Up @@ -151,6 +152,7 @@
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.evaluate"><code class="docutils literal notranslate"><span class="pre">evaluate()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_call_arguments"><code class="docutils literal notranslate"><span class="pre">get_call_arguments()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_exception"><code class="docutils literal notranslate"><span class="pre">get_exception()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_function"><code class="docutils literal notranslate"><span class="pre">get_function()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_input"><code class="docutils literal notranslate"><span class="pre">get_input()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_module"><code class="docutils literal notranslate"><span class="pre">get_module()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#pedal.sandbox.commands.get_output"><code class="docutils literal notranslate"><span class="pre">get_output()</span></code></a></li>
Expand Down Expand Up @@ -622,6 +624,14 @@
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pedal.sandbox.sandbox.Sandbox.get_function">
<span class="sig-name descname"><span class="pre">get_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">by_name</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pedal/sandbox/sandbox.html#Sandbox.get_function"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pedal.sandbox.sandbox.Sandbox.get_function" title="Link to this definition"></a></dt>
<dd><p>Creates an executable function from the given name, based
on the student’s namespace. This will be executed using the call
method.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pedal.sandbox.sandbox.Sandbox.get_names_by_type">
<span class="sig-name descname"><span class="pre">get_names_by_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">exclude_builtins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pedal/sandbox/sandbox.html#Sandbox.get_names_by_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pedal.sandbox.sandbox.Sandbox.get_names_by_type" title="Link to this definition"></a></dt>
Expand Down Expand Up @@ -1206,6 +1216,13 @@
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pedal.sandbox.commands.get_function">
<span class="sig-name descname"><span class="pre">get_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">function_name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">report=&lt;pedal.core.report.Report</span> <span class="pre">object&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pedal/sandbox/commands.html#get_function"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pedal.sandbox.commands.get_function" title="Link to this definition"></a></dt>
<dd><p>Creates an executable function from the given name, based on the
students’ namespace. This will be executed using the call method.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pedal.sandbox.commands.get_input">
<span class="sig-name descname"><span class="pre">get_input</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">report=&lt;pedal.core.report.Report</span> <span class="pre">object&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/pedal/sandbox/commands.html#get_input"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pedal.sandbox.commands.get_input" title="Link to this definition"></a></dt>
Expand Down
10 changes: 8 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,12 @@ <h2 id="G">G</h2>
</li>
<li><a href="developers/api.html#pedal.core.submission.Submission.get_files_lines">get_files_lines() (Submission method)</a>
</li>
<li><a href="developers/tools/sandbox.html#pedal.sandbox.commands.get_function">get_function() (in module pedal.sandbox.commands)</a>

<ul>
<li><a href="developers/tools/sandbox.html#pedal.sandbox.sandbox.Sandbox.get_function">(Sandbox method)</a>
</li>
</ul></li>
<li>
get_input()

Expand Down Expand Up @@ -1659,15 +1665,15 @@ <h2 id="G">G</h2>
</li>
<li><a href="developers/tools/extensions.html#pedal.extensions.plotting.get_plots">get_plots() (in module pedal.extensions.plotting)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
get_program()

<ul>
<li><a href="teachers/tools/source.html#get_program">built-in function</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="developers/tools/source.html#pedal.source.source.get_program">get_program() (in module pedal.source.source)</a>
</li>
<li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 6e1f5ed

Please sign in to comment.