pymixef.warnings module

Structured warning catalog and emission helpers.

Warnings remain available as ordinary warnings.WarningMessage instances, while WarningRecord provides the stable representation stored in results and manifests.

exception pymixef.warnings.CovarianceWarning(record)[source]

Bases: PyMixEFWarning

Warning associated with singular or boundary covariance behavior.

Parameters:

record (WarningRecord)

Return type:

None

exception pymixef.warnings.DataAuditWarning(record)[source]

Bases: PyMixEFWarning

Warning associated with data adaptation or record exclusion.

Parameters:

record (WarningRecord)

Return type:

None

exception pymixef.warnings.NumericalWarning(record)[source]

Bases: PyMixEFWarning

Warning associated with an unreliable numerical calculation.

Parameters:

record (WarningRecord)

Return type:

None

exception pymixef.warnings.PyMixEFWarning(record)[source]

Bases: UserWarning

Python warning carrying a stable PyMixEF diagnostic code.

Parameters:

record (WarningRecord)

Return type:

None

property code: str

Stable warning code.

pymixef.warnings.emit_warning(code, *, category=PyMixEFWarning, stacklevel=2, **kwargs)[source]

Create, emit, and return a structured warning record.

Parameters:
  • code (str)

  • category (type[PyMixEFWarning])

  • stacklevel (int)

  • kwargs (Any)

Return type:

WarningRecord

pymixef.warnings.load_warning_catalog()[source]

Load and return the packaged warning catalog keyed by stable code.

Return type:

dict[str, dict[str, Any]]

pymixef.warnings.warning_record(code, *, message=None, severity=None, component=None, remediation=None, details=None)[source]

Create a record, filling omitted fields from the packaged catalog.

Parameters:
  • code (str)

  • message (str | None)

  • severity (str | None)

  • component (str | None)

  • remediation (str | None)

  • details (dict[str, Any] | None)

Return type:

WarningRecord