Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.13.1'

- name: Install dependencies
run: |
Expand All @@ -27,4 +27,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.13.1'

- name: Install Sphinx Dependency
run: |
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +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: 1b056b927b45b7771d0f07f5ff9c1698
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 03b167906d31b77ad3f3cd226f36a62e
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo.bak
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: 062d73627145ee1a24339b59898243cb
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/build/html/.doctrees/classes/gillespy2.core.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.sbml.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.solvers.auto.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.solvers.cython.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.solvers.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/.doctrees/classes/gillespy2.stochss.doctree
Binary file not shown.
Binary file modified docs/build/html/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/.doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/.doctrees/tutorials/tut_sbml/tut_sbml.doctree
Binary file not shown.
Binary file not shown.
1,330 changes: 878 additions & 452 deletions docs/build/html/_modules/collections.html

Large diffs are not rendered by default.

2,392 changes: 39 additions & 2,353 deletions docs/build/html/_modules/datetime.html

Large diffs are not rendered by default.

81 changes: 42 additions & 39 deletions docs/build/html/_modules/gillespy2/core/assignmentrule.html
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@

<!DOCTYPE html>

<html lang="en">
<html lang="en" data-content_root="../../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>gillespy2.core.assignmentrule &#8212; GillesPy2 1.8.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/alabaster.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/gillespy2_alabaster_customizations.css" />
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<title>gillespy2.core.assignmentrule &#8212; GillesPy2 1.8.3 documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=5ecbeea2" />
<link rel="stylesheet" type="text/css" href="../../../_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="../../../_static/alabaster.css?v=5647dbb4" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/gillespy2_alabaster_customizations.css?v=b3beab4e" />
<script src="../../../_static/documentation_options.js?v=82e6e318"></script>
<script src="../../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />

<link rel="stylesheet" href="../../../_static/custom.css" type="text/css" />

<link rel="apple-touch-icon" href="../../../_static/img/gillespy2-logo.svg" />




<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>
<div class="document">

<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="../../../index.html">
<img class="logo" src="../../../_static/img/gillespy2-logo.svg" alt="Logo"/>
<img class="logo" src="../../../_static/img/gillespy2-logo.svg" alt="Logo" />

</a>
</p>
Expand All @@ -51,7 +49,16 @@



<h3>Navigation</h3>

<search id="searchbox" style="display: none" role="search">
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../../getting_started/installation/installation.html">Installation</a></li>
Expand All @@ -75,16 +82,6 @@ <h3>Related Topics</h3>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>



Expand All @@ -103,7 +100,7 @@ <h3 id="searchlabel">Quick search</h3>

<h1>Source code for gillespy2.core.assignmentrule</h1><div class="highlight"><pre>
<span></span><span class="c1"># GillesPy2 is a modeling toolkit for biochemical simulation.</span>
<span class="c1"># Copyright (C) 2019-2024 GillesPy2 developers.</span>
<span class="c1"># Copyright (C) 2019-2025 GillesPy2 developers.</span>

<span class="c1"># This program is free software: you can redistribute it and/or modify</span>
<span class="c1"># it under the terms of the GNU General Public License as published by</span>
Expand All @@ -118,12 +115,14 @@ <h1>Source code for gillespy2.core.assignmentrule</h1><div class="highlight"><pr
<span class="c1"># You should have received a copy of the GNU General Public License</span>
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>

<span class="kn">import</span> <span class="nn">uuid</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">uuid</span>

<span class="kn">from</span> <span class="nn">gillespy2.core.sortableobject</span> <span class="kn">import</span> <span class="n">SortableObject</span>
<span class="kn">from</span> <span class="nn">gillespy2.core.jsonify</span> <span class="kn">import</span> <span class="n">Jsonify</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">gillespy2.core.sortableobject</span><span class="w"> </span><span class="kn">import</span> <span class="n">SortableObject</span>
<span class="kn">from</span><span class="w"> </span><span class="nn">gillespy2.core.jsonify</span><span class="w"> </span><span class="kn">import</span> <span class="n">Jsonify</span>

<div class="viewcode-block" id="AssignmentRule"><a class="viewcode-back" href="../../../classes/gillespy2.core.html#gillespy2.core.assignmentrule.AssignmentRule">[docs]</a><span class="k">class</span> <span class="nc">AssignmentRule</span><span class="p">(</span><span class="n">SortableObject</span><span class="p">,</span> <span class="n">Jsonify</span><span class="p">):</span>
<div class="viewcode-block" id="AssignmentRule">
<a class="viewcode-back" href="../../../classes/gillespy2.core.html#gillespy2.core.assignmentrule.AssignmentRule">[docs]</a>
<span class="k">class</span><span class="w"> </span><span class="nc">AssignmentRule</span><span class="p">(</span><span class="n">SortableObject</span><span class="p">,</span> <span class="n">Jsonify</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> An AssignmentRule is used to express equations that set the values of</span>
<span class="sd"> variables. This would correspond to a function in the form of x = f(V)</span>
Expand All @@ -138,19 +137,21 @@ <h1>Source code for gillespy2.core.assignmentrule</h1><div class="highlight"><pr
<span class="sd"> :type formula: str</span>
<span class="sd"> &quot;&quot;&quot;</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">variable</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">formula</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">variable</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">formula</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;ar</span><span class="si">{</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">()</span><span class="si">}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;-&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="bp">self</span><span class="o">.</span><span class="n">variable</span> <span class="o">=</span> <span class="n">variable</span>
<span class="bp">self</span><span class="o">.</span><span class="n">formula</span> <span class="o">=</span> <span class="n">formula</span>

<span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span><span class="w"> </span><span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">var_name</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">variable</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">variable</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">variable</span><span class="o">.</span><span class="n">name</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="n">name</span><span class="si">}</span><span class="s2">: Var: </span><span class="si">{</span><span class="n">var_name</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">formula</span><span class="si">}</span><span class="s2">&quot;</span>

<div class="viewcode-block" id="AssignmentRule.sanitized_formula"><a class="viewcode-back" href="../../../classes/gillespy2.core.html#gillespy2.core.assignmentrule.AssignmentRule.sanitized_formula">[docs]</a> <span class="k">def</span> <span class="nf">sanitized_formula</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">species_mappings</span><span class="p">,</span> <span class="n">parameter_mappings</span><span class="p">):</span>
<div class="viewcode-block" id="AssignmentRule.sanitized_formula">
<a class="viewcode-back" href="../../../classes/gillespy2.core.html#gillespy2.core.assignmentrule.AssignmentRule.sanitized_formula">[docs]</a>
<span class="k">def</span><span class="w"> </span><span class="nf">sanitized_formula</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">species_mappings</span><span class="p">,</span> <span class="n">parameter_mappings</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Sanitize the assignment rule formula.</span>

Expand All @@ -170,7 +171,9 @@ <h1>Source code for gillespy2.core.assignmentrule</h1><div class="highlight"><pr
<span class="n">sanitized_formula</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">formula</span>
<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">name</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">names</span><span class="p">):</span>
<span class="n">sanitized_formula</span> <span class="o">=</span> <span class="n">sanitized_formula</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="s2">&quot;{&quot;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;}&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">sanitized_formula</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="o">*</span><span class="n">replacements</span><span class="p">)</span></div></div>
<span class="k">return</span> <span class="n">sanitized_formula</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="o">*</span><span class="n">replacements</span><span class="p">)</span></div>
</div>

</pre></div>

</div>
Expand All @@ -187,17 +190,17 @@ <h1>Source code for gillespy2.core.assignmentrule</h1><div class="highlight"><pr
<div class="clearer"></div>
</div>
<div class="footer">
&copy;Copyright (C) 2017-2023.
&#169;Copyright (C) 2017-2024.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 5.3.0</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
&amp; <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>

</div>


<a href="https://github.com/GillesPy2/GillesPy2" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" class="github"/>
<img src="../../../_static/github-banner.svg" alt="Fork me on GitHub" class="github"/>
</a>


Expand Down
Loading