From 2b0dd8d5232ddcba849526cfaabb0b9af9d35007 Mon Sep 17 00:00:00 2001
From: Tiago Freitas Pereira <tiagofrepereira@gmail.com>
Date: Tue, 7 Jul 2020 14:41:58 +0200
Subject: [PATCH] Added vanilla-biometrics baselines

---
 bob/bio/base/script/resources.py | 28 ++++------------------------
 bob/bio/base/utils/resources.py  |  2 +-
 setup.py                         |  1 +
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/bob/bio/base/script/resources.py b/bob/bio/base/script/resources.py
index f8f56451..700e505a 100644
--- a/bob/bio/base/script/resources.py
+++ b/bob/bio/base/script/resources.py
@@ -9,8 +9,8 @@ def resources(command_line_parameters = None):
   import argparse
   parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
   parser.add_argument("--types", '-t', nargs = '+',
-                      choices = ('d', 'database', 'p', 'preprocessor', 'e', 'extractor', 'a', 'algorithm', 'g', 'grid', 'c', 'config', 'an', 'annotator', 'b', 'baseline'),
-                      default = ('d', 'p', 'e', 'a', 'g', 'c', 'an', 'b'),
+                      choices = ('d', 'database', 'an', 'annotator', 'p', 'pipeline'),
+                      default = ('d', 'an', 'b'),
                       help = "Select the resource types that should be listed.")
 
   parser.add_argument("--details", '-d', action='store_true', help = "Prints the complete configuration for all resources")
@@ -31,33 +31,13 @@ def resources(command_line_parameters = None):
     print ("\nList of registered databases:")
     print (bob.bio.base.list_resources('database', **kwargs))
 
-  if 'p' in args.types or 'preprocessor' in args.types:
-    print ("\nList of registered preprocessors:")
-    print (bob.bio.base.list_resources('preprocessor', **kwargs))
-
-  if 'e' in args.types or 'extractor' in args.types:
-    print ("\nList of registered extractors:")
-    print (bob.bio.base.list_resources('extractor', **kwargs))
-
-  if 'a' in args.types or 'algorithm' in args.types:
-    print ("\nList of registered algorithms:")
-    print (bob.bio.base.list_resources('algorithm', **kwargs))
-
-  if 'g' in args.types or 'grid' in args.types:
-    print ("\nList of registered grid configurations:")
-    print (bob.bio.base.list_resources('grid', **kwargs))
-
-  if 'c' in args.types or 'config' in args.types:
-    print ("\nList of registered configurations:")
-    print (bob.bio.base.list_resources('config', **kwargs))
-
   if 'an' in args.types or 'annotator' in args.types:
     print ("\nList of registered annotators:")
     print (bob.bio.base.list_resources('annotator', **kwargs))
 
-  if 'b' in args.types or 'baseline' in args.types:
+  if 'p' in args.types or 'pipeline' in args.types:
     print ("\nList of registered baseline:")
-    print (bob.bio.base.list_resources('baseline', **kwargs))
+    print (bob.bio.base.list_resources('pipeline', **kwargs))
 
   print()
 
diff --git a/bob/bio/base/utils/resources.py b/bob/bio/base/utils/resources.py
index 7790290c..cb2d4e68 100644
--- a/bob/bio/base/utils/resources.py
+++ b/bob/bio/base/utils/resources.py
@@ -20,7 +20,7 @@ logger = logging.getLogger("bob.bio.base")
 
 
 #: Keywords for which resources are defined.
-valid_keywords = ('database', 'preprocessor', 'extractor', 'algorithm', 'grid', 'config', 'annotator', 'baseline')
+valid_keywords = ('database', 'preprocessor', 'extractor', 'algorithm', 'grid', 'config', 'annotator', 'baseline', 'pipeline')
 
 
 def _collect_config(paths):
diff --git a/setup.py b/setup.py
index 70ff0ebe..0aa9519c 100644
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,7 @@ setup(
 
       # scripts should be declared using this entry:
       'console_scripts' : [
+          'resources.py      = bob.bio.base.script.resources:resources',
       ],
 
       'bob.bio.config': [
-- 
GitLab