Commit 5a50834
committed
PR #454 R4 polish: replicate-weight skip path + wrapper docstring mirror
R4 verdict was Looks good with two P3 polish items (plus the standing
R-parity-goldens follow-up, which is tracked and non-blocking). Both
addressed:
1. Replicate-weight skip path (P3 Code Quality): the R1 skip-vs-error
fix on `DiagnosticReport._check_bacon` only handled the within-unit-
varying-survey ValueError case. Replicate-weight survey designs
raise NotImplementedError from `BaconDecomposition.fit()` and were
still falling through to the generic exception handler as
`status="error"`. Added an `except NotImplementedError` branch that
returns a structured skip with a reason naming the supported
alternative (TSL-based design via SurveyDesign + precomputed=
escape hatch). New regression at
`TestBaconSurveyDesignNarrowing::test_diagnostic_report_skips_with_structured_reason_on_replicate_weights`.
2. Wrapper docstring mirror (P3 Documentation/Tests): the public
`bacon_decompose()` and `TwoWayFixedEffects.decompose()` wrappers
had short `first_treat` parameter descriptions that mentioned only
the 0/np.inf never-treated convention, omitting the new
always-treated remap + sentinel reservation contract that lives in
`BaconDecomposition.fit()`. Mirrored the expanded contract into
both wrappers (with a pointer to the full docstring on the class)
so users reading wrapper help see the behavior change.
Tests: 62 pass in test_methodology_bacon.py + test_bacon.py (one new
regression), 3 skipped (R parity); 98 pass across the broader
bacon/decompose surface.1 parent d35fe91 commit 5a50834
4 files changed
Lines changed: 90 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | | - | |
1254 | | - | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1255 | 1266 | | |
1256 | 1267 | | |
1257 | 1268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1774 | 1774 | | |
1775 | 1775 | | |
1776 | 1776 | | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1777 | 1802 | | |
1778 | 1803 | | |
1779 | 1804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
706 | 718 | | |
707 | 719 | | |
708 | 720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1070 | 1109 | | |
1071 | 1110 | | |
1072 | 1111 | | |
| |||
0 commit comments