topmark.pipeline.reporting¶
topmark / pipeline / reporting
Pipeline reporting scope helpers.
This module defines small helpers that decide which per-file pipeline results should be included in the human-facing per-file listing.
Notes
--summaryremains "summary only" and bypasses per-file listing.- Verbosity controls detail density; report scope controls inclusion.
- Machine-readable output remains schema-driven and should typically use the full unfiltered results list.
ReportScope ¶
Bases: str, Enum
Controls which per-file entries are rendered for human output.
ReportScope affects only the human per-file listing used by the TEXT
and MARKDOWN emitters. It does not change the underlying pipeline result
set, and it should not affect machine-readable output or summary-only mode.
Values
ACTIONABLE: Entries that require user attention in the normal day-to-day workflow. This includes files that TopMark would change and other problem states that deserve visibility, but it intentionally hides unsupported entries from the per-file list. NONCOMPLIANT: Actionable entries plus unsupported entries. This is the broader "show everything that is not already okay" view. ALL: Every result, including unchanged/compliant entries.
Inclusion overview:
| scope | includes unsupported? | includes unchanged? | includes would-change? |
|---|---|---|---|
actionable |
no | no | yes |
noncompliant |
yes | no | yes |
all |
yes | yes | yes |
Notes
- Verbosity controls how much detail is shown for included entries; report scope controls which entries appear in the human per-file listing.
- Summary mode remains summary-only and bypasses per-file filtering.
- Machine-readable formats should continue to use the full unfiltered result set.
ReportFilterResult
dataclass
¶
Result of applying a report scope to pipeline contexts.
filter_results_for_report ¶
Filter raw pipeline results for human per-file rendering.
This helper is intentionally scoped to human per-file output. Callers
should keep the original results list for summary mode and for
machine-readable output.
Semantics
ReportScope.ALL: keep every result.ReportScope.NONCOMPLIANT: keep everything that is not already okay, including unsupported entries.ReportScope.ACTIONABLE: keep entries that need attention, but hide unsupported entries from the per-file list and summarize them separately.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
list[ProcessingContext]
|
Raw pipeline results. |
required |
report_scope
|
ReportScope
|
Active report scope for the current view. |
required |
would_change
|
Callable[[ProcessingContext], bool]
|
Predicate describing whether a result represents a file TopMark would change (or did change, depending on caller context). |
required |
Returns:
| Type | Description |
|---|---|
ReportFilterResult
|
|
ReportFilterResult
|
|
ReportFilterResult
|
|