Commit b05d2d72 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Context setting moved to bob.extension

parent 647700e5
Pipeline #21469 canceled with stage
in 13 seconds
...@@ -8,10 +8,11 @@ import matplotlib.pyplot as plt ...@@ -8,10 +8,11 @@ import matplotlib.pyplot as plt
import tabulate import tabulate
from matplotlib.backends.backend_pdf import PdfPages from matplotlib.backends.backend_pdf import PdfPages
from bob.extension.scripts.click_helper import ( from bob.extension.scripts.click_helper import (
bool_option, list_float_option, verbosity_option, open_file_mode_option) bool_option, list_float_option, verbosity_option, open_file_mode_option,
CONTEXT_SETTINGS
)
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
CONTEXT_SETTINGS = dict(help_option_names=['-?', '-h', '--help'])
def scores_argument(min_arg=1, force_eval=False, **kwargs): def scores_argument(min_arg=1, force_eval=False, **kwargs):
"""Get the argument for scores, and add `dev-scores` and `eval-scores` in """Get the argument for scores, and add `dev-scores` and `eval-scores` in
......
...@@ -5,10 +5,10 @@ import logging ...@@ -5,10 +5,10 @@ import logging
import numpy import numpy
import click import click
from click.types import FLOAT from click.types import FLOAT
from bob.extension.scripts.click_helper import verbosity_option from bob.extension.scripts.click_helper import (verbosity_option,
CONTEXT_SETTINGS)
from bob.core import random from bob.core import random
from bob.io.base import create_directories_safe from bob.io.base import create_directories_safe
from . import common_options
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -74,7 +74,7 @@ def write_scores_to_file(neg, pos, filename): ...@@ -74,7 +74,7 @@ def write_scores_to_file(neg, pos, filename):
f.write(text) f.write(text)
@click.command(context_settings=common_options.CONTEXT_SETTINGS) @click.command(context_settings=CONTEXT_SETTINGS)
@click.argument('outdir') @click.argument('outdir')
@click.option('--mean-neg', default=-1, type=FLOAT, show_default=True) @click.option('--mean-neg', default=-1, type=FLOAT, show_default=True)
@click.option('--mean-pos', default=1, type=FLOAT, show_default=True) @click.option('--mean-pos', default=1, type=FLOAT, show_default=True)
......
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