Commit 6e27ff88 authored by Aidan Richard Wiederhold's avatar Aidan Richard Wiederhold
Browse files

Merge branch 'aiwieder/post_test_validation' into 'master'

Pass job_name to post-test validation instead of job_data.

See merge request !46
parents 1261e32c 8830e788
Pipeline #3443514 passed with stages
in 2 minutes and 16 seconds
......@@ -16,14 +16,14 @@ import uproot
from LbAPCommon.parsing import is_simulation_job
def validate_options(json_file: str, ntuple_fn: str, job_data: dict, prod_data: dict):
def validate_options(json_file: str, ntuple_fn: str, job_name: str, prod_data: dict):
"""
Validate existence of expected TTrees and ensure at least one
DecayTree and MCDecayTree (for MC samples) exists in output files
:param json_file: json_file listing the expected TTrees
:param ntuple_fn: Local test output tuple to validate against
:param job_data: Job specific setup information from yaml parsing
:param job_name: Name of job to validate
:param prod_data: Entire production information from yaml parsing
:returns: Errors if any expected TTrees are not found in job output,
warnings if at least one (MC)DecayTree isn't found in job output
......@@ -48,7 +48,7 @@ def validate_options(json_file: str, ntuple_fn: str, job_data: dict, prod_data:
"No DecayTree detected in the output file! Is this intentional?"
)
if is_simulation_job(prod_data, job_data["name"]) and not mc_decay_tree:
if is_simulation_job(prod_data, job_name) and not mc_decay_tree:
warnings.append(
"No MCDecayTree detected in the output file! Is this intentional?"
)
......
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