Skip to content

Commit

Permalink
Sphinx build from commit 42bd0f2 by GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
CovertLab [bot] authored and CovertLab [bot] committed May 22, 2024
0 parents commit 60a9cf7
Show file tree
Hide file tree
Showing 925 changed files with 441,322 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c975a277d6aad979ed454b29873cdf4c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
Binary file added _images/ecoli_master_topology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/notebooks_allocation_processes_15_0.png
Binary file added _images/notebooks_allocation_processes_5_0.png
Binary file added _images/notebooks_allocation_processes_7_0.png
Binary file added _images/notebooks_allocation_processes_9_0.png
Binary file added _images/notebooks_cofactors_growth_rates_15_0.png
Binary file added _images/notebooks_cofactors_growth_rates_5_1.png
Binary file added _images/notebooks_cofactors_growth_rates_7_0.png
Binary file added _images/notebooks_cofactors_growth_rates_9_0.png
Binary file added _images/notebooks_cofactors_precise_13_2.png
Binary file added _images/notebooks_cofactors_precise_15_2.png
Binary file added _images/notebooks_colony_simulations_12_0.png
Binary file added _images/notebooks_colony_simulations_8_0.png
Binary file added _images/notebooks_ecoli_simulations_11_0.png
Binary file added _images/notebooks_ecoli_simulations_15_0.png
Binary file added _images/notebooks_ecoli_simulations_24_0.png
Binary file added _images/notebooks_ecoli_simulations_28_0.png
Binary file added _images/notebooks_fbagd_balance_35_0.png
Binary file added _images/notebooks_fbagd_old_balance_old_123_0.png
Binary file added _images/notebooks_fbagd_old_balance_old_141_0.png
Binary file added _images/notebooks_fbagd_old_balance_old_53_0.png
Binary file added _images/notebooks_fbagd_old_comparison_24_0.png
Binary file added _images/notebooks_fbagd_old_comparison_25_0.png
Binary file added _images/notebooks_fbagd_old_comparison_27_0.png
Binary file added _images/notebooks_fbagd_old_comparison_31_0.png
Binary file added _images/notebooks_fbagd_old_comparison_33_1.png
Binary file added _images/notebooks_fbagd_old_comparison_39_0.png
Binary file added _images/notebooks_fbagd_old_comparison_40_1.png
Binary file added _images/notebooks_fbagd_old_comparison_43_0.png
Binary file added _images/notebooks_fbagd_old_comparison_44_0.png
Binary file added _images/notebooks_fbagd_old_comparison_45_0.png
Binary file added _images/notebooks_fbagd_old_comparison_51_0.png
Binary file added _images/notebooks_fbagd_old_graph_work_12_1.png
Binary file added _images/notebooks_fbagd_old_graph_work_23_0.png
Binary file added _images/notebooks_fbagd_old_graph_work_30_0.png
Binary file added _images/notebooks_fbagd_old_graph_work_31_0.png
Binary file added _images/notebooks_fbagd_old_graph_work_36_0.png
Binary file added _images/notebooks_fbagd_old_graph_work_38_0.png
Binary file added _images/notebooks_logger_processes_8_0.png
Binary file added _images/notebooks_logger_processes_9_0.png
246 changes: 246 additions & 0 deletions _modules/ecoli/composites/chemotaxis_minimal.html

Large diffs are not rendered by default.

616 changes: 616 additions & 0 deletions _modules/ecoli/composites/ecoli_engine_process.html

Large diffs are not rendered by default.

840 changes: 840 additions & 0 deletions _modules/ecoli/composites/ecoli_master.html

Large diffs are not rendered by default.

374 changes: 374 additions & 0 deletions _modules/ecoli/composites/ecoli_master_tests.html

Large diffs are not rendered by default.

535 changes: 535 additions & 0 deletions _modules/ecoli/composites/ecoli_spatial.html

Large diffs are not rendered by default.

356 changes: 356 additions & 0 deletions _modules/ecoli/composites/environment/grow_divide.html

Large diffs are not rendered by default.

408 changes: 408 additions & 0 deletions _modules/ecoli/composites/environment/lattice.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions _modules/ecoli/experiments/antibiotics_tests.html

Large diffs are not rendered by default.

1,083 changes: 1,083 additions & 0 deletions _modules/ecoli/experiments/ecoli_master_sim.html

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions _modules/ecoli/experiments/glt_division.html

Large diffs are not rendered by default.

304 changes: 304 additions & 0 deletions _modules/ecoli/experiments/metabolism_exchanger.html

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions _modules/ecoli/experiments/metabolism_redux_sim.html

Large diffs are not rendered by default.

415 changes: 415 additions & 0 deletions _modules/ecoli/experiments/tet_amp_sim.html

Large diffs are not rendered by default.

271 changes: 271 additions & 0 deletions _modules/ecoli/library/cell_wall/column_sampler.html

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions _modules/ecoli/library/cell_wall/fit_lysis_time.html

Large diffs are not rendered by default.

685 changes: 685 additions & 0 deletions _modules/ecoli/library/cell_wall/hole_detection.html

Large diffs are not rendered by default.

346 changes: 346 additions & 0 deletions _modules/ecoli/library/cell_wall/lattice.html

Large diffs are not rendered by default.

