Review a report before it is published

capstone · 90 min · Objective 4.3

Task

The domain 4 capstone. Build an automatic pre-publication checklist for the one-page report, prove it catches planted errors, and write the sign-off that says who checked the report and who owns its numbers.

Steps

  1. Build the report from the static-report lab again, as lab/review/report.html.
  2. Write lab/review/checklist.py taking a report's path and printing one line per check, PASS NAME or FAIL NAME, exiting 1 if any fail. The checks are headline-orders (the orders figure equals the valid orders recalculated from the data), headline-revenue (net_revenue equals the recalculation to the cent), regions-sum (the region rows sum to net_revenue within 0.05), as-of-present and four-regions.
  3. Copy the report to lab/review/broken.html and plant two faults: change the orders figure to 2000, and delete the as-of line.
  4. Write lab/review/signoff.md with the headings ## Checked, ## Reviewer, ## Owner and ## Corrections.

Verify

These checks run in a POSIX shell with Python 3: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. On Windows, python3 is often a Microsoft Store placeholder that prints “Python was not found”; run alias python3=py in Git Bash first.

python3 lab/review/checklist.py lab/review/report.html; echo "exit $?"
python3 lab/review/checklist.py lab/review/broken.html | grep -c '^FAIL'
grep -cE '^## (Checked|Reviewer|Owner|Corrections)' lab/review/signoff.md

Five PASS lines and exit 0 for the real report, 2 FAIL lines for the broken copy, and all 4 sign-off headings. The planted 2000 is the raw row count, not the valid orders: the exact mistake a report makes when a filter is dropped, and one that no amount of looking at the page would catch.

This is an independent study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.