pymc-labs / pymc-labs/CausalPy
Refresh pipeline_workflow.ipynb and report_demo.ipynb outputs after #819 lands
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 115
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 11
Description
Summary
Re-execute the documentation notebooks that consume sensitivity checks via SensitivityAnalysis + GenerateReport so that the embedded HTML report shows the new auto-rendered check figures introduced in #819.
[!IMPORTANT]
Do not start work on this issue until #819 is merged and closed. This is a follow-up cleanup that depends on the newCheck.plot()methods and theGenerateReportfigure-rendering wiring landing onmainfirst. Working on this in parallel will create merge conflicts in notebook outputs.
Background
PR #819 adds plot() staticmethods to PlaceboInSpace, PlaceboInTime, LeaveOneOut, and PriorSensitivity, and auto-populates CheckResult.figures inside each check's run(). GenerateReport then renders those figures (base64-encoded PNGs) into the HTML report. Existing pipeline-based notebooks do not need code changes, but their saved outputs were generated before this wiring existed, so the embedded report HTML in their cell outputs does not yet contain the new figures.
sc_pymc.ipynb is already re-executed as part of #819 and is therefore out of scope here.
Scope
Re-execute the following notebooks in the CausalPy conda environment and commit the refreshed outputs:
docs/source/notebooks/pipeline_workflow.ipynb— usescp.checks.PlaceboInTimeviaSensitivityAnalysis+GenerateReport(include_plots=True).docs/source/notebooks/report_demo.ipynb— same pattern aspipeline_workflow.
No code changes to these notebooks are expected. The point of the work is purely to refresh saved cell outputs so readers see the new figures the PR description promises.
Out of scope
staggered_did_pymc.ipynbandrkink_pymc.ipynbusePreTreatmentPlaceboCheckandBandwidthSensitivity, which #819 does not touch — no refresh needed.- The remaining notebooks that grep-match "placebo" only mention it in a generic disclaimer paragraph and do not invoke the check API.
- Adding a dedicated example of the new direct-API
Check.plot(result, ...)ergonomic tosensitivity_checks.mdwould be nice but should be tracked separately if pursued.
Acceptance criteria
-
pipeline_workflow.ipynbre-executed end-to-end in theCausalPyenv; the embedded report HTML in its outputs shows the placebo-in-time figure. -
report_demo.ipynbre-executed end-to-end; embedded report HTML shows the placebo-in-time figure. -
$CONDA_EXE run -n CausalPy make html(run fromdocs/) builds cleanly. -
prek run --all-filespasses, including thevalidate-notebooksschema check. - No code edits to either notebook beyond what re-execution naturally produces in the JSON.
Notes for the implementer
- Use a notebook-aware tool to re-execute (Jupyter Lab, VS Code notebook UI, or
jupyter nbconvert --to notebook --execute --inplace) so the JSON stays valid against the nbformat schema. - Run inside the conda env per
AGENTS.md:$CONDA_EXE run -n CausalPy jupyter nbconvert --to notebook --execute --inplace docs/source/notebooks/pipeline_workflow.ipynb. - If
validate-notebooksfails afterward, follow the recovery steps inAGENTS.md(re-open and save in a notebook-aware editor, restore frommainand reapply, etc.).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Wait until #819 is merged and closed, then re-execute docs/source/notebooks/pipeline_workflow.ipynb and docs/source/notebooks/report_demo.ipynb in the CausalPy environment using the notebook-aware command in the issue. Confirm their embedded HTML reports contain the placebo-in-time figure, then run the docs make html build and prek run --all-files; done means both notebooks validate and no unrelated edits appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- build-system, documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100