Commit 79f428d
committed
efficient-did: complete cluster_name rename propagation + suppress duplicate Bootstrap summary line
Two follow-up fixes:
1. cluster → cluster_name propagation. The original PR renamed the
EfficientDiDResults.cluster field to cluster_name but left two
consumers still referencing the old name:
- tests/test_business_report.py:1267 (TestHausmanPretestPropagatesCluster
regression test asserting the field is persisted for the Hausman
pretest replay) — updated assertion + class docstring.
- docs/api/_autosummary/diff_diff.EfficientDiDResults.rst — the
checked-in Sphinx autosummary still listed cluster and was missing
cluster_name, n_clusters, vcov_type, and the new to_dict() method.
2. Suppress duplicate Bootstrap summary header. EfficientDiDResults.summary()
previously emitted both the legacy "Bootstrap: <n> (<weights>)" header
line (L250-L251 pre-PR) and the new "Inference method: bootstrap" +
"Bootstrap replications: <n>" block. The legacy header is now gated on
`bootstrap_results is None` so analytical-only fits keep the original
render and bootstrap-overwritten fits use the canonical inference-method
block alone (matches the sibling result-container convention).
211 tests pass across test_efficient_did.py, test_efficient_did_validation.py,
test_diagnostics.py, and test_business_report.py::TestHausmanPretestPropagatesCluster.
black + ruff clean on touched Python files.1 parent 64cc8a2 commit 79f428d
3 files changed
Lines changed: 11 additions & 4 deletions
File tree
- diff_diff
- docs/api/_autosummary
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
1245 | | - | |
| 1245 | + | |
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
| |||
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | | - | |
| 1269 | + | |
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
| |||
0 commit comments