Add maketables plugin MVP for core experiments#773
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #773 +/- ##
==========================================
+ Coverage 93.48% 93.77% +0.29%
==========================================
Files 75 77 +2
Lines 11272 11881 +609
Branches 658 696 +38
==========================================
+ Hits 10538 11142 +604
- Misses 544 546 +2
- Partials 190 193 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Could I get a review on this @juanitorduz? Because this updates many notebooks I'm keen to merge it soon to avoid building up notebook conflicts. Very open to change requests, but it's intended as a foot in the door PR to get Currently getting this to green, in terms of codecov |
99f9214 to
8386847
Compare
…600) Introduce adapter-based __maketables_* support on BaseExperiment with targeted tests and configurable PyMC HDI intervals, then wire maketables tables into DiD/ITS/SC/RD docs notebooks with backend-appropriate formatting and guidance. Made-with: Cursor
Add maketables adapter/test coverage for additional experiments and backend-specific posterior coefficient shapes. Update affected docs notebooks with simple ETable examples, including side-by-side model comparisons where multiple fitted results are present. Made-with: Cursor
Add targeted unit tests for internal adapter helpers and edge cases that were uncovered in the codecov/patch report (62% → expected ~95%). Covers _safe_observation_count, _safe_r2_value, _canonical_frame, _extract_hdi_bounds, _get_maketables_hdi_prob, get_maketables_adapter, and SklearnMaketablesAdapter error paths. Adds integration test for PyMCMaketablesAdapter stat/metadata methods. Made-with: Cursor
Resolve merge conflicts from PR #749 in staggered_did_pymc.ipynb (re-add ETable cells and fix nbformat output metadata/name fields). Drop rkink_pymc.ipynb output-only changes in favor of main's version. Add docstrings to adapter methods to satisfy interrogate threshold. Made-with: Cursor
8386847 to
a9533d5
Compare
Use the named-dimension geometric adstock call only when the installed pymc-marketing version requires it, and repair stale notebook output metadata so schema validation passes again. Made-with: Cursor
Keep the named-dimension notebook path xtensor-native through logistic_saturation so the lift test example runs on newer pymc-marketing releases while preserving the legacy code path. Made-with: Cursor
Resolve the notebook conflict in its_lift_test by keeping the PR notebook content, which already included the main-branch compatibility fix plus the PR's extra maketables cells. Made-with: Cursor
|
I'm going to be a bit risky here and bypass rules requiring review. We have many docs pages touched in this PR and this is a dangerous state to be in because there is very high potential for notebook conflicts to occur in other PR's. So I'm going to merge this and deal with any fallout later. This is probably the minimal-paid path |
Summary
maketablesintegration onBaseExperimentvia__maketables_*hooks, without addingmaketablesas a core dependency.ETable(...)examples plus explanatory markdown into core DiD/ITS/SC/RD notebooks (PyMC and sklearn), using backend-appropriate table formatting.Fixes #600
Test plan
$CONDA_EXE run -n CausalPy python -m pytest --no-cov causalpy/tests/test_maketables_plugin.py$CONDA_EXE run -n CausalPy pre-commit run --all-filesETable(...)rendering behavior for PyMC and sklearn examplesNotes
Made with Cursor