Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds data structure scoping for ADaM as well as normalized the input for ADaM products input by users in both rule editor and engine.
are now the entered standards in the library tab. also for a CLI validation -s adamig -v 1-3 works now. The parsing under the hood allows for an easier entry by users and parses it to what is expected by library (standard is adam, version is adamig-1-3 for the above case). This makes it easier for the user to enter the IG for adam, or other adam products.
this also has the parsing logic for data structures and uses the library metadata from adam to select datasets to run.
This pull request introduces support for ADaM standards normalization throughout the codebase, adds data structure-based rule applicability, and improves cache key handling. The main changes are the addition of ADaM product normalization logic, integration of data structure checks for rule applicability, and updates to cache key generation to ensure consistent internal format for ADaM-related inputs.
ADaM Standard Normalization and Support:
normalize_adam_input
utility function to standardize ADaM user inputs, and a list of supported ADaM products inADAM_PRODUCTS
. This function is now used throughout the codebase to ensure consistent handling of ADaM standards and versions. (Fd48126eL169R169, cdisc_rules_engine/constants/adam_products.pyR1-R9)get_standard_codelist_cache_key
,get_library_variables_metadata_cache_key
,get_standard_details_cache_key
,get_variable_codelist_map_cache_key
) to use normalized ADaM inputs, preventing cache misses due to inconsistent formats. (Fd48126eL69R69, Fd48126eL158R158, Fd48126eL169R169, Fd48126eL347R347)Rule Applicability by Data Structure:
rule_processor.py
and updates tois_suitable_for_validation
. This ensures rules are skipped if they do not apply to the dataset's data structure. (cdisc_rules_engine/utilities/rule_processor.pyR191-R223, F52bf509L643R643)data_structures
field, allowing rules to specify applicable data structures.get_data_structure
in the data service interface and base class, enabling retrieval of a dataset's data structure for rule applicability checks. [1] [2]General Improvements and Minor Fixes:
.flake8
configuration to ignoreE713
for more flexible linting.These changes collectively improve the robustness and extensibility of rule validation, especially for ADaM datasets and standards.
To test: see original issue ticket/rule 47 for adam.