Skip to content

Commit

Permalink
updated package version and new documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Oct 22, 2024
1 parent 9c0ec0e commit e8bce3a
Show file tree
Hide file tree
Showing 11 changed files with 559 additions and 520 deletions.
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.
17 changes: 17 additions & 0 deletions documentation/build/html/_modules/bio_compose/data_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ <h1>Source code for bio_compose.data_model</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">asdict</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div>
</div>



<div class="viewcode-block" id="DynamicJson">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.data_model.DynamicJson">[docs]</a>
<span class="k">class</span> <span class="nc">DynamicJson</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="n">Dict</span><span class="p">[</span><span class="n">Any</span><span class="p">,</span> <span class="n">Any</span><span class="p">]):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Dynamically create a JSON-like object from a dictionary/mapping of any shape.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">data</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">DynamicData</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
<span class="nb">setattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>

<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="si">}</span><span class="s2">&quot;</span></div>



<div class="viewcode-block" id="Api">
Expand Down
8 changes: 4 additions & 4 deletions documentation/build/html/_modules/bio_compose/verifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h1>Source code for bio_compose.verifier</h1><div class="highlight"><pre>
<span class="n">n_simulators</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">simulators</span><span class="p">)</span>

<span class="c1"># create subplots</span>
<span class="n">fig</span><span class="p">,</span> <span class="n">axes</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">nrows</span><span class="o">=</span><span class="n">n_simulators</span><span class="p">,</span> <span class="n">ncols</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">5</span> <span class="o">*</span> <span class="n">n_simulators</span><span class="p">))</span>
<span class="n">fig</span><span class="p">,</span> <span class="n">axes</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">nrows</span><span class="o">=</span><span class="n">n_simulators</span><span class="p">,</span> <span class="n">ncols</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">n_simulators</span><span class="p">))</span>

<span class="c1"># if only one simulator, `axes` won&#39;t be an array, so make it an array</span>
<span class="k">if</span> <span class="n">n_simulators</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
Expand Down Expand Up @@ -569,9 +569,9 @@ <h1>Source code for bio_compose.verifier</h1><div class="highlight"><pre>
<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.get_rmse">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.verifier.VerificationResult.get_rmse">[docs]</a>
<span class="k">def</span> <span class="nf">get_rmse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">save_dest</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">fig_dimensions</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">color_mapping</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="VerificationResult.get_comparison">
<a class="viewcode-back" href="../../bio_compose.html#bio_compose.verifier.VerificationResult.get_comparison">[docs]</a>
<span class="k">def</span> <span class="nf">get_comparison</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">save_dest</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">fig_dimensions</span><span class="p">:</span> <span class="nb">tuple</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">color_mapping</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Visualize the root-mean-squared error between simulator verification outputs as a heatmap.</span>

Expand Down
Loading

0 comments on commit e8bce3a

Please sign in to comment.