pymhf.utils.parse_toml module#

pymhf.utils.parse_toml.read_inline_metadata(script: str) TOMLDocument | None#

Read a file and extract the toml info contained in the script if there is one. This is taken directly from the reference implementation in https://peps.python.org/pep-0723/ and modified to use tomlkit to ensure compatibility for python 3.9+

pymhf.utils.parse_toml.read_pymhf_settings(fpath: str, standalone: bool = False) dict#
pymhf.utils.parse_toml.write_pymhf_settings(settings: dict, fpath: str)#

Write the pymhf settings to disk as a toml file. This will automatically add the pymhf top section.