Start fixing up cli and setup

This commit is contained in:
Marek Wolan
2023-10-27 12:20:23 +01:00
parent a06629ed0b
commit d4eb499729
4 changed files with 26 additions and 57 deletions

View File

@@ -0,0 +1,2 @@
# © Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
"""Configuration parameters for running experiments."""

View File

@@ -0,0 +1,22 @@
from pathlib import Path
from typing import Union
import yaml
from primaite import getLogger
_LOGGER = getLogger(__name__)
def load(file_path: Union[str, Path]) -> Dict:
"""
Read a YAML file and return the contents as a dictionary.
:param file_path: Path to the YAML file.
:type file_path: Union[str, Path]
:return: Config dictionary
:rtype: Dict
"""
if not isinstance(file_path, Path):
file_path = Path(file_path)