Skip to content

Prepare 0.6.0 release#28

Merged
igerber merged 4 commits intomainfrom
claude/prepare-0.6.0-release-V6fGP
Jan 4, 2026
Merged

Prepare 0.6.0 release#28
igerber merged 4 commits intomainfrom
claude/prepare-0.6.0-release-V6fGP

Conversation

@igerber
Copy link
Copy Markdown
Owner

@igerber igerber commented Jan 4, 2026

No description provided.

claude added 4 commits January 4, 2026 12:01
- Update version numbers to 0.6.0 in pyproject.toml, __init__.py, docs/conf.py
- Remove docs/reviews folder (obsolete PR review documents)
- Update TODO.md roadmap to reflect all 1.0 blockers are complete
- Fix all 21 ruff linting issues:
  - Auto-fix import ordering with ruff --fix
  - Remove unused variables (period_to_x, pre_periods, post_periods, etc.)
  - Rename ambiguous variable 'l' to 'lower' in visualization.py
  - Replace == True/False with truthiness checks in tests
  - Update pyproject.toml to use [tool.ruff.lint] section

- Fix all 94 mypy type errors:
  - Add Optional[] types for parameters with None defaults
  - Add explicit float() casts for numpy floating returns
  - Add np.asarray() wrapping for numpy returns to satisfy type checker
  - Add assertions before accessing potentially None attributes
  - Add # type: ignore[override] for intentional fit() signature variations
  - Add missing return statement in run_placebo_test()
  - Relax mypy config to disable numpy-specific strict checks

All tests pass (368 passed, 14 skipped), ruff clean, mypy clean.
- Remove outdated limitation about covariate adjustment not being implemented
- Add documentation for CallawaySantAnna covariates parameter
- Show example of doubly robust estimation with covariates
Document all releases from 0.1.0 through 0.6.0 following
Keep a Changelog format with Added/Changed/Fixed sections.
@igerber igerber merged commit 40ff236 into main Jan 4, 2026
@igerber igerber deleted the claude/prepare-0.6.0-release-V6fGP branch January 4, 2026 12:38
igerber added a commit that referenced this pull request Apr 19, 2026
… cache

Bundles the two remaining S-complexity findings from the Phase 2 audit,
closing Phase 3 execution.

Finding #12 — ContinuousDiD B-spline degenerate knot (axis C, Minor,
`continuous_did_bspline.py:153`): `bspline_derivative_design_matrix`
silently swallowed `ValueError` from `scipy.interpolate.BSpline` in the
per-basis derivative loop, leaving affected columns of the derivative
design matrix as zero with no user-visible signal. Downstream
ContinuousDiD analytical inference then fed a biased `dPsi` into SE
computation. Fix aggregates failed-basis indices and emits ONE
`UserWarning` naming them. The all-identical-knot degenerate case
(single dose value, `knots[0] == knots[-1]`) remains silently handled —
derivatives there are mathematically zero, well-defined, and always
have been.

Finding #28 — PowerAnalysis survey-design cache staleness (axis J,
Major, `power.py:171-180`): `_build_survey_design()` populated
`self._cached_survey_design` on first call and never invalidated.
Mutating `config.survey_design` after `__init__` silently returned the
stale cached design. Default construction is microseconds and
user-provided designs are reference copies, so the cache never earned
its cost. Fix drops the cache entirely; method now reflects live
`self.survey_design` every call.

Six new tests:
- `tests/test_continuous_did.py::TestBSplineDerivativeDegenerateBasis` (3):
  single-dose silent contract, `ValueError`-forced aggregate warning,
  happy-path no-warning regression.
- `tests/test_power.py::TestSurveyPowerConfigDesignStaleness` (3):
  mutate-survey_design-picks-up-new, clearing-falls-back-to-default,
  repeat-calls-equivalent regression.

REGISTRY notes added under §ContinuousDiD (edge cases) and §PowerAnalysis
(`survey_config` section).

Audit state post-PR: all 28 actionable Phase-2 findings resolved (26 in
prior PRs; #12 + #28 here). Three P1 follow-ups remain logged in
`TODO.md` from PR #337's discovered divergences (FW/PGD algorithmic
mismatch in `compute_synthetic_weights`, TROP grid-search on rank-
deficient Y, TROP bootstrap RNG unification). Those are post-audit
cleanup work, not Phase-3 scope.

No behavioral changes on clean inputs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants