def pr_build_setup()

in src/utils.py [0:0]


def pr_build_setup(pr_number, framework):
    """
    Identify the PR changeset and set the appropriate environment
    variables
    Args:
        pr_number: int
        framework : str

    Returns:
        device_types: [str]
        image_types: [str]
        py_versions: [str]
    """
    files = get_pr_modified_files(pr_number)

    # This below code currently appends the values to device_types, image_types, py_versions for files changed
    # if there are no changes in the files then functions return same lists
    parse_modified_docker_files_info(files, framework, pattern="\S+Dockerfile\S+")

    parse_modified_sagemaker_test_files(
        files, framework, pattern="sagemaker_tests\/\S+"
    )

    # The below functions are only run if all JobParameters variables are not set with constants.ALL
    parse_modified_dlc_test_files_info(files, framework, pattern="dlc_tests\/\S+")

    # The below code currently overides the device_types, image_types, py_versions with constants.ALL
    # when there is a change in any the below files
    parse_modifed_buidspec_yml_info(files, framework, pattern="\S+\/buildspec.*yml")

    parse_modifed_root_files_info(files, pattern="src\/\S+")

    parse_modifed_root_files_info(
        files, pattern="(?:test\/(?!(dlc_tests|sagemaker_tests))\S+)"
    )

    parse_modifed_root_files_info(files, pattern="testspec\.yml")

    return (
        JobParameters.device_types,
        JobParameters.image_types,
        JobParameters.py_versions,
    )