Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 12, 2024
1 parent 2d63f83 commit 2ec4a90
Show file tree
Hide file tree
Showing 8 changed files with 749 additions and 1 deletion.
1 change: 1 addition & 0 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ <h1>All modules for which code is available</h1>
<li><a href="kerchunk/fits.html">kerchunk.fits</a></li>
<li><a href="kerchunk/grib2.html">kerchunk.grib2</a></li>
<li><a href="kerchunk/hdf.html">kerchunk.hdf</a></li>
<li><a href="kerchunk/hdf4.html">kerchunk.hdf4</a></li>
<li><a href="kerchunk/netCDF3.html">kerchunk.netCDF3</a></li>
<li><a href="kerchunk/tiff.html">kerchunk.tiff</a></li>
<li><a href="kerchunk/utils.html">kerchunk.utils</a></li>
Expand Down
23 changes: 23 additions & 0 deletions _modules/kerchunk/codecs.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ <h1>Source code for kerchunk.codecs</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">numcodecs.abc</span> <span class="kn">import</span> <span class="n">Codec</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">threading</span>
<span class="kn">import</span> <span class="nn">zlib</span>


<div class="viewcode-block" id="FillStringsCodec">
Expand Down Expand Up @@ -353,6 +354,28 @@ <h1>Source code for kerchunk.codecs</h1><div class="highlight"><pre>

<span class="k">def</span> <span class="nf">encode</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">buf</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span>


<div class="viewcode-block" id="ZlibCodec">
<a class="viewcode-back" href="../../reference.html#kerchunk.codecs.ZlibCodec">[docs]</a>
<span class="k">class</span> <span class="nc">ZlibCodec</span><span class="p">(</span><span class="n">Codec</span><span class="p">):</span>
<span class="n">codec_id</span> <span class="o">=</span> <span class="s2">&quot;zlib&quot;</span>

<div class="viewcode-block" id="ZlibCodec.__init__">
<a class="viewcode-back" href="../../reference.html#kerchunk.codecs.ZlibCodec.__init__">[docs]</a>
<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="o">...</span></div>


<span class="k">def</span> <span class="nf">decode</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">out</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">out</span><span class="p">:</span>
<span class="n">out</span><span class="p">[:]</span> <span class="o">=</span> <span class="n">zlib</span><span class="o">.</span><span class="n">decompress</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="k">return</span> <span class="n">out</span>
<span class="k">return</span> <span class="n">zlib</span><span class="o">.</span><span class="n">decompress</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">encode</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">buf</span><span class="p">):</span>
<span class="k">return</span> <span class="n">zlib</span><span class="o">.</span><span class="n">compress</span><span class="p">(</span><span class="n">buf</span><span class="p">)</span></div>

</pre></div>

</div>
Expand Down
633 changes: 633 additions & 0 deletions _modules/kerchunk/hdf4.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions _sources/reference.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ File format backends
kerchunk.fits.process_file
kerchunk.tiff.tiff_to_zarr
kerchunk.netCDF3.NetCDF3ToZarr
kerchunk.hdf4.HDF4ToZarr

.. autoclass:: kerchunk.hdf.SingleHdf5ToZarr
:members:
Expand All @@ -24,6 +25,9 @@ File format backends
.. autoclass:: kerchunk.netCDF3.NetCDF3ToZarr
:members: __init__, translate

.. autoclass:: kerchunk.hdf4.HDF4ToZarr
:members: __init__, translate

Codecs
------

Expand All @@ -50,6 +54,9 @@ Codecs
.. autoclass:: kerchunk.codecs.RecordArrayMember
:members: __init__

.. autoclass:: kerchunk.codecs.ZlibCodec
:members: __init__

Combining
---------

Expand Down
24 changes: 24 additions & 0 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ <h1 id="index">Index</h1>
| <a href="#D"><strong>D</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#H"><strong>H</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
Expand All @@ -99,6 +100,7 @@ <h1 id="index">Index</h1>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
| <a href="#V"><strong>V</strong></a>
| <a href="#Z"><strong>Z</strong></a>

</div>
<h2 id="_">_</h2>
Expand All @@ -114,8 +116,12 @@ <h2 id="_">_</h2>
<li><a href="reference.html#kerchunk.codecs.RecordArrayMember.__init__">(kerchunk.codecs.RecordArrayMember method)</a>
</li>
<li><a href="reference.html#kerchunk.codecs.VarArrCodec.__init__">(kerchunk.codecs.VarArrCodec method)</a>
</li>
<li><a href="reference.html#kerchunk.codecs.ZlibCodec.__init__">(kerchunk.codecs.ZlibCodec method)</a>
</li>
<li><a href="reference.html#kerchunk.combine.MultiZarrToZarr.__init__">(kerchunk.combine.MultiZarrToZarr method)</a>
</li>
<li><a href="reference.html#kerchunk.hdf4.HDF4ToZarr.__init__">(kerchunk.hdf4.HDF4ToZarr method)</a>
</li>
<li><a href="reference.html#kerchunk.netCDF3.NetCDF3ToZarr.__init__">(kerchunk.netCDF3.NetCDF3ToZarr method)</a>
</li>
Expand Down Expand Up @@ -183,6 +189,14 @@ <h2 id="G">G</h2>
</ul></td>
</tr></table>

<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#kerchunk.hdf4.HDF4ToZarr">HDF4ToZarr (class in kerchunk.hdf4)</a>
</li>
</ul></td>
</tr></table>

<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
Expand Down Expand Up @@ -258,6 +272,8 @@ <h2 id="T">T</h2>

<ul>
<li><a href="reference.html#kerchunk.hdf.SingleHdf5ToZarr.translate">(kerchunk.hdf.SingleHdf5ToZarr method)</a>
</li>
<li><a href="reference.html#kerchunk.hdf4.HDF4ToZarr.translate">(kerchunk.hdf4.HDF4ToZarr method)</a>
</li>
<li><a href="reference.html#kerchunk.netCDF3.NetCDF3ToZarr.translate">(kerchunk.netCDF3.NetCDF3ToZarr method)</a>
</li>
Expand All @@ -273,6 +289,14 @@ <h2 id="V">V</h2>
</ul></td>
</tr></table>

<h2 id="Z">Z</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#kerchunk.codecs.ZlibCodec">ZlibCodec (class in kerchunk.codecs)</a>
</li>
</ul></td>
</tr></table>



</div>
Expand Down
Binary file modified objects.inv
Binary file not shown.
60 changes: 60 additions & 0 deletions reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<li class="toctree-l4"><a class="reference internal" href="#kerchunk.netCDF3.NetCDF3ToZarr.translate"><code class="docutils literal notranslate"><span class="pre">NetCDF3ToZarr.translate()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#kerchunk.hdf4.HDF4ToZarr"><code class="docutils literal notranslate"><span class="pre">HDF4ToZarr</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#kerchunk.hdf4.HDF4ToZarr.__init__"><code class="docutils literal notranslate"><span class="pre">HDF4ToZarr.__init__()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#kerchunk.hdf4.HDF4ToZarr.translate"><code class="docutils literal notranslate"><span class="pre">HDF4ToZarr.translate()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#codecs">Codecs</a><ul>
Expand All @@ -92,6 +97,10 @@
<li class="toctree-l4"><a class="reference internal" href="#kerchunk.codecs.RecordArrayMember.__init__"><code class="docutils literal notranslate"><span class="pre">RecordArrayMember.__init__()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#kerchunk.codecs.ZlibCodec"><code class="docutils literal notranslate"><span class="pre">ZlibCodec</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#kerchunk.codecs.ZlibCodec.__init__"><code class="docutils literal notranslate"><span class="pre">ZlibCodec.__init__()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#combining">Combining</a><ul>
Expand Down Expand Up @@ -171,6 +180,9 @@ <h2>File format backends<a class="headerlink" href="#file-format-backends" title
<tr class="row-odd"><td><p><a class="reference internal" href="#kerchunk.netCDF3.NetCDF3ToZarr" title="kerchunk.netCDF3.NetCDF3ToZarr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kerchunk.netCDF3.NetCDF3ToZarr</span></code></a>(filename[, ...])</p></td>
<td><p>Generate references for a netCDF3 file</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#kerchunk.hdf4.HDF4ToZarr" title="kerchunk.hdf4.HDF4ToZarr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">kerchunk.hdf4.HDF4ToZarr</span></code></a>(path[, ...])</p></td>
<td><p>Experimental: interface to HDF4 archival files</p></td>
</tr>
</tbody>
</table>
<dl class="py class">
Expand Down Expand Up @@ -393,6 +405,44 @@ <h2>File format backends<a class="headerlink" href="#file-format-backends" title

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="kerchunk.hdf4.HDF4ToZarr">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">kerchunk.hdf4.</span></span><span class="sig-name descname"><span class="pre">HDF4ToZarr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inline_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">out</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/kerchunk/hdf4.html#HDF4ToZarr"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kerchunk.hdf4.HDF4ToZarr" title="Link to this definition"></a></dt>
<dd><p>Experimental: interface to HDF4 archival files</p>
<p class="rubric">Methods</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#kerchunk.hdf4.HDF4ToZarr.translate" title="kerchunk.hdf4.HDF4ToZarr.translate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">translate</span></code></a>([filename, storage_options])</p></td>
<td><p>Scan and return references</p></td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt class="sig sig-object py" id="kerchunk.hdf4.HDF4ToZarr.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_options</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inline_threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">out</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/kerchunk/hdf4.html#HDF4ToZarr.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kerchunk.hdf4.HDF4ToZarr.__init__" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="kerchunk.hdf4.HDF4ToZarr.translate">
<span class="sig-name descname"><span class="pre">translate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">storage_options</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/kerchunk/hdf4.html#HDF4ToZarr.translate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kerchunk.hdf4.HDF4ToZarr.translate" title="Link to this definition"></a></dt>
<dd><p>Scan and return references</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>filename: if given, write to this as JSON</strong></dt><dd></dd>
<dt><strong>storage_options: to interpret filename</strong></dt><dd></dd>
</dl>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><dl class="simple">
<dt>references</dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</section>
<section id="codecs">
<h2>Codecs<a class="headerlink" href="#codecs" title="Link to this heading"></a></h2>
Expand Down Expand Up @@ -502,6 +552,16 @@ <h2>Codecs<a class="headerlink" href="#codecs" title="Link to this heading"><

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="kerchunk.codecs.ZlibCodec">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">kerchunk.codecs.</span></span><span class="sig-name descname"><span class="pre">ZlibCodec</span></span><a class="reference internal" href="_modules/kerchunk/codecs.html#ZlibCodec"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kerchunk.codecs.ZlibCodec" title="Link to this definition"></a></dt>
<dd><dl class="py method">
<dt class="sig sig-object py" id="kerchunk.codecs.ZlibCodec.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/kerchunk/codecs.html#ZlibCodec.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kerchunk.codecs.ZlibCodec.__init__" title="Link to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</section>
<section id="combining">
<h2>Combining<a class="headerlink" href="#combining" title="Link to this heading"></a></h2>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 2ec4a90

Please sign in to comment.