Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lhcb-dpa
Analysis Productions
LbAPLocal
Commits
84d05c14
Commit
84d05c14
authored
Mar 08, 2022
by
Chris Burr
Browse files
Merge branch 'aiwieder/ci_checks' into 'master'
Add index for job to check in ci_checks See merge request
!49
parents
619f0b68
31fcda70
Pipeline
#3672765
passed with stages
in 5 minutes and 23 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
src/LbAPLocal/cli.py
View file @
84d05c14
...
...
@@ -346,23 +346,26 @@ def check(production_name, job_name, test_ntuple_path, checks_output_dir, valida
@
click
.
argument
(
"checks_data_file"
,
type
=
str
,
nargs
=
1
)
@
click
.
argument
(
"input_ntuple"
,
type
=
str
,
nargs
=
1
)
@
click
.
argument
(
"output_dir"
,
type
=
str
,
nargs
=
1
)
def
ci_checks
(
checks_data_file
,
input_ntuple
,
output_dir
):
@
click
.
argument
(
"job_index"
,
type
=
int
,
nargs
=
1
)
def
ci_checks
(
checks_data_file
:
str
,
input_ntuple
:
str
,
output_dir
:
str
,
job_index
:
int
):
"""Helper function for running checks in the CI. This is not recommended for users."""
click
.
secho
(
"Starting checks!"
,
fg
=
"green"
)
with
open
(
checks_data_file
,
"r"
)
as
inf
:
test_info
=
json
.
load
(
inf
)
check_results
=
run_job_checks
(
test_info
[
"jobs"
][
0
][
"checks"
],
test_info
[
"jobs"
][
0
][
"checks_data"
],
test_info
[
"jobs"
][
job_index
][
"checks"
],
test_info
[
"jobs"
][
job_index
][
"checks_data"
],
[
input_ntuple
],
)
hist_to_root
(
test_info
[
"jobs"
][
0
][
"name"
],
check_results
,
f
"
{
output_dir
}
/checks.root"
test_info
[
"jobs"
][
job_index
][
"name"
],
check_results
,
f
"
{
output_dir
}
/checks.root"
)
check_results
=
{
test_info
[
"jobs"
][
0
][
"name"
]:
check_results
}
check_results
=
{
test_info
[
"jobs"
][
job_index
][
"name"
]:
check_results
}
checks_to_JSON
(
test_info
[
"jobs"
][
0
][
"checks_data"
],
test_info
[
"jobs"
][
job_index
][
"checks_data"
],
check_results
,
json_output_path
=
f
"
{
output_dir
}
/checks.json"
,
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment