Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pipelines
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.pipelines
Commits
14795fe2
Commit
14795fe2
authored
2 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Patches
Plain Diff
[py] Revert dataset_protocols_category to category
parent
b01323a2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!109
Add a way to retrieve protocol definition files
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bob/pipelines/dataset/database.py
+2
-2
2 additions, 2 deletions
src/bob/pipelines/dataset/database.py
tests/test_database.py
+1
-1
1 addition, 1 deletion
tests/test_database.py
with
3 additions
and
3 deletions
src/bob/pipelines/dataset/database.py
+
2
−
2
View file @
14795fe2
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
tests/test_database.py
+
1
−
1
View file @
14795fe2
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment