Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Sep 6, 2024
1 parent d7dd692 commit 1b8a3a6
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bio_compose/_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.5.1
Binary file modified documentation/build/doctrees/bio_compose.doctree
Binary file not shown.
Binary file modified documentation/build/doctrees/environment.pickle
Binary file not shown.
8 changes: 5 additions & 3 deletions documentation/build/html/_modules/bio_compose.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h1>Source code for bio_compose</h1><div class="highlight"><pre>

<div class="viewcode-block" id="verify">
<a class="viewcode-back" href="../bio_compose.html#bio_compose.verify">[docs]</a>
<span class="k">def</span> <span class="nf">verify</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> <span class="o">-&gt;</span> <span class="nb">dict</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">verify</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>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Verify and compare the outputs of simulators for a given entrypoint file of either sbml or omex.</span>

Expand All @@ -105,10 +105,11 @@ <h1>Source code for bio_compose</h1><div class="highlight"><pre>
<span class="sd"> - **kwargs**: keyword arguments passed to the verification.</span>

<span class="sd"> Returns:</span>
<span class="sd"> Verification result in the form of a dictionary.</span>
<span class="sd"> Verification result instance. See documentation for more details.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">bio_compose.verifier</span> <span class="kn">import</span> <span class="n">Verifier</span>
<span class="kn">from</span> <span class="nn">bio_compose.verifier</span> <span class="kn">import</span> <span class="n">VerificationResult</span>

<span class="n">verifier</span> <span class="o">=</span> <span class="n">Verifier</span><span class="p">()</span>
<span class="n">simulators</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;simulators&#39;</span><span class="p">)</span>
Expand All @@ -132,7 +133,8 @@ <h1>Source code for bio_compose</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="n">output</span> <span class="o">=</span> <span class="n">verification_result</span>
<span class="k">break</span>
<span class="k">return</span> <span class="n">output</span></div>

<span class="k">return</span> <span class="n">VerificationResult</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">output</span><span class="p">)</span></div>

</pre></div>

Expand Down
35 changes: 35 additions & 0 deletions documentation/build/html/_modules/bio_compose/verifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,41 @@ <h1>Source code for bio_compose.verifier</h1><div class="highlight"><pre>



<div class="viewcode-block" id="VerificationResult">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.verifier.VerificationResult">[docs]</a>
<span class="k">class</span> <span class="nc">VerificationResult</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">data</span> <span class="o">=</span> <span class="n">data</span>
<span class="bp">self</span><span class="o">.</span><span class="n">update</span><span class="p">({</span><span class="s1">&#39;content&#39;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;content&#39;</span><span class="p">)})</span>
<span class="bp">self</span><span class="o">.</span><span class="n">job_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;content&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;job_id&#39;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">verifier</span> <span class="o">=</span> <span class="n">Verifier</span><span class="p">()</span>

<div class="viewcode-block" id="VerificationResult.rmse">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.verifier.VerificationResult.rmse">[docs]</a>
<span class="k">def</span> <span class="nf">rmse</span><span class="p">(</span><span class="bp">self</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>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">partial</span>

<span class="n">rmse</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">verifier</span><span class="o">.</span><span class="n">get_rmse</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">job_id</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">verifier</span><span class="o">.</span><span class="n">visualize_rmse</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">job_id</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="k">return</span> <span class="n">rmse</span></div>


<div class="viewcode-block" id="VerificationResult.observables">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.verifier.VerificationResult.observables">[docs]</a>
<span class="k">def</span> <span class="nf">observables</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">observables</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">results</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;content&#39;</span><span class="p">][</span><span class="s1">&#39;results&#39;</span><span class="p">]</span>
<span class="k">for</span> <span class="n">obs</span> <span class="ow">in</span> <span class="n">results</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">obs_data</span> <span class="o">=</span> <span class="n">results</span><span class="p">[</span><span class="n">obs</span><span class="p">]</span>
<span class="k">if</span> <span class="s1">&#39;output_data&#39;</span> <span class="o">==</span> <span class="n">obs_data</span><span class="o">.</span><span class="n">keys</span><span class="p">():</span>
<span class="n">observables</span><span class="p">[</span><span class="n">obs</span><span class="p">]</span> <span class="o">=</span> <span class="n">obs_data</span><span class="p">[</span><span class="s1">&#39;output_data&#39;</span><span class="p">]</span>

<span class="bp">self</span><span class="o">.</span><span class="n">verifier</span><span class="o">.</span><span class="n">visualize_observables</span><span class="p">(</span><span class="n">job_id</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">job_id</span><span class="p">)</span>
<span class="k">return</span> <span class="n">observables</span></div>
</div>



<span class="c1"># tests</span>

<div class="viewcode-block" id="test_verifier">
Expand Down
21 changes: 19 additions & 2 deletions documentation/build/html/bio_compose.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#module-bio_compose.verifier">bio_compose.verifier module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#bio_compose.verifier.VerificationResult"><code class="docutils literal notranslate"><span class="pre">VerificationResult</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#bio_compose.verifier.Verifier"><code class="docutils literal notranslate"><span class="pre">Verifier</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#bio_compose.verifier.test_verifier"><code class="docutils literal notranslate"><span class="pre">test_verifier()</span></code></a></li>
</ul>
Expand Down Expand Up @@ -392,6 +393,22 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
</section>
<section id="module-bio_compose.verifier">
<span id="bio-compose-verifier-module"></span><h2>bio_compose.verifier module<a class="headerlink" href="#module-bio_compose.verifier" title="Link to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="bio_compose.verifier.VerificationResult">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">bio_compose.verifier.</span></span><span class="sig-name descname"><span class="pre">VerificationResult</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/bio_compose/verifier.html#VerificationResult"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verifier.VerificationResult" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
<dl class="py method">
<dt class="sig sig-object py" id="bio_compose.verifier.VerificationResult.observables">
<span class="sig-name descname"><span class="pre">observables</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/bio_compose/verifier.html#VerificationResult.observables"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verifier.VerificationResult.observables" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="bio_compose.verifier.VerificationResult.rmse">
<span class="sig-name descname"><span class="pre">rmse</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/bio_compose/verifier.html#VerificationResult.rmse"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verifier.VerificationResult.rmse" title="Link to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="bio_compose.verifier.Verifier">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">bio_compose.verifier.</span></span><span class="sig-name descname"><span class="pre">Verifier</span></span><a class="reference internal" href="_modules/bio_compose/verifier.html#Verifier"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verifier.Verifier" title="Link to this definition"></a></dt>
Expand Down Expand Up @@ -589,7 +606,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi

<dl class="py function">
<dt class="sig sig-object py" id="bio_compose.verify">
<span class="sig-prename descclassname"><span class="pre">bio_compose.</span></span><span class="sig-name descname"><span class="pre">verify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">dict</span></span></span><a class="reference internal" href="_modules/bio_compose.html#verify"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verify" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">bio_compose.</span></span><span class="sig-name descname"><span class="pre">verify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/bio_compose.html#verify"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#bio_compose.verify" title="Link to this definition"></a></dt>
<dd><p>Verify and compare the outputs of simulators for a given entrypoint file of either sbml or omex.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
Expand All @@ -603,7 +620,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Verification result in the form of a dictionary.</p>
<dd class="field-even"><p>Verification result instance. See documentation for more details.</p>
</dd>
</dl>
</dd></dl>
Expand Down
19 changes: 16 additions & 3 deletions documentation/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ <h1 id="index">Index</h1>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#O"><strong>O</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
Expand Down Expand Up @@ -250,17 +251,27 @@ <h2 id="M">M</h2>
</ul></td>
</tr></table>

<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bio_compose.html#bio_compose.verifier.VerificationResult.observables">observables() (bio_compose.verifier.VerificationResult method)</a>
</li>
</ul></td>
</tr></table>

<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bio_compose.html#bio_compose.data_model.Api.read_observables">read_observables() (bio_compose.data_model.Api method)</a>
</li>
<li><a href="bio_compose.html#bio_compose.data_model.RequestError">RequestError (class in bio_compose.data_model)</a>
</li>
<li><a href="bio_compose.html#bio_compose.composer.Composer.run_composition">run_composition() (bio_compose.composer.Composer method)</a>
<li><a href="bio_compose.html#bio_compose.verifier.VerificationResult.rmse">rmse() (bio_compose.verifier.VerificationResult method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bio_compose.html#bio_compose.composer.Composer.run_composition">run_composition() (bio_compose.composer.Composer method)</a>
</li>
<li><a href="bio_compose.html#bio_compose.run_simulation">run_simulation() (in module bio_compose)</a>
</li>
<li><a href="bio_compose.html#bio_compose.runner.SimulationRunner.run_smoldyn_simulation">run_smoldyn_simulation() (bio_compose.runner.SimulationRunner method)</a>
Expand Down Expand Up @@ -301,16 +312,18 @@ <h2 id="T">T</h2>
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bio_compose.html#bio_compose.verifier.VerificationResult">VerificationResult (class in bio_compose.verifier)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier">Verifier (class in bio_compose.verifier)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verify">verify() (in module bio_compose)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier.verify_omex">verify_omex() (bio_compose.verifier.Verifier method)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier.verify_sbml">verify_sbml() (bio_compose.verifier.Verifier method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier.verify_sbml">verify_sbml() (bio_compose.verifier.Verifier method)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier.visualize_comparison">visualize_comparison() (bio_compose.verifier.Verifier method)</a>
</li>
<li><a href="bio_compose.html#bio_compose.verifier.Verifier.visualize_observables">visualize_observables() (bio_compose.verifier.Verifier method)</a>
Expand Down
5 changes: 5 additions & 0 deletions documentation/build/html/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ <h1>bio_compose<a class="headerlink" href="#bio-compose" title="Link to this hea
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bio_compose.html#module-bio_compose.verifier">bio_compose.verifier module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.VerificationResult"><code class="docutils literal notranslate"><span class="pre">VerificationResult</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.VerificationResult.observables"><code class="docutils literal notranslate"><span class="pre">VerificationResult.observables()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.VerificationResult.rmse"><code class="docutils literal notranslate"><span class="pre">VerificationResult.rmse()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.Verifier"><code class="docutils literal notranslate"><span class="pre">Verifier</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.Verifier.get_compatible"><code class="docutils literal notranslate"><span class="pre">Verifier.get_compatible()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="bio_compose.html#bio_compose.verifier.Verifier.get_rmse"><code class="docutils literal notranslate"><span class="pre">Verifier.get_rmse()</span></code></a></li>
Expand Down
Binary file modified documentation/build/html/objects.inv
Binary file not shown.
Loading

0 comments on commit 1b8a3a6

Please sign in to comment.