qlroms.utils.config
Short names for the standard test cases -- a directory, not a second config.
Everything a case is lives in its own module's TEST_CASES entry (physics, the
windows it is generated with, the (K, r) its ql-ROMs are built at, the timescales its
characterization needs). This module only maps a readable name onto one of those
entries and reads it back, so there is exactly one place to edit a case:
from qlroms.utils.config import CASES, get_case
P = get_case("ks1d chaos") # P["module"] is the imported case module,
# the rest is TEST_CASES["chaotic"], verbatim
A run that wants something other than the case's own settings overrides them where the
run is described -- build_fom(overrides=...), or the case / rom blocks of a
qlroms.utils.builder config -- never here.
case_module(name)
'ks1d', a registry name, or 'ks1d/chaotic' -> the imported case module.
Source code in qlroms/utils/config.py
28 29 30 31 32 33 34 35 | |
get_case(name)
Registry entry name as the case module states it, plus module and case.
The settings are read live from TEST_CASES (with the 2-D TIME_DEFAULTS windows
beneath them), never copied, so editing the case edits this too.
Source code in qlroms/utils/config.py
38 39 40 41 42 43 44 45 46 47 48 49 | |