Validation#

class IssueSeverity(*values)#

Validation issue severity.

class IssueCode(*values)#

Identify one customer-visible case finding with a stable numeric code.

class FindingStage(*values)#

Identify the customer workflow stage that reported a finding.

PARSE identifies an input-reading finding. CASE identifies case validation. LOWERING identifies network preparation. FIX identifies a repair that the case doctor applied.

class ValidationIssue(severity, code, object_kind, object_key, message, can_approximate=False, stage=FindingStage.CASE)#

Describe one customer-visible case finding.

severity#

Effect on the requested calculation.

Type:

gpf.IssueSeverity

code#

Stable machine-readable finding code.

Type:

gpf.IssueCode

object_kind#

Case record family that caused the finding.

Type:

str

object_key#

Values that identify the affected case record.

Type:

tuple

message#

Customer-readable description.

Type:

str

can_approximate#

Whether the calculation can continue with a reported limitation.

Type:

bool

stage#

Workflow stage that reported the finding.

Type:

gpf.FindingStage

class ValidationResult(issues=<factory>)#

Collect case findings that can prevent or limit a calculation.

can_solve reports whether the requested calculation can continue. errors and warnings provide the customer-visible findings.

property can_solve#

Return true when the result contains no errors.

property errors#

Return the findings that prevent a solve.

property warnings#

Return the findings that allow a solve with limitations.

validate_case(case)#

Check a case against the solver's capabilities without changing it.

Parameters:

case -- Parsed case to check.

Returns:

All errors and warnings found during the check.