imas_validator.validate.rule_executor.RuleExecutor

class imas_validator.validate.rule_executor.RuleExecutor(db_entry: DBEntry, rules: list[IDSValidationRule], result_collector: ResultCollector, validate_options: ValidateOptions)

Bases: object

Class for matching rules and idss and executing rules

__init__(db_entry: DBEntry, rules: list[IDSValidationRule], result_collector: ResultCollector, validate_options: ValidateOptions)

Initialize RuleExecutor

Parameters:
db_entry: DBEntry

An opened DBEntry.

rules: list[IDSValidationRule]

List of rules to apply to the data.

result_collector: ResultCollector

ResultCollector object that stores the results after execution

validate_options: ValidateOptions

Dataclass for validate options

Methods

__init__(db_entry, rules, result_collector, ...)

Initialize RuleExecutor

apply_rules_to_data()

Apply set of rules to the Data Entry.

find_matching_rules()

Find combinations of rules and their relevant ids instances

progress_start()

Start progress object if in interactive environment

progress_stop()

Stop progress object if in interactive environment

run(rule, ids_toplevels)

apply_rules_to_data() None

Apply set of rules to the Data Entry.

find_matching_rules() Iterator[tuple[list[tuple[IDSToplevel, str, int]], IDSValidationRule]]

Find combinations of rules and their relevant ids instances

Yields:

tuple of ids_instances, ids_names, ids_occurrences, validation rule

progress_start() None

Start progress object if in interactive environment

progress_stop() None

Stop progress object if in interactive environment


Last update: 2025-06-05