From 4585d6cf74c7255ee918f0bb156ef7f1ad930eb5 Mon Sep 17 00:00:00 2001 From: Theophile GENTILHOMME <tgentilhomme@jurasix08.idiap.ch> Date: Mon, 30 Apr 2018 16:40:19 +0200 Subject: [PATCH] Modifications related to change of option name titles->legends --- bob/bio/base/script/commands.py | 16 ++++++++-------- bob/bio/base/script/figure.py | 2 +- bob/bio/base/test/test_commands.py | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bob/bio/base/script/commands.py b/bob/bio/base/script/commands.py index 2a9bde19..5b6a3048 100644 --- a/bob/bio/base/script/commands.py +++ b/bob/bio/base/script/commands.py @@ -31,7 +31,7 @@ def rank_option(**kwargs): @common_options.cost_option() @common_options.thresholds_option() @common_options.far_option() -@common_options.titles_option() +@common_options.legends_option() @open_file_mode_option() @verbosity_option() @click.pass_context @@ -67,7 +67,7 @@ def metrics(ctx, scores, evaluation, **kargs): @click.command() @common_options.scores_argument(nargs=-1) -@common_options.titles_option() +@common_options.legends_option() @common_options.sep_dev_eval_option() @common_options.output_plot_file_option(default_out='roc.pdf') @common_options.eval_option() @@ -110,7 +110,7 @@ def roc(ctx, scores, evaluation, **kargs): @click.command() @common_options.scores_argument(nargs=-1) @common_options.output_plot_file_option(default_out='det.pdf') -@common_options.titles_option() +@common_options.legends_option() @common_options.x_label_option() @common_options.y_label_option() @common_options.sep_dev_eval_option() @@ -150,7 +150,7 @@ def det(ctx, scores, evaluation, **kargs): @click.command() @common_options.scores_argument(min_arg=1, force_eval=True, nargs=-1) @common_options.output_plot_file_option(default_out='epc.pdf') -@common_options.titles_option() +@common_options.legends_option() @common_options.points_curve_option() @common_options.const_layout_option() @common_options.style_option() @@ -178,7 +178,7 @@ def epc(ctx, scores, **kargs): @click.command() @common_options.scores_argument(nargs=-1) -@common_options.titles_option() +@common_options.legends_option() @common_options.sep_dev_eval_option() @common_options.output_plot_file_option(default_out='cmc.pdf') @common_options.eval_option() @@ -218,7 +218,7 @@ def cmc(ctx, scores, evaluation, **kargs): @click.command() @common_options.scores_argument(nargs=-1) -@common_options.titles_option() +@common_options.legends_option() @common_options.sep_dev_eval_option() @common_options.output_plot_file_option(default_out='cmc.pdf') @common_options.eval_option() @@ -275,7 +275,7 @@ def dir(ctx, scores, evaluation, **kargs): @common_options.const_layout_option() @common_options.show_dev_option() @common_options.print_filenames_option() -@common_options.titles_option() +@common_options.legends_option() @common_options.style_option() @common_options.figsize_option() @verbosity_option() @@ -309,7 +309,7 @@ def hist(ctx, scores, evaluation, **kwargs): @click.command() @common_options.scores_argument(nargs=-1) -@common_options.titles_option() +@common_options.legends_option() @common_options.sep_dev_eval_option() @common_options.table_option() @common_options.eval_option() diff --git a/bob/bio/base/script/figure.py b/bob/bio/base/script/figure.py index 31156f45..7f93ef7a 100644 --- a/bob/bio/base/script/figure.py +++ b/bob/bio/base/script/figure.py @@ -113,7 +113,7 @@ class Metrics(measure_figure.Metrics): def compute(self, idx, input_scores, input_names): ''' Compute metrics for the given criteria''' - title = self._titles[idx] if self._titles is not None else None + title = self._legends[idx] if self._legends is not None else None headers = ['' or title, 'Development %s' % input_names[0]] if self._eval and input_scores[1] is not None: headers.append('eval % s' % input_names[1]) diff --git a/bob/bio/base/test/test_commands.py b/bob/bio/base/test/test_commands.py index c834a52d..0d617651 100644 --- a/bob/bio/base/test/test_commands.py +++ b/bob/bio/base/test/test_commands.py @@ -32,7 +32,7 @@ def test_metrics(): with runner.isolated_filesystem(): result = runner.invoke( - commands.metrics, ['-l', 'tmp', '-ts', 'A,B', + commands.metrics, ['-l', 'tmp', '-ls', 'A,B', dev1, test1, dev2, test2] ) assert result.exit_code == 0, (result.exit_code, result.output) @@ -112,7 +112,7 @@ def test_roc(): with runner.isolated_filesystem(): result = runner.invoke(commands.roc, ['--output', - 'test.pdf', '--titles', 'A,B', + 'test.pdf', '--legends', 'A,B', dev1, test1, dev2, test2]) if result.output: click.echo(result.output) @@ -136,7 +136,7 @@ def test_det(): 'data/test-5col.txt') with runner.isolated_filesystem(): result = runner.invoke(commands.det, ['--split', '--output', - 'test.pdf', '--titles', 'A,B', + 'test.pdf', '--legends', 'A,B', dev1, test1, dev2, test2]) if result.output: click.echo(result.output) @@ -166,7 +166,7 @@ def test_epc(): 'data/test-5col.txt') with runner.isolated_filesystem(): result = runner.invoke(commands.epc, ['--output', 'test.pdf', - '--titles', 'A,B', + '--legends', 'A,B', dev1, test1, dev2, test2]) if result.output: click.echo(result.output) @@ -199,7 +199,7 @@ def test_hist(): with runner.isolated_filesystem(): result = runner.invoke(commands.hist, ['--criterion', 'eer', '--output', 'HISTO.pdf', '-b', '30', - '-ts', 'A,B', dev1, test1, dev2, + '-ls', 'A,B', dev1, test1, dev2, test2]) if result.output: click.echo(result.output) @@ -218,7 +218,7 @@ def test_cmc(): 'data/scores-cmc-4col.txt') with runner.isolated_filesystem(): result = runner.invoke(commands.cmc, ['--output', 'test.pdf', - '--titles', 'A,B', + '--legends', 'A,B', dev1, test1, dev1, test1]) if result.output: click.echo(result.output) @@ -237,7 +237,7 @@ def test_dir(): 'data/scores-nonorm-openset-dev') with runner.isolated_filesystem(): result = runner.invoke(commands.dir, ['--output', 'test.pdf', - '--titles', 'A,B', + '--legends', 'A,B', dev1, test1, dev1, test1]) if result.output: click.echo(result.output) -- GitLab