fix: SDiD plot() API and sdid_pymc notebook ruff compliance#919
Merged
Conversation
Apply isort-aligned imports and drop an unused test-module import so pre-commit (including merge-preview runs) passes. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Documentation build overview
44 files changed ·
|
SDiD had _bayesian_plot only; integration tests call result.plot(). Register the class in the plot-signature allowlist from #886. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #919 +/- ##
==========================================
+ Coverage 94.87% 95.05% +0.17%
==========================================
Files 85 87 +2
Lines 13174 13644 +470
Branches 793 807 +14
==========================================
+ Hits 12499 12969 +470
Misses 479 479
Partials 196 196 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plot()onSyntheticDifferenceInDifferences, delegating to_render_plot, so integration tests and callers match the Make plot() args and kwargs visible in API docs (umbrella) #886 experiment contract (and the SDiD docs notebook).docs/source/notebooks/sdid_pymc.ipynbsopre-commit.cipasses on merge previews.SyntheticDifferenceInDifferencesintest_public_plot_signatures.pyso the subclass is covered by the explicit-plot()invariant.Context
maincould failtest (3.14)withAttributeError: ... no attribute 'plot'even though SDiD already implemented_bayesian_plot; this PR completes the public API.Test plan
prek runon touched Python filespytest causalpy/tests/test_integration_pymc_examples.py::test_sdid causalpy/tests/test_integration_pymc_examples.py::test_sdid_datetime_index_and_effect_summary causalpy/tests/test_public_plot_signatures.pyprek/test (3.14))