build_environments_from_directory
build_environments_from_directory(path, builder, *, pattern='*', include_files=True, include_folders=True)
Build environments from a directory.
This helper function can be used to build environments from multiple files
or folders. First all files and folders in the path
matching the
pattern
are selected. These are then passed to the builder
function
which creates the environment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
Path | str
|
The path to the directory from which environments are created. |
required |
builder
|
EnvironmentBuilder
|
A function building an environment from a path and returning it. |
required |
pattern
|
str
|
A glob pattern. Matching files and folders will be passed to
|
'*'
|
include_files
|
bool
|
Specify whether to pass files to |
True
|
include_folders
|
bool
|
Specify whether to pass folders to |
True
|
Source code in src/flowcean/utils/build_environments_from_directory.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|