5557a2e4143f7ec707daf9ae094db84eb91b9d1b,tools/nni_cmd/command_utils.py,,install_package_command,#Any#,38

Before Change


def install_package_command(package_name):
    """install python package from pip"""
    //TODO refactor python logic
    if sys.platform == "win32":
        cmds = "python -m pip install --user {0}".format(package_name)
    else:
        cmds = "python3 -m pip install --user {0}".format(package_name)
    call(cmds, shell=True)

def install_requirements_command(requirements_path):
    """install requirements.txt"""

After Change


    package_name: str
        The name of package to be installed.
    
    call(_get_pip_install() + [package_name], shell=False)


def install_requirements_command(requirements_path):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: Microsoft/nni
Commit Name: 5557a2e4143f7ec707daf9ae094db84eb91b9d1b
Time: 2019-10-22
Author: v-yugzh@microsoft.com
File Name: tools/nni_cmd/command_utils.py
Class Name:
Method Name: install_package_command


Project Name: vatlab/SoS
Commit Name: 55d3c75b0bb9798ede66925f95b2b104da2f170e
Time: 2017-10-18
Author: ben.bog@gmail.com
File Name: test/test_task.py
Class Name:
Method Name:


Project Name: vatlab/SoS
Commit Name: ad3a1023dcc2db26593a971320c8d480ae2b58fd
Time: 2017-06-27
Author: ben.bog@gmail.com
File Name: test/rq/test_rq_queue.py
Class Name:
Method Name:


Project Name: Microsoft/nni
Commit Name: 5557a2e4143f7ec707daf9ae094db84eb91b9d1b
Time: 2019-10-22
Author: v-yugzh@microsoft.com
File Name: tools/nni_cmd/command_utils.py
Class Name:
Method Name: install_requirements_command