942f284052b22214d830c1bc2c8de03bffaa8d07,build_tools/azure/render_meta.py,,,#,8

Before Change



// Find the requirements and versions
with open(str(REQUIREMENTS_FILE.resolve())) as file:
    requirements = [line.strip() for line in file.readlines()]

// We build from source on windows, otherwise, we looks for a wheel
if sys.platform != "win32":
    wheel = next(file for file in os.listdir(str(DIST_PATH.resolve()))
                 if file.endswith(".whl"))
else:
    wheel = None

// Numpy version is used for building
numpy_version = next(package for package in requirements if "numpy" in package)

// Render and write the meta.yaml file to $ROOT/conda/meta.yaml
context = {
    "requirements": requirements,

After Change


// conda puts a space between packages and versions, so we have to match that
requirements = []
with open(str(REQUIREMENTS_FILE.resolve())) as file:
    for line in file:
        requirement = line.strip()
        match = re.match(r"^([A-Za-z\-0-9]+)", requirement)
        _, match_end = match.span()
        package = match.group(0)
        version = requirement[match_end:].replace("==", "")
        requirements.append(f"{package} {version}")

// Render and write the meta.yaml file to $ROOT/conda/meta.yaml
context = {
    "requirements": requirements,
    "VERSION": VERSION
}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: tgsmith61591/pmdarima
Commit Name: 942f284052b22214d830c1bc2c8de03bffaa8d07
Time: 2020-02-18
Author: aaronreidsmith@gmail.com
File Name: build_tools/azure/render_meta.py
Class Name:
Method Name:


Project Name: D2KLab/entity2rec
Commit Name: f089384f349d06ff3d2933843266a1805b69dba8
Time: 2018-07-18
Author: enricopalumbo0@gmail.com
File Name: entity2rec/sparql.py
Class Name: Sparql
Method Name: _define_properties


Project Name: automl/auto-sklearn
Commit Name: f754f90ed94c7db58f2d6573471b8a7d63828d87
Time: 2020-03-18
Author: feurerm@informatik.uni-freiburg.de
File Name: test/test_automl/test_automl.py
Class Name: AutoMLTest
Method Name: test_delete_non_winning_models


Project Name: commonsense/conceptnet5
Commit Name: e45e93c11d6c87716b828e4bd4b08fa9d96d5c50
Time: 2018-04-17
Author: rbeaudoin@luminoso.com
File Name: conceptnet5/nodes.py
Class Name:
Method Name: standardized_concept_uri