e258ef3ea167b86d6680bfcc513dd207586b90f4,setup.py,,read_requirements,#,30
Before Change
reqs_path = os.path.join(__location__, "requirements.txt")
install_reqs = parse_requirements(reqs_path, session=PipSession())
reqs = []
for ir in install_reqs:
pip_main(["install", str(ir.req or ir.link)])
if ir.req:
reqs.append(str(ir.req))
return reqs
def readme():
After Change
// // parses requirements from requirements.txt
reqs_path = os.path.join(__location__, "requirements.txt")
with open(reqs_path) as f:
reqs = [line.strip() for line in f]
for req in reqs:
install(req)
names = []
links = []
for req in reqs:
if "://" in req:
links.append(req)
else:
names.append(req)
return {"install_requires": names, "dependency_links": links}
def readme():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: e258ef3ea167b86d6680bfcc513dd207586b90f4
Time: 2018-07-03
Author: yoptar@gmail.com
File Name: setup.py
Class Name:
Method Name: read_requirements
Project Name: OpenNMT/OpenNMT-py
Commit Name: 5226e0bcdcb42b2d2d8806134599b70a5249d8a1
Time: 2017-12-29
Author: myscarlet@sina.com
File Name: tools/test_rouge.py
Class Name:
Method Name: test_rouge
Project Name: ray-project/ray
Commit Name: 283f4d1060060d3a10a62ac5d74c9ca45c596791
Time: 2020-09-01
Author: ian.rodney@gmail.com
File Name: python/ray/autoscaler/command_runner.py
Class Name: DockerCommandRunner
Method Name: run_init