Skip to content

Commit

Permalink
deploy: b70ec82
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed May 10, 2024
1 parent 81ee60c commit a087f1c
Show file tree
Hide file tree
Showing 86 changed files with 1,087 additions and 522 deletions.
Binary file modified .doctrees/api/audb.Dependencies.doctree
Binary file not shown.
Binary file modified .doctrees/api/audb.Repository.doctree
Binary file not shown.
Binary file modified .doctrees/api/audb.load.doctree
Binary file not shown.
Binary file modified .doctrees/authentication.doctree
Binary file not shown.
Binary file modified .doctrees/changelog.doctree
Binary file not shown.
Binary file modified .doctrees/dependencies.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/publish.doctree
Binary file not shown.
Binary file modified .doctrees/quickstart.doctree
Binary file not shown.
209 changes: 99 additions & 110 deletions _modules/audb/core/api.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _modules/audb/core/cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -260,7 +260,7 @@ <h1>Source code for audb.core.cache</h1><div class="highlight"><pre>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _modules/audb/core/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -274,7 +274,7 @@ <h1>Source code for audb.core.config</h1><div class="highlight"><pre>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
226 changes: 201 additions & 25 deletions _modules/audb/core/dependencies.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _modules/audb/core/flavor.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -456,7 +456,7 @@ <h1>Source code for audb.core.flavor</h1><div class="highlight"><pre>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _modules/audb/core/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -937,7 +937,7 @@ <h1>Source code for audb.core.info</h1><div class="highlight"><pre>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
102 changes: 57 additions & 45 deletions _modules/audb/core/load.html

Large diffs are not rendered by default.

46 changes: 31 additions & 15 deletions _modules/audb/core/load_to.html

Large diffs are not rendered by default.

213 changes: 124 additions & 89 deletions _modules/audb/core/publish.html

Large diffs are not rendered by default.

161 changes: 153 additions & 8 deletions _modules/audb/core/repository.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -151,12 +151,157 @@
<div itemprop="articleBody">

<h1>Source code for audb.core.repository</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">audbackend</span>


<div class="viewcode-block" id="Repository"><a class="viewcode-back" href="../../../api/audb.Repository.html#audb.Repository">[docs]</a><span class="k">class</span> <span class="nc">Repository</span><span class="p">(</span><span class="n">audbackend</span><span class="o">.</span><span class="n">Repository</span><span class="p">):</span>
<span class="vm">__doc__</span> <span class="o">=</span> <span class="n">audbackend</span><span class="o">.</span><span class="n">Repository</span><span class="o">.</span><span class="vm">__doc__</span>
<span class="k">pass</span></div>
<span></span><span class="kn">import</span> <span class="nn">typing</span>

<span class="kn">import</span> <span class="nn">audbackend</span>


<div class="viewcode-block" id="Repository"><a class="viewcode-back" href="../../../api/audb.Repository.html#audb.Repository">[docs]</a><span class="k">class</span> <span class="nc">Repository</span><span class="p">:</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Repository object.</span>

<span class="sd"> It stores all information</span>
<span class="sd"> needed to address a repository:</span>
<span class="sd"> the repository name,</span>
<span class="sd"> host,</span>
<span class="sd"> and the backend name.</span>
<span class="sd"> With :meth:`Repository.create_backend_interface`</span>
<span class="sd"> it also provides a method</span>
<span class="sd"> to create a backend interface</span>
<span class="sd"> to access the repository.</span>

<span class="sd"> Args:</span>
<span class="sd"> name: repository name</span>
<span class="sd"> host: repository host</span>
<span class="sd"> backend: repository backend</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; Repository(&quot;data-local&quot;, &quot;/data&quot;, &quot;file-system&quot;)</span>
<span class="sd"> Repository(&#39;data-local&#39;, &#39;/data&#39;, &#39;file-system&#39;)</span>

<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">backend_registry</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;file-system&quot;</span><span class="p">:</span> <span class="n">audbackend</span><span class="o">.</span><span class="n">backend</span><span class="o">.</span><span class="n">FileSystem</span><span class="p">,</span>
<span class="s2">&quot;artifactory&quot;</span><span class="p">:</span> <span class="n">audbackend</span><span class="o">.</span><span class="n">backend</span><span class="o">.</span><span class="n">Artifactory</span><span class="p">,</span>
<span class="p">}</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Backend registry.</span>

