From 14795fe255c41b6bf690c3e61ba5b7ae8c162584 Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Sun, 5 Feb 2023 13:22:54 +0100 Subject: [PATCH] [py] Revert dataset_protocols_category to category --- src/bob/pipelines/dataset/database.py | 4 ++-- tests/test_database.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bob/pipelines/dataset/database.py b/src/bob/pipelines/dataset/database.py index 93da39b..2ea4653 100644 --- a/src/bob/pipelines/dataset/database.py +++ b/src/bob/pipelines/dataset/database.py @@ -245,8 +245,8 @@ class FileListDatabase: # Save to bob_data/protocols, or if present, in a category sub directory. subdir = Path("protocols") - if hasattr(cls, "dataset_protocols_category"): - subdir = subdir / getattr(cls, "dataset_protocols_category") + if hasattr(cls, "category"): + subdir = subdir / getattr(cls, "category") # Retrieve the file from the server (or use the local version). return retrieve_protocols( diff --git a/tests/test_database.py b/tests/test_database.py index f4f68d7..b840546 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -122,11 +122,11 @@ def test_filelist_class(monkeypatch): class DBDownloadCustomCategory(FileListDatabase): name = "atnt" + category = desired_category dataset_protocols_checksum = "f529acef" dataset_protocols_urls = [ "https://www.idiap.ch/software/bob/databases/latest/base/atnt-f529acef.tar.gz" ] - dataset_protocols_category = desired_category assert DBDownloadCustomCategory.protocols() == ["idiap_protocol"] assert ( -- GitLab