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#

ARC002Registry

ARC002 parameter registry loader and validator.

Functions#

extract_problem_variable_names(prob)

Extract all variable names from an OpenMDAO Problem.

check_vedef_problem_compatibility(prob)

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.

Parameters:

tag (str) – Parameter tag to check

Returns:

True if tag exists in registry

Return type:

bool

get_equipment_class(tag)#

Get the Equipment_Class for a given parameter tag.

Parameters:

tag (str) – Parameter tag

Returns:

Equipment_Class if tag exists, None otherwise

Return type:

str or None

get_description(tag)#

Get the parameter description for a given tag.

Parameters:

tag (str) – Parameter tag

Returns:

Parameter description if tag exists, None otherwise

Return type:

str or None

get_units(tag)#

Get the units for a given parameter tag.

Parameters:

tag (str) – Parameter tag

Returns:

Units if tag exists, None otherwise

Return type:

str or None

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 Problem

  • expected_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 registry

  • invalid (List[str]) – Parameter names not found in registry

  • mismatched (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 Problem

  • expected_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]

paroto.validation.arc002.check_vedef_problem_compatibility(prob)#

Check VedEf problem compatibility with ARC002 registry.

Parameters:

prob (openmdao.api.Problem) – VedEf problem instance

Returns:

True if all critical parameters are ARC002-compliant

Return type:

bool