Skip to content

Commit

Permalink
Adding loader for acoustic brainz genre dataset (#318)
Browse files Browse the repository at this point in the history
* first commit

* make index

* make index

* marius proposal make

* first prototype loader

* merge

* add tonal, rythm, low level descriptors and metadata

* add acoustic brainz test index

* Alastair nits

* first commit

* merge

* add tonal, rythm, low level descriptors and metadata

* add acoustic brainz test index

* make index

* first prototype loader

* Alastair nits

* refactor things cause of merge

* git upload to new structure

* added comments and REMOTES

* new _download method

* add to--init-- dataset

* add Remote INDEX

* add Remote INDEX

* fix _download

* fix _download

* print por tar

* add to untar bz2

* add breakpoint  download

* remove breakpoint and fix _download

* breakpoint _download

* fix _download

* edit _download

* fix download

* fix download

* fix download

* fix download

* fix download

* fix download

* fix download

* fix remotes

* fix track

* fix     if not os.path.exists(save_dir):
        os.makedirs(save_dir)

* clean download function

* rm v. 0.2 files

* add fist prototype tests

* all tests except download()

* download test finished

* fix tests

* fix tests

* update index

* fix bug

* fix remote

* fix sha

* making lighter filter test

* fix test download from local

* test track remote index from local

* test jam remote index from local

* fix own tests

* test_dataset_attributes first version remotes from local

* test_dataset_attributes refactor

* refactor filter

* refactor test_track

* finish tests

* add documentation

* test circleci

* test circleci 2

* test circleci 3

* test circleci 4

* test circleci 5

* test circleci 6

* test circleci 7

* test circleci 8

* test circleci 9

* test circleci 10

* test circleci 12

* test circleci 13

* test circleci 14

* test circleci 15

* test circleci 15

* test circleci 16

* test circleci 17

* test circleci 18

* test circleci 19

* test circleci 20

* test circleci 21

* test circleci 22

* test circleci 23

* fixed test loaders

* Update datasets.rst

* fixed merge

* Update datasets.rst

Co-authored-by: Magdalena Fuentes <[email protected]>
  • Loading branch information
PRamoneda and magdalenafuentes authored Dec 12, 2020
1 parent 68d385d commit 881f30a
Show file tree
Hide file tree
Showing 16 changed files with 217,340 additions and 246 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ See the Examples section below for more details, or the [documentation](https://

### Currently supported datasets

* [AcousticBrainz genre](https://zenodo.org/record/2553414#.X8jTgulKhhE)
* [Beatles](http://isophonics.net/content/reference-annotations-beatles)
* [Beatport EDM key](https://zenodo.org/record/1101082/export/xd#.X4NCfC3FQUE)
* [cante100](http://www.cofla-project.com/?page_id=529&lang=es)
Expand Down
187 changes: 91 additions & 96 deletions docs/source/datasets.rst

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docs/source/mirdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ API documentation
Datasets
--------

ab_genre
^^^^^^^

.. automodule:: mirdata.datasets.acousticbrainz_genre
:members:

beatles
^^^^^^^

Expand Down
1 change: 1 addition & 0 deletions mirdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .version import version as __version__

DATASETS = [
"acousticbrainz_genre",
"beatles",
"beatport_key",
"cante100",
Expand Down
4 changes: 2 additions & 2 deletions mirdata/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Dataset(object):
"""

def __init__(self, dataset, data_home=None):
def __init__(self, dataset, data_home=None, index=None):
"""Inits a dataset by name and data location"""
if dataset not in DATASETS:
raise ValueError(
Expand All @@ -50,7 +50,7 @@ def __init__(self, dataset, data_home=None):
self.name = dataset
self.bibtex = getattr(module, "BIBTEX", None)
self._remotes = getattr(module, "REMOTES", None)
self._index = module.DATA.index
self._index = module.DATA.index if index is None else index
self._download_info = getattr(module, "DOWNLOAD_INFO", None)
self._track_object = getattr(module, "Track", None)
self._download_fn = getattr(module, "_download", download_utils.downloader)
Expand Down
Loading

0 comments on commit 881f30a

Please sign in to comment.