Skip to content

Commit

Permalink
Add changes for 678e169
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 24, 2023
1 parent abb992a commit edfb88b
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
20 changes: 20 additions & 0 deletions _modules/pyobistools/taxa.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ <h1>Source code for pyobistools.taxa</h1><div class="highlight"><pre>

<span class="kn">from</span> <span class="nn">pyobistools.utils</span> <span class="kn">import</span> <span class="n">removesuffix</span>

<span class="kn">from</span> <span class="nn">pyobistools.validation</span> <span class="kn">import</span> <span class="n">check_scientificname_and_ids</span> <span class="k">as</span> <span class="n">check_names</span>


<div class="viewcode-block" id="STANDARD_SPECIES_COLUMNS">
<a class="viewcode-back" href="../../api/pyobistools/taxa/index.html#pyobistools.taxa.STANDARD_SPECIES_COLUMNS">[docs]</a>
<span class="n">STANDARD_SPECIES_COLUMNS</span> <span class="o">=</span> <span class="p">{</span>
Expand Down Expand Up @@ -138,6 +141,23 @@ <h1>Source code for pyobistools.taxa</h1><div class="highlight"><pre>



<div class="viewcode-block" id="match_taxa">
<a class="viewcode-back" href="../../api/pyobistools/taxa/index.html#pyobistools.taxa.match_taxa">[docs]</a>
<span class="k">def</span> <span class="nf">match_taxa</span><span class="p">(</span><span class="n">names</span><span class="p">,</span> <span class="n">ask</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">itis_usage</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrap the existing functionality in validation in the expected name for this function as per R&#39;s iobis/obistools.</span>

<span class="sd"> @param names List of scientific names to check against</span>
<span class="sd"> @param ask Do we ask the user to resolve multi-match or ambiguous names?</span>
<span class="sd"> @param itis_usage Pass through the ITIS check setting for the client function to handle</span>

<span class="sd"> @return structure with appended lsids where WoRMS (or ITIS can resolve them)</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">return</span> <span class="n">check_names</span><span class="o">.</span><span class="n">check_scientificname_and_ids</span><span class="p">(</span><span class="n">names</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="s1">&#39;names&#39;</span><span class="p">,</span> <span class="n">itis_usage</span><span class="o">=</span><span class="n">itis_usage</span><span class="p">)</span></div>



<div class="viewcode-block" id="search_worms">
<a class="viewcode-back" href="../../api/pyobistools/taxa/index.html#pyobistools.taxa.search_worms">[docs]</a>
<span class="k">def</span> <span class="nf">search_worms</span><span class="p">(</span><span class="n">names</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span>
Expand Down
12 changes: 12 additions & 0 deletions _sources/api/pyobistools/taxa/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Functions
pyobistools.taxa._standardize_types
pyobistools.taxa.remove_suffix
pyobistools.taxa.add_suffix
pyobistools.taxa.match_taxa
pyobistools.taxa.search_worms
pyobistools.taxa.search_itis
pyobistools.taxa.search_obis
Expand Down Expand Up @@ -46,6 +47,17 @@ Attributes
Adds suffixes to a name for searching ITIS


.. py:function:: match_taxa(names, ask=True, itis_usage=False)
Wrap the existing functionality in validation in the expected name for this function as per R's iobis/obistools.

@param names List of scientific names to check against
@param ask Do we ask the user to resolve multi-match or ambiguous names?
@param itis_usage Pass through the ITIS check setting for the client function to handle

@return structure with appended lsids where WoRMS (or ITIS can resolve them)


.. py:function:: search_worms(names, kwargs = {})
Searches WoRMS for records based on a list of scientific names and returns
Expand Down
21 changes: 17 additions & 4 deletions api/pyobistools/taxa/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ <h3>Functions<a class="headerlink" href="#functions" title="Link to this heading
<tr class="row-odd"><td><p><a class="reference internal" href="#pyobistools.taxa.add_suffix" title="pyobistools.taxa.add_suffix"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_suffix</span></code></a>(name)</p></td>
<td><p>Adds suffixes to a name for searching ITIS</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyobistools.taxa.search_worms" title="pyobistools.taxa.search_worms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_worms</span></code></a>(names[, kwargs])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyobistools.taxa.match_taxa" title="pyobistools.taxa.match_taxa"><code class="xref py py-obj docutils literal notranslate"><span class="pre">match_taxa</span></code></a>(names[, ask, itis_usage])</p></td>
<td><p>Wrap the existing functionality in validation in the expected name for this function as per R's iobis/obistools.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyobistools.taxa.search_worms" title="pyobistools.taxa.search_worms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_worms</span></code></a>(names[, kwargs])</p></td>
<td><p>Searches WoRMS for records based on a list of scientific names and returns</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyobistools.taxa.search_itis" title="pyobistools.taxa.search_itis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_itis</span></code></a>(names[, kwargs])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyobistools.taxa.search_itis" title="pyobistools.taxa.search_itis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_itis</span></code></a>(names[, kwargs])</p></td>
<td><p>Searches ITIS for records based on a list of scientific names and returns</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyobistools.taxa.search_obis" title="pyobistools.taxa.search_obis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_obis</span></code></a>(names[, kwargs])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyobistools.taxa.search_obis" title="pyobistools.taxa.search_obis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search_obis</span></code></a>(names[, kwargs])</p></td>
<td><p>Searches OBIS for records based on a list of scientific names and returns</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyobistools.taxa.search" title="pyobistools.taxa.search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search</span></code></a>(names[, worms_kwargs, itis_kwargs, ...])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#pyobistools.taxa.search" title="pyobistools.taxa.search"><code class="xref py py-obj docutils literal notranslate"><span class="pre">search</span></code></a>(names[, worms_kwargs, itis_kwargs, ...])</p></td>
<td><p>Search a list of scientific names in WoRMS, ITIS and OBIS and return the resulting</p></td>
</tr>
</tbody>
Expand Down Expand Up @@ -118,6 +121,16 @@ <h3>Attributes<a class="headerlink" href="#attributes" title="Link to this headi
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pyobistools.taxa.match_taxa">
<span class="sig-prename descclassname"><span class="pre">pyobistools.taxa.</span></span><span class="sig-name descname"><span class="pre">match_taxa</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">names</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ask</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">itis_usage</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/pyobistools/taxa.html#match_taxa"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyobistools.taxa.match_taxa" title="Link to this definition"></a></dt>
<dd><p>Wrap the existing functionality in validation in the expected name for this function as per R’s iobis/obistools.</p>
<p>&#64;param names List of scientific names to check against
&#64;param ask Do we ask the user to resolve multi-match or ambiguous names?
&#64;param itis_usage Pass through the ITIS check setting for the client function to handle</p>
<p>&#64;return structure with appended lsids where WoRMS (or ITIS can resolve them)</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pyobistools.taxa.search_worms">
<span class="sig-prename descclassname"><span class="pre">pyobistools.taxa.</span></span><span class="sig-name descname"><span class="pre">search_worms</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">names</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">kwargs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/pyobistools/taxa.html#search_worms"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyobistools.taxa.search_worms" title="Link to this definition"></a></dt>
Expand Down
2 changes: 2 additions & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ <h2 id="F">F</h2>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api/pyobistools/taxa/index.html#pyobistools.taxa.match_taxa">match_taxa() (in module pyobistools.taxa)</a>
</li>
<li>
module

Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit edfb88b

Please sign in to comment.