malcolm.yamlutil
Utilities for making Blocks and Includes from YAML files
- malcolm.yamlutil.check_yaml_names(globals_d: Dict[str, Any]) List[str] [source]
Check that all include_creators and block_creators have the same name as the base of their file path, and return them in a list suitable for publishing as __all__
- malcolm.yamlutil.make_block_creator(yaml_path: str, filename: Optional[str] = None) Callable[[...], List[malcolm.core.controller.Controller]] [source]
Make a collection function that will create a list of blocks
- Parameters
- Returns
A collection function decorated with @takes. This can be used in other blocks or instantiated by the process. If the YAML text specified controllers or parts then a block instance with the given name will be instantiated. If there are any blocks listed then they will be called. All created controllers by this or any sub collection will be returned