Skip to content

Commit

Permalink
Add MinIO support with audbackend>=2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Oct 31, 2024
1 parent e86059a commit 4fe0dd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions audb/core/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class Repository:
"""

backend_registry = {
"file-system": audbackend.backend.FileSystem,
"artifactory": audbackend.backend.Artifactory,
"file-system": audbackend.backend.FileSystem,
"minio": audbackend.backend.Minio,
}
r"""Backend registry.
Expand Down Expand Up @@ -74,8 +75,7 @@ def create_backend_interface(self) -> type[audbackend.interface.Base]:
r"""Create backend interface to access repository.
When :attr:`Repository.backend` equals ``artifactory``,
it creates an instance of :class:`audbackend.backend.Artifactory`
and wraps an :class:`audbackend.interface.Maven` interface
it wraps an :class:`audbackend.interface.Maven` interface
around it.
The files will then be stored
with the following structure on the Artifactory backend
Expand All @@ -87,12 +87,11 @@ def create_backend_interface(self) -> type[audbackend.interface.Base]:
emodb/media/.../1.0.0/... <-- media files
emodb/meta/.../1.0.0/... <-- tables
When :attr:`Repository.backend` equals ``file-system``,
it creates an instance of :class:`audbackend.backend.FileSystem`
and wraps an :class:`audbackend.interface.Versioned` interface
Otherwise,
it wraps an :class:`audbackend.interface.Versioned` interface
around it.
The files will then be stored
with the following structure on the Artifactory backend
with the following structure on the backend
(shown by the example of version 1.0.0 of the emodb dataset)::
emodb/1.0.0/db.yaml <-- header
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
]
requires-python = '>=3.9'
dependencies = [
'audbackend[artifactory] >=2.0.0',
'audbackend[all] @ git+https://github.com/audeering/audbackend.git@main',
'audeer >=2.1.0',
'audformat >=1.2.0',
'audiofile >=1.0.0',
Expand Down

0 comments on commit 4fe0dd5

Please sign in to comment.