Skip to content
Snippets Groups Projects
Commit 14795fe2 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

[py] Revert dataset_protocols_category to category

parent b01323a2
Branches
Tags
1 merge request!109Add a way to retrieve protocol definition files
...@@ -245,8 +245,8 @@ class FileListDatabase: ...@@ -245,8 +245,8 @@ class FileListDatabase:
# Save to bob_data/protocols, or if present, in a category sub directory. # Save to bob_data/protocols, or if present, in a category sub directory.
subdir = Path("protocols") subdir = Path("protocols")
if hasattr(cls, "dataset_protocols_category"): if hasattr(cls, "category"):
subdir = subdir / getattr(cls, "dataset_protocols_category") subdir = subdir / getattr(cls, "category")
# Retrieve the file from the server (or use the local version). # Retrieve the file from the server (or use the local version).
return retrieve_protocols( return retrieve_protocols(
......
...@@ -122,11 +122,11 @@ def test_filelist_class(monkeypatch): ...@@ -122,11 +122,11 @@ def test_filelist_class(monkeypatch):
class DBDownloadCustomCategory(FileListDatabase): class DBDownloadCustomCategory(FileListDatabase):
name = "atnt" name = "atnt"
category = desired_category
dataset_protocols_checksum = "f529acef" dataset_protocols_checksum = "f529acef"
dataset_protocols_urls = [ dataset_protocols_urls = [
"https://www.idiap.ch/software/bob/databases/latest/base/atnt-f529acef.tar.gz" "https://www.idiap.ch/software/bob/databases/latest/base/atnt-f529acef.tar.gz"
] ]
dataset_protocols_category = desired_category
assert DBDownloadCustomCategory.protocols() == ["idiap_protocol"] assert DBDownloadCustomCategory.protocols() == ["idiap_protocol"]
assert ( assert (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment