Skip to content

chore: docstring + naming + repr cleanup, bump 0.0.6 (closes #78) - #79

Merged
thomaspinder merged 1 commit into
mainfrom
audit/04-style-sweep
May 18, 2026
Merged

thomaspinder merged 1 commit into
mainfrom
audit/04-style-sweep

Conversation

@thomaspinder

Copy link
Copy Markdown
Collaborator

Summary

Wraps up the audit cleanup stack — small individual fixes that share a single style/cleanup theme.

Closes #78. Final layer of the 4-PR audit stack, stacked on top of #77 (PR3).

Breaking changes (pre-v0.1)

  • IdentifiedVAR.forecast_error_variance_decomposition removed. Migrate to IdentifiedVAR.fevd (same signature). Long name was always an alias.

Test plan

  • make test — 281/281 pass.
  • make check — ruff + ty clean; uv lock --locked matches pyproject.toml.
  • make docs-render-ci — clean, exit 0.
  • grep -r forecast_error_variance_decomposition src/ tests/ docs/ — no matches (gate 3).
  • grep -rn ':meth:\|:class:' src/ — no matches (gate 4).
  • grep -rn '\`' src/` — no matches (gate 5).
  • SVData._MIN_OBS not in model_fields (gate 6).
  • FittedVAR(...).model_dump() does not include has_exog (gate 7).
  • repr(ForecastResult(...)) shows steps=4, var_names=['a', 'b'], no idata (gate 8).
  • pyproject.toml shows version = "0.0.6" (gate 9).

🤖 Generated with Claude Code

@codecov-commenter

codecov-commenter commented May 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.2%. Comparing base (a24ae46) to head (6ed2c7e).

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #79   +/-   ##
=====================================
  Coverage   92.2%   92.2%           
=====================================
  Files         27      27           
  Lines       1172    1167    -5     
  Branches     114     114           
=====================================
- Hits        1081    1077    -4     
+ Misses        68      67    -1     
  Partials      23      23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thomaspinder
thomaspinder force-pushed the audit/03-extract-helpers branch from 04cbae5 to f450066 Compare May 18, 2026 21:55
@thomaspinder
thomaspinder changed the base branch from audit/03-extract-helpers to main May 18, 2026 22:05
Wraps up the spring-cleaning stack. Individually small fixes that
cluster naturally into one style PR.

- src/impulso/volatility.py: `Constant.cholesky_path` /
  `forecast_cholesky_path` docstrings reference `L` (the actual
  posterior key after #69) instead of `Sigma`; cross-ref
  `Constant.cholesky_at` as the canonical accessor.
- src/impulso/sv/data.py: `_MIN_OBS` is now `ClassVar[int] = 24` —
  makes the class-attribute intent explicit instead of relying on
  Pydantic's implicit underscore handling.
- src/impulso/fitted.py: `FittedVAR.has_exog` drops `@computed_field`
  (now a plain `@property`) so it stops appearing in `model_dump()`.
- src/impulso/sv/dynamics.py: `RandomWalk.build_latent_path` /
  `AR1.build_latent_path` swap `Any` for `"pt.TensorVariable"` forward
  refs that match the SVDynamics Protocol declaration; drop the
  now-unused `Any` import.
- src/impulso/results.py: delete `VARResultBase.__repr__` override —
  Pydantic's default produces a useful compact repr because every
  `idata` field has `Field(repr=False)`.
- src/impulso/**/*.py: docstring sweep — double backticks (RST) → single
  backticks (Markdown / mkdocstrings); no more `:meth:` / `:class:`
  cross-refs (replaced with plain backticked names in earlier passes).
- CLAUDE.md: codify the docstring convention under "Code Conventions".
- src/impulso/identified.py: delete
  `forecast_error_variance_decomposition`; `fevd` is the canonical
  name. Docstring + .qmd / .md cross-references updated.
- pyproject.toml + uv.lock: bump `0.0.5 → 0.0.6` to ship the cumulative
  audit cleanup (#73 + #75 + #77 + this PR).

Closes audit findings #5, #8, #12, #13, #14, #15, #16
(reports/audit-2026-05-18.md).

Breaking (pre-v0.1): callers of
`IdentifiedVAR.forecast_error_variance_decomposition` must use
`IdentifiedVAR.fevd` (no signature change). The long name was always
an alias; per repo policy pre-v0.1 API breaks are in scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thomaspinder
thomaspinder force-pushed the audit/04-style-sweep branch from b117cd4 to 6ed2c7e Compare May 18, 2026 22:05
@thomaspinder
thomaspinder merged commit 0b341ae into main May 18, 2026
14 checks passed
@thomaspinder
thomaspinder deleted the audit/04-style-sweep branch May 18, 2026 22:15

This branch was previously deployed

1 inactive deployment
docs-preview — 6ed2c7e9 Deployed May 18, 2026 by thomaspinder via deploy-docs-preview #160
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.

Docstring + naming + repr cleanup, bump 0.0.6

2 participants