paroto.validation.arc002#
ARC002 parameter registry validation utilities.
This module provides utilities to validate OpenMDAO Problems against the ARC002 parameter registry, ensuring consistent naming and correct system associations.
Classes#
ARC002 parameter registry loader and validator. |
Functions#
Extract all variable names from an OpenMDAO Problem. |
|
Check VedEf problem compatibility with ARC002 registry. |
Module Contents#
- class paroto.validation.arc002.ARC002Registry(registry_path=None)#
ARC002 parameter registry loader and validator.
- registry_path#
Path to the ARC002 parameter registry CSV file
- Type:
Path
- df#
Loaded parameter registry data
- Type:
pd.DataFrame
- tags_to_equipment#
Mapping from Parameter_Tag to Equipment_Class
- Type:
Dict[str,str]
- tags_to_description#
Mapping from Parameter_Tag to Parameter description
- Type:
Dict[str,str]
- tags_to_units#
Mapping from Parameter_Tag to Units
- Type:
Dict[str,str]
- registry_path#
- df = None#
- tags_to_equipment#
- tags_to_description#
- tags_to_units#
- is_valid_tag(tag)#
Check if a parameter tag is defined in ARC002 registry.
- get_equipment_class(tag)#
Get the Equipment_Class for a given parameter tag.
- get_description(tag)#
Get the parameter description for a given tag.
- get_units(tag)#
Get the units for a given parameter tag.
- get_tags_for_equipment(equipment_class)#
Get all parameter tags for a given Equipment_Class.
- Parameters:
equipment_class (
str) – Equipment class name (e.g., ‘Generator’, ‘PlasmaTorch’)- Returns:
List of parameter tags for this equipment class
- Return type:
List[str]
- validate_problem_parameters(problem_vars, expected_systems=None)#
Validate problem variable names against ARC002 registry.
- Parameters:
problem_vars (
List[str]) – List of variable names from an OpenMDAO Problemexpected_systems (
Dict[str,str], optional) – Mapping of parameter tag to expected Equipment_Class. If provided, validates that tags match expected systems.
- Returns:
valid (
List[str]) – Valid parameter tags found in registryinvalid (
List[str]) – Parameter names not found in registrymismatched (
List[str]) – Parameter tags that belong to wrong Equipment_Class (only if expected_systems provided)
- print_validation_report(problem_vars, expected_systems=None)#
Print a formatted validation report.
- Parameters:
problem_vars (
List[str]) – List of variable names from an OpenMDAO Problemexpected_systems (
Dict[str,str], optional) – Mapping of parameter tag to expected Equipment_Class
- paroto.validation.arc002.extract_problem_variable_names(prob)#
Extract all variable names from an OpenMDAO Problem.
- Parameters:
prob (
openmdao.api.Problem) – OpenMDAO problem instance- Returns:
List of variable names (inputs and outputs)
- Return type:
List[str]