<span class="sd"> Holds mapping between registered backend names,</span>
<span class="sd"> and their corresponding backend classes.</span>

<span class="sd"> &quot;&quot;&quot;</span>

<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="n">name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">host</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">backend</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Repository name.&quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">host</span> <span class="o">=</span> <span class="n">host</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Repository host.&quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">backend</span> <span class="o">=</span> <span class="n">backend</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Repository backend name.&quot;&quot;&quot;</span>

<div class="viewcode-block" id="Repository.__eq__"><a class="viewcode-back" href="../../../api/audb.Repository.html#audb.Repository.__eq__">[docs]</a> <span class="k">def</span> <span class="fm">__eq__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Compare two repository instances.</span>

<span class="sd"> Args:</span>
<span class="sd"> other: repository instance</span>

<span class="sd"> Returns:</span>
<span class="sd"> ``True`` if the string representation of the repositories matches</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">==</span> <span class="nb">str</span><span class="p">(</span><span class="n">other</span><span class="p">)</span></div>

<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="c1"># noqa: D105</span>
<span class="k">return</span> <span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Repository(&quot;</span>
<span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">&#39;, &quot;</span>
<span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">host</span><span class="si">}</span><span class="s2">&#39;, &quot;</span>
<span class="sa">f</span><span class="s2">&quot;&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">backend</span><span class="si">}</span><span class="s2">&#39;&quot;</span>
<span class="sa">f</span><span class="s2">&quot;)&quot;</span>
<span class="p">)</span>

<div class="viewcode-block" id="Repository.create_backend_interface"><a class="viewcode-back" href="../../../api/audb.Repository.html#audb.Repository.create_backend_interface">[docs]</a> <span class="k">def</span> <span class="nf">create_backend_interface</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">typing</span><span class="o">.</span><span class="n">Type</span><span class="p">[</span><span class="n">audbackend</span><span class="o">.</span><span class="n">interface</span><span class="o">.</span><span class="n">Base</span><span class="p">]:</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Create backend interface to access repository.</span>

<span class="sd"> When :attr:`Repository.backend` equals ``artifactory``,</span>
<span class="sd"> it creates an instance of :class:`audbackend.backend.Artifactory`</span>
<span class="sd"> and wraps an :class:`audbackend.interface.Maven` interface</span>
<span class="sd"> around it.</span>
<span class="sd"> The files will then be stored</span>
<span class="sd"> with the following structure on the Artifactory backend</span>
<span class="sd"> (shown by the example of version 1.0.0 of the emodb dataset)::</span>

<span class="sd"> emodb/db/1.0.0/db-1.0.0.yaml &lt;-- header</span>
<span class="sd"> emodb/db/1.0.0/db-1.0.0.zip &lt;-- dependency table</span>
<span class="sd"> emodb/attachment/.../1.0.0/... &lt;-- attachments</span>
<span class="sd"> emodb/media/.../1.0.0/... &lt;-- media files</span>
<span class="sd"> emodb/meta/.../1.0.0/... &lt;-- tables</span>

<span class="sd"> When :attr:`Repository.backend` equals ``file-system``,</span>
<span class="sd"> it creates an instance of :class:`audbackend.backend.FileSystem`</span>
<span class="sd"> and wraps an :class:`audbackend.interface.Versioned` interface</span>
<span class="sd"> around it.</span>
<span class="sd"> The files will then be stored</span>
<span class="sd"> with the following structure on the Artifactory backend</span>
<span class="sd"> (shown by the example of version 1.0.0 of the emodb dataset)::</span>

<span class="sd"> emodb/1.0.0/db.yaml &lt;-- header</span>
<span class="sd"> emodb/1.0.0/db.zip &lt;-- dependency table</span>
<span class="sd"> emodb/attachment/1.0.0/... &lt;-- attachments</span>
<span class="sd"> emodb/media/1.0.0/... &lt;-- media files</span>
<span class="sd"> emodb/meta/1.0.0/... &lt;-- tables</span>

<span class="sd"> The returned backend instance</span>
<span class="sd"> has not yet established a connection to the backend.</span>
<span class="sd"> To establish a connection,</span>
<span class="sd"> use the backend with a ``with`` statement,</span>
<span class="sd"> or use the ``open()`` and ``close()`` methods of the backend class.</span>
<span class="sd"> The backend is stored as the inside the ``backend`` attribute</span>
<span class="sd"> of the returned backend interface.</span>

