8d4d526906bf1b5113c63efcbd526ed2311cbe66,utilities.py,,check_dependencies,#,44

Before Change


    print("{0:<15}{1:<15}{2}".format("Package", "Version", "Location"))

    // Check for symmetry
    try:
        result = subprocess.check_output("symmetry -h", stderr=subprocess.STDOUT, shell=True)
    except subprocess.CalledProcessError:
        print("{0:<30}{1}".format("symmetry", "Not found. Please install in order to use QM."))
        missing = True
    else:
        match = re.search(r"\$Revision: (\S*) \$", result.decode())
        version = match.group(1)
        if platform.system() == "Windows":
            location = subprocess.check_output("where symmetry", shell=True)
        else:
            location = subprocess.check_output("which symmetry", shell=True)

        print("{0:<15}{1:<15}{2}".format("symmetry", version, location.strip().decode()))

    // Check for RDKit
    try:
        import rdkit
        from rdkit import Chem
    except ImportError:

After Change


    print("\nChecking vital dependencies...\n")
    print("{0:<15}{1:<15}{2}".format("Package", "Version", "Location"))

    missing = {
        "lpsolve": _check_lpsolve(),
        "openbabel": _check_openbabel(),
        "pydqed": _check_pydqed(),
        "pyrdl": _check_pyrdl(),
        "rdkit": _check_rdkit(),
        "symmetry": _check_symmetry(),
    }

    if any(missing.values()):
        print(
There are missing dependencies as listed above. Please install them before proceeding.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: ReactionMechanismGenerator/RMG-Py
Commit Name: 8d4d526906bf1b5113c63efcbd526ed2311cbe66
Time: 2019-08-29
Author: mjliu@mit.edu
File Name: utilities.py
Class Name:
Method Name: check_dependencies


Project Name: GPflow/GPflow
Commit Name: 7560936f09755b3fafe03ae1c5ccebb3c93984b6
Time: 2020-05-12
Author: st--@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:


Project Name: scikit-learn/scikit-learn
Commit Name: f1acf834685f8bcd1bcdd903e9c40b7515fe0a67
Time: 2020-03-06
Author: wderose@paypal.com
File Name: sklearn/ensemble/_stacking.py
Class Name: _BaseStacking
Method Name: fit


Project Name: r9y9/wavenet_vocoder
Commit Name: ee5e88bc0446986f6bc74080835e0566856d0e79
Time: 2019-09-07
Author: zryuichi@gmail.com
File Name: setup.py
Class Name:
Method Name: