docs: make all RST code examples runnable in Python - #760
Open
wenddymacro wants to merge 1 commit into
Open
Conversation
Several doc pages (index, triple_diff, mmm, business_report, practitioner_*) displayed Python examples referencing undefined data/columns, so copying them into a REPL raised NameError/ValueError. Make each snippet self-contained with the library's data generators, and extend the doc-snippet test to CI-cover these files so the examples stay runnable: - index.rst: define the hero example's data with generate_did_data - api/triple_diff.rst: build DDD/panel data with generate_ddd_data / generate_staggered_ddd_data; fix column names (group/partition/time) - api/mmm.rst: supply the experimental panels for the lift-test and Meridian prior examples - api/business_report.rst: construct a staggered store panel; drop the deprecated fit(aggregate=) kwarg - practitioner_decision_tree.rst: build concrete panels for the HAD universal-rollout and SurveyDesign examples - practitioner_getting_started.rst: mark the narrative summary block as context-dependent (it reads results/pt from earlier steps) - tests/test_doc_snippets.py: add the seven previously-uncovered RST files to RST_FILES so every doc example is smoke-tested in CI
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.
Several doc pages (index, triple_diff, mmm, business_report, practitioner_*) displayed Python examples referencing undefined data/columns, so copying them into a REPL raised NameError/ValueError. Make each snippet self-contained with the library's data generators, and extend the doc-snippet test to CI-cover these files so the examples stay runnable:
Methodology references (required if estimator / math changes)
Validation
Security / privacy