<span class="sd"> Returns:</span>
<span class="sd"> interface to repository</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">backend_class</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">backend_registry</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">backend</span><span class="p">]</span>
<span class="n">backend</span> <span class="o">=</span> <span class="n">backend_class</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">backend</span> <span class="o">==</span> <span class="s2">&quot;artifactory&quot;</span><span class="p">:</span>
<span class="n">interface</span> <span class="o">=</span> <span class="n">audbackend</span><span class="o">.</span><span class="n">interface</span><span class="o">.</span><span class="n">Maven</span><span class="p">(</span><span class="n">backend</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">interface</span> <span class="o">=</span> <span class="n">audbackend</span><span class="o">.</span><span class="n">interface</span><span class="o">.</span><span class="n">Versioned</span><span class="p">(</span><span class="n">backend</span><span class="p">)</span>
<span class="k">return</span> <span class="n">interface</span></div>

<div class="viewcode-block" id="Repository.register"><a class="viewcode-back" href="../../../api/audb.Repository.html#audb.Repository.register">[docs]</a> <span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">register</span><span class="p">(</span>
<span class="bp">cls</span><span class="p">,</span>
<span class="n">backend_name</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
<span class="n">backend_class</span><span class="p">:</span> <span class="n">typing</span><span class="o">.</span><span class="n">Type</span><span class="p">[</span><span class="n">audbackend</span><span class="o">.</span><span class="n">backend</span><span class="o">.</span><span class="n">Base</span><span class="p">],</span>
<span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Register backend class.</span>

<span class="sd"> Adds an entry to the dictionary</span>
<span class="sd"> stored in the class variable :data:`Repository.backend_registry`,</span>
<span class="sd"> mapping a backend name</span>
<span class="sd"> to an actual backend class.</span>

<span class="sd"> Args:</span>
<span class="sd"> backend_name: name of the backend,</span>
<span class="sd"> e.g. ``&quot;file-system&quot;``</span>
<span class="sd"> backend_class: class of the backend,</span>
<span class="sd"> that should be associated with ``backend_name``,</span>
<span class="sd"> e.g. ``&quot;audbackend.backend.Filesystem&quot;``</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; import audbackend</span>
<span class="sd"> &gt;&gt;&gt; Repository.register(&quot;file-system&quot;, audbackend.backend.FileSystem)</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">cls</span><span class="o">.</span><span class="n">backend_registry</span><span class="p">[</span><span class="n">backend_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">backend_class</span></div></div>
</pre></div>

</div>
Expand All @@ -172,7 +317,7 @@ <h1>Source code for audb.core.repository</h1><div class="highlight"><pre>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@


<div class="version">
v1.6.5
v1.7.0
</div>


Expand Down Expand Up @@ -175,7 +175,7 @@ <h1>All modules for which code is available</h1>



Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/04/02 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>
Built with <a href="https://www.sphinx-doc.org/en/master/">Sphinx</a> on 2024/05/10 using the <a href="https://github.com/audeering/sphinx-audeering-theme/">audEERING theme</a>

</p>
</div>
Expand Down
12 changes: 12 additions & 0 deletions _sources/api/audb.Repository.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ backend
-------
.. autoattribute:: Repository.backend

backend\_registry
-----------------
.. autoattribute:: Repository.backend_registry

create\_backend\_interface\(\)
------------------------------
.. automethod:: Repository.create_backend_interface

host
----
.. autoattribute:: Repository.host
Expand All @@ -22,3 +30,7 @@ name
----
.. autoattribute:: Repository.name

register\(\)
------------
.. automethod:: Repository.register

2 changes: 1 addition & 1 deletion _sources/authentication.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Authentication
Using Artifactory as backend
requires authentication.
For more information,
see :class:`audbackend.Artifactory`.
see :class:`audbackend.backend.Artifactory`.
2 changes: 1 addition & 1 deletion _sources/dependencies.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if its content hasn't changed.
We keep track of those dependencies
and store some additional metadata about the audio files
like duration and number of channels
in a dependency table in a file :file:`db.csv`
in a dependency table in a file :file:`db.parquet`
for every version of a database.

You request a :class:`audb.Dependencies` object with
Expand Down
Loading

0 comments on commit a087f1c

Please sign in to comment.