Commit bafb5b7c authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Change option key to

parent 235c8da6
Pipeline #19413 passed with stage
in 43 minutes and 58 seconds
......@@ -182,7 +182,7 @@ def hist(ctx, scores, evaluation, **kwargs):
$ bob measure hist dev-scores1 eval-scores1 dev-scores2
eval-scores2
$ bob measure hist --criter hter --show-dev dev-scores1 eval-scores1
$ bob measure hist --criterion hter --show-dev dev-scores1 eval-scores1
"""
process = figure.Hist(ctx, scores, evaluation, load.split)
process.run()
......
......@@ -250,13 +250,13 @@ def criterion_option(lcriteria=['eer', 'hter', 'far'], **kwargs):
list_accepted_crit = lcriteria if lcriteria is not None else \
['eer', 'hter', 'far']
if value not in list_accepted_crit:
raise click.BadParameter('Incorrect value for `--criter`. '
raise click.BadParameter('Incorrect value for `--criterion`. '
'Must be one of [`%s`]' %
'`, `'.join(list_accepted_crit))
ctx.meta['criter'] = value
return value
return click.option(
'--criter', default='eer', help='Criterion to compute plots and '
'--criterion', default='eer', help='Criterion to compute plots and '
'metrics: `eer` (default), `hter`',
callback=callback, is_eager=True ,**kwargs)(func)
return custom_criterion_option
......
......@@ -130,7 +130,7 @@ def test_hist():
assert result.exit_code == 0, (result.exit_code, result.output)
with runner.isolated_filesystem():
result = runner.invoke(commands.hist, ['--no-evaluation', '--criter', 'hter',
result = runner.invoke(commands.hist, ['--no-evaluation', '--criterion', 'hter',
'--output', 'HISTO.pdf', '-b',
30, dev1, dev2])
if result.output:
......@@ -138,7 +138,7 @@ def test_hist():
assert result.exit_code == 0, (result.exit_code, result.output)
with runner.isolated_filesystem():
result = runner.invoke(commands.hist, ['--criter', 'eer','--output',
result = runner.invoke(commands.hist, ['--criterion', 'eer','--output',
'HISTO.pdf', '-b', 30,
dev1, test1, dev2, test2])
if result.output:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment