# pysparky_data_quality.report

*module*

Versioned, serializable results from explicit validation checks.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L1-L1)

## pysparky_data_quality.report.CheckStatus

*attribute* · *module attribute*

```python
CheckStatus = Literal['passed', 'failed', 'error']
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L13-L13)

## pysparky_data_quality.report.MetricValue

*attribute* · *module attribute*

```python
MetricValue = int | float | str | bool
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L15-L15)

## pysparky_data_quality.report.ReportStatus

*attribute* · *module attribute*

```python
ReportStatus = Literal['passed', 'failed', 'error']
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L14-L14)

## pysparky_data_quality.report.Scope

*attribute* · *module attribute*

```python
Scope = Literal['row', 'dataset', 'schema']
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L12-L12)

## pysparky_data_quality.report.CheckResult

*class* · *dataclass*

```python
class CheckResult
```

Serializable status and metrics for one named validation check.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L18-L111)

### pysparky_data_quality.report.CheckResult.check_id

*attribute* · *instance attribute*

```python
check_id: str
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L22-L22)

### pysparky_data_quality.report.CheckResult.error_message

*attribute* · *class attribute* · *instance attribute*

```python
error_message: str | None = None
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L29-L29)

### pysparky_data_quality.report.CheckResult.error_type

*attribute* · *class attribute* · *instance attribute*

```python
error_type: str | None = None
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L28-L28)

### pysparky_data_quality.report.CheckResult.metrics

*attribute* · *class attribute* · *instance attribute*

```python
metrics: tuple[tuple[str, MetricValue], ...] = ()
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L25-L25)

### pysparky_data_quality.report.CheckResult.null_policy

*attribute* · *class attribute* · *instance attribute*

```python
null_policy: str | None = None
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L26-L26)

### pysparky_data_quality.report.CheckResult.scope

*attribute* · *instance attribute*

```python
scope: Scope
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L23-L23)

### pysparky_data_quality.report.CheckResult.status

*attribute* · *instance attribute*

```python
status: CheckStatus
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L24-L24)

### pysparky_data_quality.report.CheckResult.violations

*attribute* · *class attribute* · *instance attribute*

```python
violations: tuple[str, ...] = ()
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L27-L27)

### pysparky_data_quality.report.CheckResult.from_error

*method* · *classmethod*

```python
def from_error(check_id: str, scope: Scope, error: Exception) -> CheckResult
```

Create an execution-error result without collecting input rows.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L85-L95)

### pysparky_data_quality.report.CheckResult.from_outcome

*method* · *classmethod*

```python
def from_outcome(check_id: str, scope: Scope, outcome: ExpectationOutcome) -> CheckResult
```

Convert an already evaluated dataset/schema outcome without I/O.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L68-L83)

### pysparky_data_quality.report.CheckResult.to_dict

*method*

```python
def to_dict() -> dict[str, object]
```

Return this result as JSON-serializable built-in values.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L97-L111)

## pysparky_data_quality.report.ValidationReport

*class* · *dataclass*

```python
class ValidationReport
```

Immutable versioned collection of row, dataset, and schema results.

Version 1 uses JSON scalar metrics, ordered checks, and no raw row samples.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L114-L189)

### pysparky_data_quality.report.ValidationReport.checks

*attribute* · *class attribute* · *instance attribute*

```python
checks: tuple[CheckResult, ...] = ()
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L121-L121)

### pysparky_data_quality.report.ValidationReport.schema_version

*attribute* · *class attribute* · *instance attribute*

```python
schema_version: int = 1
```

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L122-L122)

### pysparky_data_quality.report.ValidationReport.passed

*property*

```python
passed: bool
```

Whether the report contains no failed or errored checks.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L149-L151)

### pysparky_data_quality.report.ValidationReport.status

*property*

```python
status: ReportStatus
```

Return aggregate status, preserving execution errors distinctly.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L140-L146)

### pysparky_data_quality.report.ValidationReport.combine

*method* · *classmethod*

```python
def combine(*reports: ValidationReport) -> ValidationReport
```

Combine reports in argument order, rejecting duplicate check IDs.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L178-L181)

### pysparky_data_quality.report.ValidationReport.from_errors

*method* · *classmethod*

```python
def from_errors(errors: Mapping[str, tuple[Scope, Exception]]) -> ValidationReport
```

Compose captured execution errors without retrying the checks.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L166-L176)

### pysparky_data_quality.report.ValidationReport.from_outcomes

*method* · *classmethod*

```python
def from_outcomes(outcomes: Mapping[str, tuple[Scope, ExpectationOutcome]]) -> ValidationReport
```

Compose named, already evaluated expectation outcomes without I/O.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L153-L164)

### pysparky_data_quality.report.ValidationReport.to_dict

*method*

```python
def to_dict() -> dict[str, object]
```

Return a stable versioned structure suitable for JSON encoding.

[View source](https://github.com/PySparky/pysparky-data-quality/blob/46facb9e156e26dfd76fa534c81f75749c7879d8/src/pysparky_data_quality/report.py#L183-L189)
