Commit 84d05c14 authored by Chris Burr's avatar 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
......@@ -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",
)
......
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