Commit 8ccfadf
Address PR #396 R1 review (1 P1 + 1 P2)
P1: troubleshooting:block17/block18 are not actually context-dependent
within docs/troubleshooting.rst — the page has no prior HAD est/results
binding before the new HAD Issues section. Suppressing NameError on
those IDs hid broken docs (the readers' copy-paste would fail) while
CI stopped reporting the failure.
Fix: rewrote both snippets self-contained, mirroring the inline HAD-
shape panel construction pattern from PR #396's r_comparison:block6
fix and the upstream choosing_estimator:block7 fix in 55d7a27.
- block17 (Resolved estimand inspection): inline 200-unit / 5-period
HAD panel with beta(0.5, 1.0) doses — d.min() near zero so the
Design 1' (continuous_at_zero) detection rule fires and `target_
parameter == "WAS"` for the inspection demo.
- block18 (Mass-point design selected): inline 200-unit / 5-period
HAD panel where 30% of units share d_lower=0.5 so the
modal-fraction-at-d.min() > 2% threshold trips and `_detect_design`
resolves to mass_point. Verified locally: design='mass_point',
target_parameter='WAS_d_lower'.
Both snippets now define `est` and `results` locally; removed
troubleshooting:block17 and troubleshooting:block18 from
_CONTEXT_DEPENDENT_SNIPPETS.
P2: r_comparison:block6 was already in _CONTEXT_DEPENDENT_SNIPPETS
from a pre-existing entry, but PR #396's earlier rewrite already made
it self-contained. The stale allowlist entry would mask future
NameError regressions. Removed.
Verification: PYTHONPATH=. DIFF_DIFF_BACKEND=python pytest
tests/test_doc_snippets.py reports 111 passed, 4 skipped, 0 failed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 8ecbaf7 commit 8ccfadf
2 files changed
Lines changed: 55 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | 501 | | |
503 | | - | |
504 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
505 | 522 | | |
506 | 523 | | |
507 | 524 | | |
508 | 525 | | |
509 | 526 | | |
510 | | - | |
511 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
512 | 531 | | |
513 | 532 | | |
514 | 533 | | |
| |||
536 | 555 | | |
537 | 556 | | |
538 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
539 | 589 | | |
540 | 590 | | |
541 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
372 | | - | |
373 | 370 | | |
374 | 371 | | |
375 | 372 | | |
| |||
0 commit comments