parse_rule_file

luceda.drc.parse_rule_file(rule_path)

Parses a Luceda DRC rule (.rule) file (DRC deck).

Parameters:
rule_pathstr | Path

Path to the rule file.

Returns:
RuleIndex

A RuleIndex object with two properties:

  • rules: a list of rule names (list[str]).

  • groups: A dictionary whose keys are group names (which can be used in include_groups argument of run_drc for rule selection) and values are lists of rule names in those groups (dict[str, list[str]]).