Skip to content

Commit

Permalink
Deploying to gh-pages from @ 8ce88b6 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 27, 2023
1 parent de84247 commit 8d1214a
Show file tree
Hide file tree
Showing 27 changed files with 605 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .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: e4c81ac4b1b7ab93fb71781061fff3ca
config: eacb5f95efd53f0af1e04d727ffd7fac
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 2 additions & 2 deletions _modules/biocutils/factor.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.factor &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.factor &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/intersect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.intersect &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.intersect &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/is_list_of_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.is_list_of_type &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.is_list_of_type &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/map_to_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.map_to_index &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.map_to_index &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/match.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.match &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.match &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
257 changes: 257 additions & 0 deletions _modules/biocutils/normalize_subscript.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _modules/biocutils/package_utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.package_utils &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.package_utils &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
157 changes: 157 additions & 0 deletions _modules/biocutils/print_truncated_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<!DOCTYPE html>

<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.print_truncated_list &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></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" />


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

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>Source code for biocutils.print_truncated_list</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Sequence</span><span class="p">,</span> <span class="n">Callable</span>


<div class="viewcode-block" id="print_truncated_list">
<a class="viewcode-back" href="../../api/biocutils.html#biocutils.print_truncated_list.print_truncated_list">[docs]</a>
<span class="k">def</span> <span class="nf">print_truncated_list</span><span class="p">(</span><span class="n">x</span><span class="p">:</span> <span class="n">Sequence</span><span class="p">,</span> <span class="n">truncated_to</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span> <span class="n">full_threshold</span> <span class="o">=</span> <span class="mi">10</span><span class="p">,</span> <span class="n">transform</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Callable</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="n">sep</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;, &quot;</span><span class="p">,</span> <span class="n">include_brackets</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Pretty-print a truncated list, replacing the middle elements with an</span>
<span class="sd"> ellipsis if there are too many. This provides a useful preview of an</span>
<span class="sd"> object without spewing out all of its contents on the screen.</span>

<span class="sd"> Args:</span>
<span class="sd"> x: List or some other sequence to be printed.</span>

<span class="sd"> truncated_to:</span>
<span class="sd"> Number of elements to truncate to, at the start and end of the</span>
<span class="sd"> sequence. This should be less than half of ``full_threshold``.</span>

<span class="sd"> full_threshold:</span>
<span class="sd"> Threshold on the number of elements, below which the list is</span>
<span class="sd"> shown in its entirety.</span>

<span class="sd"> transform:</span>
<span class="sd"> Optional transformation to apply to the elements of ``x``</span>
<span class="sd"> after truncation but before printing.</span>

<span class="sd"> sep:</span>
<span class="sd"> Separator between elements in the printed list.</span>

<span class="sd"> include_brackets:</span>
<span class="sd"> Whether to include the start/end brackets.</span>

<span class="sd"> Returns:</span>
<span class="sd"> String containing the pretty-printed truncated list. </span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">collected</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">if</span> <span class="n">transform</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">transform</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">y</span> <span class="p">:</span> <span class="n">y</span>

<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">&gt;</span> <span class="n">full_threshold</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">&gt;</span> <span class="n">truncated_to</span> <span class="o">*</span> <span class="mi">2</span><span class="p">:</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">truncated_to</span><span class="p">):</span>
<span class="n">collected</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">])))</span>
<span class="n">collected</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;...&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">truncated_to</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">):</span>
<span class="n">collected</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">-</span> <span class="n">i</span><span class="p">])))</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">x</span><span class="p">:</span>
<span class="n">collected</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">repr</span><span class="p">(</span><span class="n">transform</span><span class="p">(</span><span class="n">c</span><span class="p">)))</span>

<span class="n">output</span> <span class="o">=</span> <span class="n">sep</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">collected</span><span class="p">)</span>
<span class="k">if</span> <span class="n">include_brackets</span><span class="p">:</span>
<span class="n">output</span> <span class="o">=</span> <span class="s2">&quot;[&quot;</span> <span class="o">+</span> <span class="n">output</span> <span class="o">+</span> <span class="s2">&quot;]&quot;</span>
<span class="k">return</span> <span class="n">output</span></div>

</pre></div>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">biocutils</a></h1>








<h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contributing.html">Contributions &amp; Help</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../authors.html">Authors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../changelog.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/modules.html">Module Reference</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../../index.html">Documentation overview</a><ul>
<li><a href="../index.html">Module code</a><ul>
</ul></li>
</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>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023, Aaron Lun.

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

</div>




</body>
</html>
4 changes: 2 additions & 2 deletions _modules/biocutils/subset.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.subset &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.subset &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
4 changes: 2 additions & 2 deletions _modules/biocutils/union.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>biocutils.union &#8212; biocutils 0.0.5 documentation</title>
<title>biocutils.union &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=233b9934" />
<script src="../../_static/documentation_options.js?v=282f96c0"></script>
<script src="../../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down
6 changes: 4 additions & 2 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; biocutils 0.0.5 documentation</title>
<title>Overview: module code &#8212; biocutils 0.0.6 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=233b9934" />
<script src="../_static/documentation_options.js?v=282f96c0"></script>
<script src="../_static/documentation_options.js?v=1fd71caa"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
Expand All @@ -34,7 +34,9 @@ <h1>All modules for which code is available</h1>
<li><a href="biocutils/is_list_of_type.html">biocutils.is_list_of_type</a></li>
<li><a href="biocutils/map_to_index.html">biocutils.map_to_index</a></li>
<li><a href="biocutils/match.html">biocutils.match</a></li>
<li><a href="biocutils/normalize_subscript.html">biocutils.normalize_subscript</a></li>
<li><a href="biocutils/package_utils.html">biocutils.package_utils</a></li>
<li><a href="biocutils/print_truncated_list.html">biocutils.print_truncated_list</a></li>
<li><a href="biocutils/subset.html">biocutils.subset</a></li>
<li><a href="biocutils/union.html">biocutils.union</a></li>
</ul>
Expand Down
16 changes: 16 additions & 0 deletions _sources/api/biocutils.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ biocutils.match module
:undoc-members:
:show-inheritance:

biocutils.normalize\_subscript module
-------------------------------------

.. automodule:: biocutils.normalize_subscript
:members:
:undoc-members:
:show-inheritance:

biocutils.package\_utils module
-------------------------------

Expand All @@ -52,6 +60,14 @@ biocutils.package\_utils module
:undoc-members:
:show-inheritance:

biocutils.print\_truncated\_list module
---------------------------------------

.. automodule:: biocutils.print_truncated_list
:members:
:undoc-members:
:show-inheritance:

biocutils.subset module
-----------------------

Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.0.5',
VERSION: '0.0.6',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit 8d1214a

Please sign in to comment.