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, and REQUIREMENTS and SUBMISSION_MAIN are paths that point to existing files, and converts the values of REQUIREMENTS and SUBMISSION_MAIN to pathlib.Path. A ValueError 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:

dict