Skip to content

models

ValidationReport

Validation report from a single validation result.

Structures a pySHACL tuple report into result, graph and text fields.

Source code in ogc/na/models.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
class ValidationReport:
    """
    Validation report from a single validation result.

    Structures a pySHACL tuple report into `result`, `graph` and `text`
    fields.
    """

    def __init__(self, pyshacl_result: tuple,
                 used_resources: Iterable[Union[str, Path]] = None):
        """
        :param pyshacl_result: result from executing [pyshacl.validate]
        """
        self.result, self.graph, self.text = pyshacl_result
        self.used_resources: set[Union[str, Path]] = set(used_resources) if used_resources else set()

__init__(pyshacl_result, used_resources=None)

Parameters:

Name Type Description Default
pyshacl_result tuple

result from executing [pyshacl.validate]

required
Source code in ogc/na/models.py
15
16
17
18
19
20
21
def __init__(self, pyshacl_result: tuple,
             used_resources: Iterable[Union[str, Path]] = None):
    """
    :param pyshacl_result: result from executing [pyshacl.validate]
    """
    self.result, self.graph, self.text = pyshacl_result
    self.used_resources: set[Union[str, Path]] = set(used_resources) if used_resources else set()