1"""The Configuration tab's section list (GET /api/config/parameters, engine/pipeline/parameter_registry).
3Two sections were both labelled "Propellants" (fluids and propellant_preset), and the legacy
4chamber/nozzle blocks and the app's own staleness stamp were listed beside the live sections as
5if a person should fill them in.
8from pathlib
import Path
13ROOT = Path(__file__).resolve().parents[1]
17 labels = [label
for _, label
in SECTIONS]
18 assert len(labels) == len(set(labels)), labels
22 out = config_parameters(load_config(ROOT /
"configs" /
"default.yaml"))
23 by_key = {s[
"key"]: s
for s
in out[
"sections"]}
24 assert len({s[
"label"]
for s
in out[
"sections"]}) == len(out[
"sections"])
25 for key, s
in by_key.items():
26 assert s[
"legacy"]
is (key
in LEGACY_SECTIONS)
27 assert s[
"internal"]
is (key
in INTERNAL_SECTIONS)
28 assert by_key[
"fluids"][
"legacy"]
is False and by_key[
"fluids"][
"internal"]
is False
29 if "chamber" in by_key:
30 assert by_key[
"chamber"][
"legacy"]
is True
test_section_labels_are_unique()
test_sections_say_which_are_legacy_and_internal()