datalad.api.create_test_dataset
- datalad.api.create_test_dataset(path=None, *, spec=None, seed=None, nfiles=None)
Create test (meta-)dataset.
- Parameters:
path (str or None, optional) – path/name where to create (if specified, must not exist). [Default: None]
spec (str or None, optional) – spec for hierarchy. Each level is separated by
/and has the form[d]min[-max][+Nf].min-maxdefines how many (random from min to max) sub-datasets to generate at that level (min can be omitted to assume 0). Prefixdmakes entries plain directories instead of subdatasets (e.g.d3creates 3 dirs with files). Suffix+Nfcreates N tracked files per entry at that level (overrides –nfiles for that level). Examples:: 1-3/-2 1–3 subdatasets at L1, up to 2 at L2 2+100f/-2 2 subs at L1 each with 100 files, up to 2 at L2 10/d5+50f 10 subs, each containing 5 plain dirs with 50 files. [Default: None]seed (int or None, optional) – seed for rng. [Default: None]
nfiles (int or None, optional) – number of files to create in each dataset (default 1). Per-level +Nf suffix in spec overrides this. [Default: None]