nestly is a collection of functions designed to make running software with combinatorial choices of parameters easier.
Core functions for building nests.
Bases: object
Nests are used to build nested parameter selections, culminating in a directory structure representing choices made, and a JSON dictionary with all selections.
Build parameter combinations with Nest.add(), then create a nested directory structure with Nest.build().
Parameters: |
|
---|
Add a level to the nest
Parameters: |
|
---|
Generate the names of all control files under base_dir
Apply map_fn to the directories defined by control_iter
For each control file in control_iter, map_fn is called with the directory and control file contents as arguments.
Example:
>>> list(nest_map(['run1/control.json', 'run2/control.json'],
... lambda d, c: c['run_id']))
[1, 2]
Parameters: |
|
---|---|
Returns: | A generator of the results of applying map_fn to elements in control_iter |