189 changes: 189 additions & 0 deletions _modules/ecoli/library/convert_update.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ecoli.library.convert_update &mdash; Vivarium E. coli 1.0.0 documentation</title>
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../../_static/documentation_options.js?v=8d563738"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../../../index.html" class="icon icon-home">
Vivarium E. coli
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/processes.html">Processes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/composites.html">Composites</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/experiments.html">Experiments</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../docs.html">Working with Documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/stores.html">Stores</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/api_ref.html">API Reference</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">Vivarium E. coli</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Module code</a></li>
<li class="breadcrumb-item active">ecoli.library.convert_update</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for ecoli.library.convert_update</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">================================</span>
<span class="sd">Utilities for Converting Updates</span>
<span class="sd">================================</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>


<div class="viewcode-block" id="convert_numpy_to_builtins">
<a class="viewcode-back" href="../../../reference/api/ecoli/ecoli.library.convert_update.html#ecoli.library.convert_update.convert_numpy_to_builtins">[docs]</a>
<span class="k">def</span> <span class="nf">convert_numpy_to_builtins</span><span class="p">(</span><span class="n">update</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Convert an update to use Python builtins instead of Numpy types</span>

<span class="sd"> Convert the following:</span>

<span class="sd"> - :py:attr:`numpy.int64` to :py:class:`int`</span>
<span class="sd"> - :py:class:`numpy.str_` to :py:class:`str`</span>
<span class="sd"> - :py:attr:`numpy.float64` to :py:class:`float`</span>

<span class="sd"> Args:</span>
<span class="sd"> update: The update to convert. Will not be modified.</span>

<span class="sd"> Returns:</span>
<span class="sd"> The converted update.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">update</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">int</span><span class="p">(</span><span class="n">update</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">update</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">str_</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">update</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">update</span><span class="p">,</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">float</span><span class="p">(</span><span class="n">update</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">update</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
<span class="k">return</span> <span class="p">{</span>
<span class="n">convert_numpy_to_builtins</span><span class="p">(</span><span class="n">key</span><span class="p">):</span> <span class="n">convert_numpy_to_builtins</span><span class="p">(</span><span class="n">val</span><span class="p">)</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">val</span> <span class="ow">in</span> <span class="n">update</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
<span class="p">}</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">update</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<span class="k">return</span> <span class="p">[</span><span class="n">convert_numpy_to_builtins</span><span class="p">(</span><span class="n">elem</span><span class="p">)</span> <span class="k">for</span> <span class="n">elem</span> <span class="ow">in</span> <span class="n">update</span><span class="p">]</span>
<span class="k">return</span> <span class="n">update</span></div>



<div class="viewcode-block" id="assert_types_equal">
<a class="viewcode-back" href="../../../reference/api/ecoli/ecoli.library.convert_update.html#ecoli.library.convert_update.assert_types_equal">[docs]</a>
<span class="k">def</span> <span class="nf">assert_types_equal</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="n">d2</span><span class="p">):</span>
<span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">d1</span><span class="p">)</span> <span class="o">==</span> <span class="nb">type</span><span class="p">(</span><span class="n">d2</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
<span class="k">for</span> <span class="n">key1</span><span class="p">,</span> <span class="n">key2</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">d1</span><span class="p">),</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">d2</span><span class="p">)):</span>
<span class="k">assert</span> <span class="nb">type</span><span class="p">(</span><span class="n">key1</span><span class="p">)</span> <span class="o">==</span> <span class="nb">type</span><span class="p">(</span><span class="n">key2</span><span class="p">)</span>
<span class="n">assert_types_equal</span><span class="p">(</span><span class="n">d1</span><span class="p">[</span><span class="n">key1</span><span class="p">],</span> <span class="n">d2</span><span class="p">[</span><span class="n">key2</span><span class="p">])</span></div>



<span class="k">def</span> <span class="nf">test_convert_numpy_to_builtins</span><span class="p">():</span>
<span class="n">update</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;a&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;b&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
<span class="s2">&quot;c&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">float64</span><span class="p">(</span><span class="mf">3.14</span><span class="p">),</span>
<span class="s2">&quot;d&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">int64</span><span class="p">(</span><span class="mi">5</span><span class="p">),</span>
<span class="p">},</span>
<span class="n">np</span><span class="o">.</span><span class="n">str_</span><span class="p">(</span><span class="s2">&quot;e&quot;</span><span class="p">):</span> <span class="p">{</span>
<span class="s2">&quot;f&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="s2">&quot;g&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="s2">&quot;h&quot;</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">str_</span><span class="p">(</span><span class="s2">&quot;hi&quot;</span><span class="p">),</span>
<span class="p">},</span>
<span class="p">}</span>
<span class="n">converted</span> <span class="o">=</span> <span class="n">convert_numpy_to_builtins</span><span class="p">(</span><span class="n">update</span><span class="p">)</span>
<span class="n">expected</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;a&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;b&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
<span class="s2">&quot;c&quot;</span><span class="p">:</span> <span class="mf">3.14</span><span class="p">,</span>
<span class="s2">&quot;d&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span>
<span class="p">},</span>
<span class="s2">&quot;e&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s2">&quot;f&quot;</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
<span class="s2">&quot;g&quot;</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
<span class="s2">&quot;h&quot;</span><span class="p">:</span> <span class="s2">&quot;hi&quot;</span><span class="p">,</span>
<span class="p">},</span>
<span class="p">}</span>
<span class="k">assert</span> <span class="n">converted</span> <span class="o">==</span> <span class="n">expected</span>
<span class="n">assert_types_equal</span><span class="p">(</span><span class="n">converted</span><span class="p">,</span> <span class="n">expected</span><span class="p">)</span>
</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2021-2024, The Vivarium E. coli Authors.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Loading

0 comments on commit 60a9cf7

Please sign in to comment.