Skip to content

Add ADaM product standards to StandardTypes CLI gate#1770

Merged
SFJohnson24 merged 1 commit into
cdisc-org:mainfrom
antonybevan:fix/standardtypes-adam-products
Jun 22, 2026
Merged

Add ADaM product standards to StandardTypes CLI gate#1770
SFJohnson24 merged 1 commit into
cdisc-org:mainfrom
antonybevan:fix/standardtypes-adam-products

Conversation

@antonybevan

Copy link
Copy Markdown
Contributor

Summary

StandardTypes is the allow-list the CLI uses to validate -s/--standard. When
--custom-standard is not set, core.py rejects any value not in
StandardTypes.values() and exits with code 2. The enum lists adamig but not the
other six ADaM products defined in ADAM_PRODUCTS
(cdisc_rules_engine/constants/adam_products.py): adam-adae, adam-md,
adam-nca, adam-occds, adam-tte, adam-poppk.

Those six are already handled by normalize_standard_input() in
cdisc_rules_engine/utilities/utils.py, which maps any value in ADAM_PRODUCTS to
("adam", "<product>-<version>"). Because the gate does not list them, a command
such as -s adam-tte -v 1-0 is rejected before the engine runs, even though the
engine supports it.

This adds the six products to StandardTypes, completing the normalization started
in #1733 (which added adamig and the sendig-* products). The values mirror
ADAM_PRODUCTS.

Reproduction (current main)

core validate -s adam-tte -v 1-0 -d <datasets> -ft xpt ...
# Standard 'adam-tte' is not a supported standard. ... (exit code 2)

Changes

  • cdisc_rules_engine/enums/standard_types.py: add the six adam-* products,
    following the pattern used for the sendig-* products.
  • tests/unit/test_utilities/test_standard_types_adam.py: assert that every
    ADAM_PRODUCTS entry is a valid StandardTypes value, so the gate and the
    product list cannot drift apart again.

Testing

  • black and flake8 pass on both files.
  • The new test passes.

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 cdisc-org#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 <antonymichealbevan04@gmail.com>
@SFJohnson24 SFJohnson24 self-requested a review June 22, 2026 16:15

@SFJohnson24 SFJohnson24 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR correctly implements the missing adam products in the standard types

@SFJohnson24 SFJohnson24 merged commit 0abbde3 into cdisc-org:main Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants