Skip to content

Commit

Permalink
Make overwrite default to False (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
salu133445 committed Jan 15, 2021
1 parent 646cadc commit be4bd7a
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 177 deletions.
65 changes: 27 additions & 38 deletions docs/_modules/muspy/datasets/base.html

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions docs/datasets/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ <h1>Base Dataset Classes<a class="headerlink" href="#base-dataset-classes" title

<dl class="py class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">RemoteDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">download_and_extract</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">cleanup</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset"><span class="viewcode-link">[source]</span></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">RemoteDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">download_and_extract</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">cleanup</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Base class for remote MusPy datasets.</p>
<p>This class extends <a class="reference internal" href="../doc/muspy.html#muspy.Dataset" title="muspy.Dataset"><code class="xref py py-class docutils literal notranslate"><span class="pre">muspy.Dataset</span></code></a> to support remote
datasets. To build a custom remote dataset, please refer to the
Expand All @@ -343,8 +343,7 @@ <h1>Base Dataset Classes<a class="headerlink" href="#base-dataset-classes" title
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>download_and_extract</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to download and extract the dataset. Defaults to False.</p></li>
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing downloaded files. Defaults to
True.</p></li>
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing file(s). Defaults to False.</p></li>
<li><p><strong>cleanup</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to remove the source archive(s). Defaults to False.</p></li>
<li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to be verbose. Defaults to True.</p></li>
</ul>
Expand Down Expand Up @@ -404,12 +403,12 @@ <h1>Base Dataset Classes<a class="headerlink" href="#base-dataset-classes" title

<dl class="py method">
<dt>
<code class="sig-name descname">download</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset.download"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-name descname">download</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset.download"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Download the source datasets.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing files. Defaults to True.</p></li>
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing file(s). Defaults to False.</p></li>
<li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to be verbose. Defaults to True.</p></li>
</ul>
</dd>
Expand Down Expand Up @@ -445,13 +444,13 @@ <h1>Base Dataset Classes<a class="headerlink" href="#base-dataset-classes" title

<dl class="py method">
<dt>
<code class="sig-name descname">download_and_extract</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">cleanup</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset.download_and_extract"><span class="viewcode-link">[source]</span></a></dt>
<code class="sig-name descname">download_and_extract</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">overwrite</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">cleanup</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#RemoteDataset.download_and_extract"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Download source datasets and extract the downloaded archives.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing files. Defaults to True.</p></li>
<li><p><strong>cleanup</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to remove the source archive. Defaults to False.</p></li>
<li><p><strong>overwrite</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to overwrite existing file(s). Defaults to False.</p></li>
<li><p><strong>cleanup</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to remove the source archive(s). Defaults to False.</p></li>
<li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to be verbose. Defaults to True.</p></li>
</ul>
</dd>
Expand Down
6 changes: 3 additions & 3 deletions docs/datasets/local.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h1>Local Dataset Classes<a class="headerlink" href="#local-dataset-classes" tit
<p>Here are the classes for local datasets.</p>
<dl class="py class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">FolderDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">convert</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">kind</span><span class="o">=</span><span class="default_value">'json'</span></em>, <em class="sig-param"><span class="n">n_jobs</span><span class="o">=</span><span class="default_value">1</span></em>, <em class="sig-param"><span class="n">ignore_exceptions</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_converted</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#FolderDataset"><span class="viewcode-link">[source]</span></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">FolderDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">convert</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">kind</span><span class="o">=</span><span class="default_value">'json'</span></em>, <em class="sig-param"><span class="n">n_jobs</span><span class="o">=</span><span class="default_value">1</span></em>, <em class="sig-param"><span class="n">ignore_exceptions</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">use_converted</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#FolderDataset"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Class for datasets storing files in a folder.</p>
<p>This class extends <a class="reference internal" href="../doc/muspy.html#muspy.Dataset" title="muspy.Dataset"><code class="xref py py-class docutils literal notranslate"><span class="pre">muspy.Dataset</span></code></a> to support folder
datasets. To build a custom folder dataset, please refer to the
Expand Down Expand Up @@ -211,7 +211,7 @@ <h1>Local Dataset Classes<a class="headerlink" href="#local-dataset-classes" tit
<li><p><strong>ignore_exceptions</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to ignore errors and skip failed conversions. This can
be helpful if some source files are known to be corrupted.
Defaults to True.</p></li>
<li><p><strong>use_converted</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Force to disable on-the-fly mode and use stored converted data</p></li>
<li><p><strong>use_converted</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Force to disable on-the-fly mode and use converted data.</p></li>
</ul>
</dd>
</dl>
Expand Down Expand Up @@ -628,7 +628,7 @@ <h1>Local Dataset Classes<a class="headerlink" href="#local-dataset-classes" tit

<dl class="py class">
<dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">ABCFolderDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">convert</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">kind</span><span class="o">=</span><span class="default_value">'json'</span></em>, <em class="sig-param"><span class="n">n_jobs</span><span class="o">=</span><span class="default_value">1</span></em>, <em class="sig-param"><span class="n">ignore_exceptions</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">use_converted</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#ABCFolderDataset"><span class="viewcode-link">[source]</span></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">muspy.</code><code class="sig-name descname">ABCFolderDataset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">root</span></em>, <em class="sig-param"><span class="n">convert</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">kind</span><span class="o">=</span><span class="default_value">'json'</span></em>, <em class="sig-param"><span class="n">n_jobs</span><span class="o">=</span><span class="default_value">1</span></em>, <em class="sig-param"><span class="n">ignore_exceptions</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">use_converted</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/muspy/datasets/base.html#ABCFolderDataset"><span class="viewcode-link">[source]</span></a></dt>
<dd><p>Class for datasets storing ABC files in a folder.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
Expand Down
Loading

0 comments on commit be4bd7a

Please sign in to comment.