swarmsim.yaml.include#
Handles !include and !relpath tags
- class swarmsim.yaml.include.IncludeLoader(self, stream: IO)[source]#
YAML Loader with !include constructor.
- swarmsim.yaml.include.search_file(parent_path: PathLike, path_str: PathLike) Path [source]#
Include file referenced at node.
resolve order:
absolute or resolvable/home paths (i.e. ~/foo.yaml)
relative to yaml file
relative to cwd
see Our YAML module for an example
- swarmsim.yaml.include.construct_include(loader: IncludeLoader, node: Node) Any [source]#
Read the contents of a yaml/text/json file into a node
- swarmsim.yaml.include.construct_relative_path(loader: IncludeLoader, node: Node) str [source]#
Construct a path which is resolved absolutely or relative to the yaml file
Module Attributes
YAML tag for !include |
|
YAML tag for !relpath |
Functions
|
Read the contents of a yaml/text/json file into a node |
|
Construct a path which is resolved absolutely or relative to the yaml file |
|
Include file referenced at node. |
Classes
|
YAML Loader with !include constructor. |