captest.CapTest.to_yaml
- CapTest.to_yaml(path, key='captest', merge_into_existing=True)
Serialize the curated CapTest configuration to a yaml file.
The written sub-mapping lives under the top-level
key(default"captest") and contains every scalarparam.*plustest_setup, any non-None override ofreg_fml/reg_cols_meas/reg_cols_sim/rep_conditions,meas_path/sim_path(when the instance was constructed from paths), and non-emptymeas_load_kwargs/sim_load_kwargs.Percentile
perc_wrap(N)callables insiderep_conditions['func']are written back as"perc_N"strings so thatfrom_yamlround-trips them.meas,sim,regression_results,_resolved_setup, and the loader callables are never serialized.- Parameters:
path (str or Path) – Destination yaml file.
key (str, default 'captest') – Top-level key under which the captest sub-mapping is written. Parametrizing this lets a single yaml hold multiple captest flavors (e.g.
captest_e2848andcaptest_bifi).merge_into_existing (bool, default True) – When True and the destination file already exists and parses as a mapping, preserve the other top-level keys and overwrite only the sub-tree at
key. When False, the destination is unconditionally replaced with a fresh mapping containing onlykey.
- Return type:
None