From 4b651cd0418ef6b20e912449f644ddc42c04ee03 Mon Sep 17 00:00:00 2001 From: Samuel Johnson Date: Tue, 2 Jun 2026 16:00:57 -0400 Subject: [PATCH] doc update --- docs/PYPI.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/PYPI.md b/docs/PYPI.md index d0d0ffd16..5c3df1521 100644 --- a/docs/PYPI.md +++ b/docs/PYPI.md @@ -69,10 +69,12 @@ from cdisc_rules_engine.utilities.utils import get_rules_cache_key cache = load_rules_cache("path/to/rules/cache") # Note: version uses dashes, not dots -rules = cache.get_all_by_prefix(get_rules_cache_key("sdtmig", "3-4")) +rule_keys = cache.get_all_by_prefix(get_rules_cache_key("sdtmig", "3-4")) +rules = [cache.get(key) for key in rule_keys[0]] ``` -Each rule is a dict with keys: `core_id`, `domains`, `author`, `reference`, `sensitivity`, `executability`, `description`, `authorities`, `standards`, `classes`, `rule_type`, `conditions`, `actions`, `datasets`, `output_variables`. +`get_all_by_prefix` returns a nested list of cache keys, not rule objects directly. Fetch the actual rule dicts by calling cache.get() on each key. +Each rule is a dict with keys: `core_id`, `domains`, `author`, `reference`, `sensitivity`, `executability`, `description`, `authorities`, `standards`, `classes`, `rule_type`, `conditions`, `actions`, `output_variables`. If you have rules in raw CDISC metadata format, convert them first: