Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.measure
Commits
f6e324a7
There was a problem fetching the pipeline summary.
Commit
f6e324a7
authored
7 years ago
by
Theophile GENTILHOMME
Browse files
Options
Downloads
Patches
Plain Diff
Add rank click option
parent
09a4d170
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!54
Refactors the score loading and scripts functionality
,
!52
generic plotting script for bob measure
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/measure/script/common_options.py
+12
-0
12 additions, 0 deletions
bob/measure/script/common_options.py
with
12 additions
and
0 deletions
bob/measure/script/common_options.py
+
12
−
0
View file @
f6e324a7
...
@@ -311,6 +311,18 @@ def threshold_option(**kwargs):
...
@@ -311,6 +311,18 @@ def threshold_option(**kwargs):
callback
=
callback
,
show_default
=
True
,
**
kwargs
)(
func
)
callback
=
callback
,
show_default
=
True
,
**
kwargs
)(
func
)
return
custom_threshold_option
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
):
def
label_option
(
name_option
=
'
x_label
'
,
**
kwargs
):
'''
Get labels options based on the given name.
'''
Get labels options based on the given name.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment