From e7582eb3280c727045cbdcd39fbb43a78312dc73 Mon Sep 17 00:00:00 2001 From: Antony Bevan Date: Sun, 21 Jun 2026 19:23:51 +0530 Subject: [PATCH] Add ADaM product standards to StandardTypes CLI gate StandardTypes is the allow-list core.py uses to validate -s/--standard. It lists adamig but not the other six ADaM products in ADAM_PRODUCTS (adam-adae, adam-md, adam-nca, adam-occds, adam-tte, adam-poppk), which are already handled by normalize_standard_input(). As a result a command such as `-s adam-tte` is rejected before the engine runs, even though the engine supports it. Add the six products to StandardTypes, completing the normalization from #1733 (which added adamig and the sendig-* products), and add a test asserting the gate stays in sync with ADAM_PRODUCTS. Signed-off-by: Antony Bevan --- cdisc_rules_engine/enums/standard_types.py | 6 ++++++ .../unit/test_utilities/test_standard_types_adam.py | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/unit/test_utilities/test_standard_types_adam.py diff --git a/cdisc_rules_engine/enums/standard_types.py b/cdisc_rules_engine/enums/standard_types.py index fd4b49bd6..4571eb3d5 100644 --- a/cdisc_rules_engine/enums/standard_types.py +++ b/cdisc_rules_engine/enums/standard_types.py @@ -10,5 +10,11 @@ class StandardTypes(BaseEnum): SENDIG_DART = "sendig-dart" SENDIG_GENETOX = "sendig-genetox" ADAMIG = "adamig" + ADAM_ADAE = "adam-adae" + ADAM_MD = "adam-md" + ADAM_NCA = "adam-nca" + ADAM_OCCDS = "adam-occds" + ADAM_TTE = "adam-tte" + ADAM_POPPK = "adam-poppk" TIG = "tig" USDM = "usdm" diff --git a/tests/unit/test_utilities/test_standard_types_adam.py b/tests/unit/test_utilities/test_standard_types_adam.py new file mode 100644 index 000000000..bde4dcd6d --- /dev/null +++ b/tests/unit/test_utilities/test_standard_types_adam.py @@ -0,0 +1,12 @@ +from cdisc_rules_engine.constants.adam_products import ADAM_PRODUCTS +from cdisc_rules_engine.enums.standard_types import StandardTypes + + +def test_standard_types_includes_all_adam_products(): + """Every ADaM product handled by normalize_standard_input must be a valid + CLI standard. If it is not, ``-s `` is rejected by the standards + gate in core.py before the engine runs. + """ + supported = set(StandardTypes.values()) + missing = [p for p in ADAM_PRODUCTS if p not in supported] + assert not missing, f"ADAM products absent from StandardTypes: {missing}"