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: 7
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: keras-team/autokeras
Commit Name: 41c99fbf385a8c875fb6181ce7301e4bc218535b
Time: 2020-04-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/keras_layers.py
Class Name: CategoricalEncoding
Method Name: call