Skip to content

Commit db28d37

Browse files
igerberclaude
andcommitted
Release 3.4.0: SpilloverDiD (Butts 2021), Bacon R-parity goldens, agent-discoverability surface, MPD+absorb HC2/HC2-BM auto-route, PreTrendsPower R-parity audit, Roth (2022) paper review, dCDH predict_het × placebo R-parity
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5fcaad7 commit db28d37

6 files changed

Lines changed: 9 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [3.4.0] - 2026-05-19
11+
1012
### Added
1113
- **Agent-discoverability contract test (`tests/test_agent_discoverability.py`).** New static-snapshot test pinning the agent-facing surface introduced by PR #464: `__all__` membership of `agent_workflow` / `profile_panel` / `get_llm_guide` / `practitioner_next_steps` / `BusinessReport`; `dir(diff_diff)` head-first ordering against `_AGENT_FACING_ORDER` (catches drift in the `_OrderedName` `__lt__` ordering trick); `_OrderedName` `isinstance(_, str)` + str-method compatibility; `dir()` full-namespace + `inspect.getmembers` parity; top-level `__doc__` first-paragraph mention of `agent_workflow` + named references to the 5-step workflow primitives; `agent_workflow()` script content references each downstream helper by name; canonical estimator class names (CallawaySantAnna, ContinuousDiD, HeterogeneousAdoptionDiD, etc.) remain importable. No live API calls; runs in the default pytest suite. Closes [issue #461](https://github.com/igerber/diff-diff/issues/461) (snapshot variant — live-agent regression test deferred to a separate follow-up that depends on causal-llm-eval packaging its harness). Also closes the `__dir__()` contract-test row from `TODO.md` that PR #464 deferred here.
1214
- **`diff_diff.agent_workflow(df, unit=..., time=..., treatment=..., outcome=...)` — stateless orchestrator for LLM-agent discoverability** (`diff_diff/agent_workflow.py`). Prints (and returns as dict) a copy-pasteable 5-step workflow with the caller's column names templated in: `profile_panel` → `get_llm_guide("autonomous")` → `<Estimator>(...).fit(df, ...)` → `practitioner_next_steps(result)` → `BusinessReport(result).full_report()`. The function calls nothing internally and does not inspect `df`; it is a guided tour, not a router. Surfaces the canonical workflow primitives (`profile_panel`, `get_llm_guide`, `practitioner_next_steps`, `BusinessReport`) that cold-start agent dry-passes at [igerber/causal-llm-eval](https://github.com/igerber/causal-llm-eval) showed agents practically never reach for on their own. Output structure: `{"profile_call", "guide_call", "fit_candidates", "validation_calls", "reporting_call", "script"}`; `fit_candidates` is a flat list of estimator/diagnostic class names referenced in the workflow patterns (each must remain importable on `diff_diff`, locked by `tests/test_agent_workflow.py::test_fit_candidates_all_importable`). Closes [issue #460](https://github.com/igerber/diff-diff/issues/460).
@@ -1477,6 +1479,7 @@ for the full feature history leading to this release.
14771479
[2.1.2]: https://github.com/igerber/diff-diff/compare/v2.1.1...v2.1.2
14781480
[2.1.1]: https://github.com/igerber/diff-diff/compare/v2.1.0...v2.1.1
14791481
[2.1.0]: https://github.com/igerber/diff-diff/compare/v2.0.3...v2.1.0
1482+
[3.4.0]: https://github.com/igerber/diff-diff/compare/v3.3.3...v3.4.0
14801483
[3.3.3]: https://github.com/igerber/diff-diff/compare/v3.3.2...v3.3.3
14811484
[3.3.2]: https://github.com/igerber/diff-diff/compare/v3.3.1...v3.3.2
14821485
[3.3.1]: https://github.com/igerber/diff-diff/compare/v3.3.0...v3.3.1

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ authors:
77
family-names: Gerber
88
orcid: "https://orcid.org/0009-0009-3275-5591"
99
license: MIT
10-
version: "3.3.3"
11-
date-released: "2026-05-15"
10+
version: "3.4.0"
11+
date-released: "2026-05-19"
1212
doi: "10.5281/zenodo.19646175"
1313
url: "https://github.com/igerber/diff-diff"
1414
repository-code: "https://github.com/igerber/diff-diff"

diff_diff/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
DCDH = ChaisemartinDHaultfoeuille
294294
HAD = HeterogeneousAdoptionDiD
295295

296-
__version__ = "3.3.3"
296+
__version__ = "3.4.0"
297297
__all__ = [
298298
# Estimators
299299
"DifferenceInDifferences",

diff_diff/guides/llms-full.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> A Python library for Difference-in-Differences causal inference analysis. Provides sklearn-like estimators with statsmodels-style output for econometric analysis.
44

5-
- Version: 3.3.3
5+
- Version: 3.4.0
66
- Repository: https://github.com/igerber/diff-diff
77
- License: MIT
88
- Dependencies: numpy, pandas, scipy (no statsmodels dependency)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "diff-diff"
7-
version = "3.3.3"
7+
version = "3.4.0"
88
description = "Difference-in-Differences causal inference with sklearn-like API. Callaway-Sant'Anna, Synthetic DiD, Honest DiD, event studies, parallel trends."
99
readme = "README.md"
1010
license = "MIT"

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "diff_diff_rust"
3-
version = "3.3.3"
3+
version = "3.4.0"
44
edition = "2021"
55
rust-version = "1.85"
66
description = "Rust backend for diff-diff DiD library"

0 commit comments

Comments
 (0)