Skip to content

Commit

Permalink
feat: rename load_specific_dataset to load_dataset;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed May 13, 2022
1 parent 07ed038 commit cbd9d56
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ or install from source code:
```python
import tsdb

tsdb.list_available_datasets() # list all available datasets in TSDB
data = tsdb.load_specific_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically
data = tsdb.load_dataset('physionet_2012') # select the dataset you need and load it, TSDB will download, extract, and process it automatically
tsdb.download_and_extract('physionet_2012', './save_it_here') # if you need the raw data, use download_and_extract()
tsdb.list_cached_data() # datasets you once loaded are cached, and you can check them with list_cached_data()
tsdb.delete_cached_data() # you can delete all cache with delete_cached_data() to free disk space
Expand Down
2 changes: 1 addition & 1 deletion tsdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .data_processing import (
window_truncate,
download_and_extract,
load_specific_dataset,
load_dataset,
delete_cached_data,
list_cached_data,
CACHED_DATASET_DIR,
Expand Down
2 changes: 1 addition & 1 deletion tsdb/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def pickle_load(path):
return data


def load_specific_dataset(dataset_name, use_cache=True):
def load_dataset(dataset_name, use_cache=True):
""" Load dataset with given name.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion tsdb/tests/test_tsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_available_datasets(self):

def test_dataset_loading(self):
for d_ in DATASETS_TO_TEST:
data = tsdb.load_specific_dataset(d_)
data = tsdb.load_dataset(d_)
assert isinstance(data, dict)

def test_downloading_only(self):
Expand Down

0 comments on commit cbd9d56

Please sign in to comment.