Add verified reporting and notebook reconciliation - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:9e6b655918
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "DATA_QUALITY_DIR = Path(\".ci-output/data-quality\")\n", | ||
| "NOTEBOOK_OUTPUT_DIR = Path(\".ci-output/reporting-notebook\")\n", |
There was a problem hiding this comment.
Resolve CI paths from the repository root
In the newly added Execute reporting verification notebook step in .github/workflows/python-quality.yml, nbconvert executes the kernel with the input notebook's parent directory as its working directory. Consequently, this path resolves to notebooks/.ci-output/data-quality, while the preceding workflow creates .ci-output/data-quality at the repository root, so both CI matrix jobs stop here with a missing-input ReportingError. Resolve the paths relative to the repository root or explicitly configure the notebook execution directory.
Useful? React with 👍 / 👎.
| "overall_average_score_percentage": round( | ||
| float(inputs.cleaned["score_percentage"].mean()), 2 | ||
| ), | ||
| "overall_pass_rate_percentage": round(float(passed.mean() * 100), 2), |
There was a problem hiding this comment.
Handle reporting runs with zero accepted rows
When a valid data-quality run rejects every input row (or processes a header-only file), the upstream workflow deliberately emits an empty cleaned dataset and stable empty KPI schema, but passed.mean() returns pd.NA and converting it to float raises TypeError; the score mean also becomes NaN, which would produce non-standard JSON. Thus reporting cannot consume a valid upstream result. Define explicit null or zero semantics for both overall metrics, or raise a controlled ReportingError for this case.
Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds a compact reporting layer on top of the tested data-quality workflow. Persisted module KPIs are recalculated from cleaned records before any reporting output is accepted.
Reporting workflow
Notebook verification
notebooks/reporting_verification.ipynbPortfolio evidence
Automated verification
CI
The Python 3.12 matrix on Ubuntu 24.04 and Windows 2025 now runs:
Scope
This remains a learning-grade Data/BI workflow. It does not claim a production semantic model, Power BI report, scheduled orchestration, interactive dashboard or statistical inference from the synthetic fixture.
The PR will be merged only after the complete final matrix succeeds.