e7202d5b855714c2ef2b45c74b7258e7c7ac233e,qcengine/compute.py,,compute,#Any#Any#Any#Any#Any#,25

Before Change


        try:
            output_data = get_program(program).compute(input_data, config)
        except KeyError as e:
            output_data = FailedOperation(
                input_data=output_data.dict(),
                success=False,
                error=ComputeError(
                    error_type="program_error",
                    error_message="QCEngine Call Error:\nProgram {} not understood."
                    "\nError Message: {}".format(program, str(e))))

    return handle_output_metadata(output_data, metadata, raise_error=raise_error, return_dict=return_dict)

After Change



    

    program = program.lower()
    if program not in list_all_programs():
        input_data = FailedOperation(
            input_data=input_data,
            error=ComputeError(
                error_type="not_registered",
                error_message="QCEngine Call Error:\n"
                "Program {} is not registered with QCEngine".format(program)))
    elif program not in list_available_programs():
        input_data = FailedOperation(
            input_data=input_data,
            error=ComputeError(
                error_type="not_available",
                error_message="QCEngine Call Error:\n"
                "Program {} is registered with QCEngine, but cannot be found".format(program)))
    error = _process_failure_and_return(input_data, return_dict, raise_error)
    if error:
        return error

    // Build the model and validate
    input_data = model_wrapper(input_data, ResultInput)
    error = _process_failure_and_return(input_data, return_dict, raise_error)
    if error:
        return error
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: MolSSI/QCEngine
Commit Name: e7202d5b855714c2ef2b45c74b7258e7c7ac233e
Time: 2019-03-07
Author: malorian@me.com
File Name: qcengine/compute.py
Class Name:
Method Name: compute


Project Name: comic/grand-challenge.org
Commit Name: b96135c218065188be9dfe1fea1dff76b6f66e4f
Time: 2019-02-26
Author: code@jmsmkn.com
File Name: app/grandchallenge/container_exec/tasks.py
Class Name:
Method Name: validate_docker_image_async


Project Name: has2k1/plotnine
Commit Name: b963d528e3abd5084cbed4ee2d1ceaad245c42f4
Time: 2015-09-16
Author: has2k1@gmail.com
File Name: ggplot/utils/palettes.py
Class Name:
Method Name: color_palette