コード例 #1
0
ファイル: test_migrators.py プロジェクト: tadeu/cf-scripts
    - setuptools
    - cython
    - numpy
  run:
    - python
    - {{ pin_compatible('numpy') }}

test:
  requires:
    - pytest
    - mpmath
"""

js = JS()
version = Version()
compiler = Compiler()
noarch = Noarch()
noarchr = NoarchR()
perl = Pinning(removals={"perl"})
pinning = Pinning()

rebuild = Rebuild(name='rebuild', cycles=[])
rebuild.filter = lambda x: False

blas_rebuild = BlasRebuild(cycles=[])
blas_rebuild.filter = lambda x: False

test_list = [
    (
        js,
        sample_js,
コード例 #2
0
g = nx.read_gpickle("../cf-graph/graph.pkl")

# Migrate the PRed versions
for node, attrs in g.nodes.items():
    if attrs.get("PRed", False):
        attrs["PRed"] = [{
            "migrator_name": "Version",
            "migrator_version": 0,
            "version": attrs["PRed"],
        }]
    elif "PRed" in attrs:
        attrs["PRed"] = []

# Don't migrate already done Compilers (double commits cause problems)
m = Compiler()
compiler_migrations = []
for node, attrs in g.nodes.items():
    if m.filter(attrs):
        continue
    compiler_migrations.append(node)

last_compiler_pr = "cxxopts"
last_compiler_index = compiler_migrations.index(last_compiler_pr)
for i in range(last_compiler_index):
    attrs = g.nodes[compiler_migrations[i]]
    attrs.setdefault("PRed", []).append({
        "migrator_name": "Compiler",
        "migrator_version": 0
    })