Exemplo n.º 1
0
def test_deps():
    assert merge_deps(["MaxEntScan"]) == merge_deps(["MaxEntScan/5prime"])

    # test mix of special environments and models
    merge_deps(["example/models/shared/envs/kipoi-py3-keras1.2"], source="dir")
    with pytest.raises(ValueError):
        merge_deps(["example/models/shared/envs/kipoi-py3-keras1.2.yaml"],
                   source="dir")

    with pytest.raises(Exception):
        merge_deps(["example/models/shared/envs/kipoi-py3-keras1.2_bad"],
                   source="dir")

    deps = merge_deps([
        "example/models/shared/envs/kipoi-py3-keras1.2", "example/models/pyt"
    ],
                      source="dir")
    assert len([el for el in deps.conda if "pytorch" in el]) == 1
Exemplo n.º 2
0
def test_decorator_env_loading(tmpdir):
    mdir = cp_tmpdir("example/models/kipoi_dataloader_decorator", tmpdir)
    assert merge_deps([mdir], source='dir') == \
           Dependencies(conda=['python=2.7', 'scikit-learn'],
                        pip=['kipoi', 'scikit-learn', 'tqdm'],
                        conda_channels=['defaults'])
Exemplo n.º 3
0
def test_deps():
    assert merge_deps(["MaxEntScan"]) == merge_deps(["MaxEntScan/5prime"])