stratified_packager.processing.reporting
QGIS-side assembly of the §9 report rows (run-level and per-zip).
Folds the build outcomes held in _BuildState into the row dataclasses
of report (which stays qgis-free — it only defines the rows and writes the
CSV). Orphan accounting (§9.1) also lives here. Runs on the algorithm thread; user-facing
warnings flow through the feedback.
Functions
|
Count features matching no stratum, per partitioned (primary) layer (§9.1). |
|
Fold worker outcomes into the §9.1 run-report rows. |
|
Build the §9.2 rows of one bundle (vector tables + payload entries). |
- stratified_packager.processing.reporting._outcome_for(state, stratum_name, prep)[source]
Look up a layer’s outcome, following the dedup-primary indirection (§12).
- Parameters:
state (
_BuildState) – The pool state.stratum_name (
str) – The stratum.prep (
_LayerPrep) – The (possibly non-primary) member prep.
- Return type:
- Returns:
The outcome of the prep’s own job, or of its group primary’s.
- stratified_packager.processing.reporting.account_orphans(material, state, report_rows, feedback)[source]
Count features matching no stratum, per partitioned (primary) layer (§9.1).
Run after the build: the read source’s feature count minus the union of every stratum’s matched fids (accumulated during writing). A staged read source normally holds only the matched union, so it reports zero — correct for the data actually packaged; under
EXPORT_FULL_PACKAGEit instead holds every feature (§8.2), so the true orphan count surfaces (those features ship in the<full>package).- Parameters:
material (
_Material) – The run material.state (
_BuildState) – The build state (carries the per-layer matched-fid unions).report_rows (
list[RunReportRow]) – Mutable run-report rows.feedback (
QgsProcessingFeedback) – Execution feedback channel.
- Return type:
- stratified_packager.processing.reporting.collect_report_rows(strata, material, state, report_rows)[source]
Fold worker outcomes into the §9.1 run-report rows.
- Parameters:
strata (
Sequence[StratumSpec]) – The surviving strata.material (
_Material) – The run material.state (
_BuildState) – The pool state.report_rows (
list[RunReportRow]) – Mutable run-report rows.
- Return type:
- stratified_packager.processing.reporting.zip_report_rows(material, members, state)[source]
Build the §9.2 rows of one bundle (vector tables + payload entries).
- Parameters:
material (
_Material) – The run material.members (
Sequence[StratumSpec]) – The bundle’s successful members.state (
_BuildState) – The pool state.
- Return type:
- Returns:
The rows, member-major.