Skip to content

Issues

pynumgeo.issue

Issues reported by the reader and the validator.

Examples:

>>> i = Issue("NG-MESH-001", "error", "node labels must be 1..n", location="model.inp:3")
>>> str(i)
'NG-MESH-001 error  model.inp:3  node labels must be 1..n'
>>> i.as_dict()["severity"]
'error'

Issue(id, severity, message, location=None, keyword=None, source=None) dataclass

One finding.

Attributes:

Name Type Description
id str

rule id, e.g. NG-STEP-003 (stable; documented in the validator).

severity Severity

error (numgeo fails or computes something else than intended), warning, info.

message str

what is wrong and what to do.

location str | None

file:line or an object path such as steps[0].items[2].

keyword str | None

the keyword concerned, if any.

source str | None

solver source location of the behaviour the rule mirrors (src/...:line).

as_dict()

Plain dict (for --json output).

has_errors(issues)

True if any issue has severity error.