Commit f6e324a7 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

Add rank click option

parent 09a4d170
Pipeline #18438 passed with stage
in 46 minutes and 6 seconds
......@@ -311,6 +311,18 @@ def threshold_option(**kwargs):
callback=callback, show_default=True,**kwargs)(func)
return custom_threshold_option
def rank_option(**kwargs):
'''Get option for rank parameter'''
def custom_rank_option(func):
def callback(ctx, param, value):
value = 1 if value < 0 else value
ctx.meta['rank'] = value
return value
return click.option(
'--rank', type=click.INT, default=1,
help='Given threshold for metrics computations',
callback=callback, show_default=True,**kwargs)(func)
return custom_rank_option
def label_option(name_option='x_label', **kwargs):
'''Get labels options based on the given name.
Supports Markdown
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