コード例 #1
0
def container_dataset(tmpdir_factory):
    skipif.no_datalad()
    skipif.no_network()

    if "datalad_container" not in external_versions:
        pytest.skip("datalad-container not installed")

    import datalad.api as dl
    path = str(tmpdir_factory.mktemp("container_dataset"))
    ds = dl.Dataset(path).create(force=True)
    ds.containers_add("dc", url="shub://datalad/datalad-container:testhelper")
    return ds
コード例 #2
0
def base_dataset(tmpdir_factory):
    skipif.no_datalad()
    import datalad.api as dl
    path = str(tmpdir_factory.mktemp("dataset"))
    ds = dl.Dataset(path).create(force=True)

    create_tree(ds.path, {"foo": "foo",
                          "bar": "bar",
                          "d": {"in": "content\n"}})
    ds.add(".")
    ds.repo.tag("root")
    return ds