workflows.utils.print_json_as_env.validate_pr_config#
- workflows.utils.print_json_as_env.validate_pr_config(submissions_root_path, pr_config_json)#
Validates that
RUN_SCORER
is a Boolean, andREQUIREMENTS
andSUBMISSION_MAIN
are paths that point to existing files, and converts the values ofREQUIREMENTS
andSUBMISSION_MAIN
topathlib.Path
. AValueError
is raised if the validation fails.- Parameters:
submissions_root_path (pathlib.Path) – The path to the directory containing the pr_config.json
pr_config_json (dict) – A dictionary from environment variable names to their values.
- Returns:
A validated mapping from environment variables to to their values.
- Return type: