imas_validator.rules.loading

This file describes the functionality for discovering and loading validation rules

Functions

discover_rule_modules(ruleset_dirs)

Make a list of files that might contain rulesets

discover_rulesets(validate_options)

Make a list of directories and child directories which might contain rules.

filter_rules(rules, validate_options)

Filter a list of rules based on a given dictionary of criteria

filter_rulesets(ruleset_dirs, validate_options)

filter list of directories to only those that contain rulesets which should be applied

get_ruleset_directories(validate_options)

Return a list of directory Paths which contain rulesets.

handle_entrypoints()

TODO: enable locating rulesets through entrypoints

load_docs(result_collector, validate_options)

Load docstrings for several rule dirs

load_docs_from_rule_files(result_collector, ...)

Load docstrings for several rule files

load_rules(result_collector, validate_options)

Load IDSValidationRule objects from given rulesets and directories

load_rules_from_path(rule_path, result_collector)

Make a list of files that might contain rulesets


Last update: 2025-08-29