Skip to content

Commit

Permalink
doc updates [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Circle Ci committed Jun 13, 2024
1 parent 145a3ca commit 333f83f
Show file tree
Hide file tree
Showing 11 changed files with 17,851 additions and 17,845 deletions.
43 changes: 18 additions & 25 deletions dev/_modules/hnn_core/gui/gui.html

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions dev/_modules/hnn_core/params.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,16 @@ <h1>Source code for hnn_core.params</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">params_input</span>


<div class="viewcode-block" id="read_params"><a class="viewcode-back" href="../../generated/hnn_core.read_params.html#hnn_core.read_params">[docs]</a><span class="k">def</span> <span class="nf">read_params</span><span class="p">(</span><span class="n">params_fname</span><span class="p">):</span>
<div class="viewcode-block" id="read_params"><a class="viewcode-back" href="../../generated/hnn_core.read_params.html#hnn_core.read_params">[docs]</a><span class="k">def</span> <span class="nf">read_params</span><span class="p">(</span><span class="n">params_fname</span><span class="p">,</span> <span class="n">file_contents</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Read param values from a file (.json or .param).</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> params_fname : str</span>
<span class="sd"> Full path to the file (.param)</span>
<span class="sd"> file_contents : str | None</span>
<span class="sd"> If file_contents are provided as a string,</span>
<span class="sd"> it is parsed into a dictionary.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
Expand All @@ -227,10 +230,12 @@ <h1>Source code for hnn_core.params</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Unrecognized extension, expected one of&#39;</span> <span class="o">+</span>
<span class="s1">&#39; .json, .param. Got </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">ext</span><span class="p">)</span>

<span class="k">if</span> <span class="n">file_contents</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">params_fname</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fp</span><span class="p">:</span>
<span class="n">file_contents</span> <span class="o">=</span> <span class="n">fp</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>

<span class="n">read_func</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;.json&#39;</span><span class="p">:</span> <span class="n">_read_json</span><span class="p">,</span> <span class="s1">&#39;.param&#39;</span><span class="p">:</span> <span class="n">_read_legacy_params</span><span class="p">}</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">params_fname</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">fp</span><span class="p">:</span>
<span class="n">param_data</span> <span class="o">=</span> <span class="n">fp</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
<span class="n">params_dict</span> <span class="o">=</span> <span class="n">read_func</span><span class="p">[</span><span class="n">ext</span><span class="p">](</span><span class="n">param_data</span><span class="p">)</span>
<span class="n">params_dict</span> <span class="o">=</span> <span class="n">read_func</span><span class="p">[</span><span class="n">ext</span><span class="p">](</span><span class="n">file_contents</span><span class="p">)</span>

<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">params_dict</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Failed to read parameters from file: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span>
Expand Down
3 changes: 3 additions & 0 deletions dev/_sources/whats_new.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ Bug
- Fix GUI plotting bug due to deprecation of matplotlib color cycling method,
by `George Dang`_ in :gh:`695`.

- Fix loading of drives in the GUI: drives are now overwritten instead of updated,
by `Mainak Jas`_ in :gh:`795`.

API
~~~
- :func:`~hnn_core.CellResponse.write` and :func:`~hnn_core.Cell_response.read_spikes`
Expand Down
2 changes: 1 addition & 1 deletion dev/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ <h2>Parallel backends (<code class="xref py py-mod docutils literal notranslate"
<h2>Input and Output:<a class="headerlink" href="#input-and-output" title="Permalink to this heading"></a></h2>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/hnn_core.read_params.html#hnn_core.read_params" title="hnn_core.read_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_params</span></code></a>(params_fname)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/hnn_core.read_params.html#hnn_core.read_params" title="hnn_core.read_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_params</span></code></a>(params_fname[, file_contents])</p></td>
<td><p>Read param values from a file (.json or .param).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/hnn_core.read_dipole.html#hnn_core.read_dipole" title="hnn_core.read_dipole"><code class="xref py py-obj docutils literal notranslate"><span class="pre">read_dipole</span></code></a>(fname)</p></td>
Expand Down
5 changes: 4 additions & 1 deletion dev/generated/hnn_core.read_params.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,16 @@
<h1>hnn_core.read_params<a class="headerlink" href="#hnn-core-read-params" title="Permalink to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="hnn_core.read_params">
<span class="sig-prename descclassname"><span class="pre">hnn_core.</span></span><span class="sig-name descname"><span class="pre">read_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params_fname</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/hnn_core/params.html#read_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#hnn_core.read_params" title="Permalink to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">hnn_core.</span></span><span class="sig-name descname"><span class="pre">read_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">params_fname</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file_contents</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/hnn_core/params.html#read_params"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#hnn_core.read_params" title="Permalink to this definition"></a></dt>
<dd><p>Read param values from a file (.json or .param).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>params_fname</strong><span class="classifier">str</span></dt><dd><p>Full path to the file (.param)</p>
</dd>
<dt><strong>file_contents</strong><span class="classifier">str | None</span></dt><dd><p>If file_contents are provided as a string,
it is parsed into a dictionary.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand Down
8 changes: 4 additions & 4 deletions dev/gui/basic_gui_usage.html

Large diffs are not rendered by default.

12,870 changes: 6,435 additions & 6,435 deletions dev/gui/basic_gui_usage.ipynb

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions dev/gui/tutorial_erp.html

Large diffs are not rendered by default.

22,728 changes: 11,364 additions & 11,364 deletions dev/gui/tutorial_erp.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/searchindex.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dev/whats_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ <h3>Bug<a class="headerlink" href="#bug" title="Permalink to this heading">¶</a
now returns a scalar instead of tuple, by <a class="reference external" href="https://github.com/rythorpe">Ryan Thorpe</a> in <a class="reference external" href="https://github.com/jonescompneurolab/hnn-core/issues/670">#670</a>.</p></li>
<li><p>Fix GUI plotting bug due to deprecation of matplotlib color cycling method,
by <a class="reference external" href="https://github.com/gtdang">George Dang</a> in <a class="reference external" href="https://github.com/jonescompneurolab/hnn-core/issues/695">#695</a>.</p></li>
<li><p>Fix loading of drives in the GUI: drives are now overwritten instead of updated,
by <a class="reference external" href="http://jasmainak.github.io/">Mainak Jas</a> in <a class="reference external" href="https://github.com/jonescompneurolab/hnn-core/issues/795">#795</a>.</p></li>
</ul>
</section>
<section id="api">
Expand Down

0 comments on commit 333f83f

Please sign in to comment.