Repository navigation
Docstring + naming + repr cleanup, bump 0.0.6 #78
Copy link
Copy link
Closed
Description
Context
Audit reports/audit-2026-05-18.md findings #5, #8, #12,
#13, #14, #15, #16. These are individually small but
cluster naturally into one style/cleanup PR.
| # | Surface | Issue |
|---|---|---|
| 5 | volatility.py:Constant |
cholesky_path / forecast_cholesky_path docstrings reference Sigma, but code reads L after PR #69. |
| 8 | sv/data.py:SVData |
_MIN_OBS: int = 24 relies on Pydantic's implicit underscore handling — annotate as ClassVar to make the class-attribute intent explicit. |
| 12 | fitted.py:FittedVAR.has_exog |
@computed_field means it appears in model_dump() though only used internally — should be a plain @property. |
| 13 | sv/dynamics.py |
RandomWalk.build_latent_path / AR1.build_latent_path use Any for typed parameters declared on the SVDynamics Protocol — should be "pt.TensorVariable" forward refs. |
| 14 | results.py:VARResultBase |
__repr__ override always returns "ClassName()". Pydantic's default produces a useful compact repr because every idata field has Field(repr=False). |
| 15 | All src/impulso/**/*.py |
Inconsistent docstring style: double backticks (RST) vs single backticks (Markdown); :meth: / :class: cross-refs vs plain text. mkdocstrings expects single backticks. |
| 16 | identified.py |
forecast_error_variance_decomposition is the canonical name with fevd as alias. Per decisions ledger Q8: hard rename — fevd is canonical, long name deleted. |
Resolution
Per plans/2026-05-18-audit-cleanup-plan.md PR4. Also:
- Codify the docstring convention in
CLAUDE.md(single backticks for
inline code, plain text for cross-refs). - Bump
pyproject.tomlversion0.0.5 → 0.0.6to ship the cumulative
audit cleanup (PRs fix: labelled DataFrames for IRF / FEVD / HD result accessors (closes #72) #73, feat: type-safe is_time_varying flag + at='all' guards (closes #74) #75, refactor: extract MA recursion + lift time-dim guard to base (closes #76) #77, plus this one).
Acceptance
make check && make testclean.make docs-render-ciclean.grep -r "forecast_error_variance_decomposition" src/ tests/ docs/
returns nothing.grep -r ":meth:\|:class:" src/returns nothing.grep -rn '\`' src/` returns nothing inside docstrings.SVData._MIN_OBSis a class attribute (not inmodel_fields):
assert "_MIN_OBS" not in SVData.model_fields.FittedVAR(...).model_dump()does not includehas_exog.repr(ForecastResult(...))showssteps=..., var_names=[...]and
omitsidata.pyproject.tomlshowsversion = "0.0.6".
Shipping
PR4 (final layer) of the 4-PR audit stack, stacked on top of #77 (PR3).
Breaking change (pre-v0.1)
IdentifiedVAR.forecast_error_variance_decomposition is removed. Callers
must use the existing canonical IdentifiedVAR.fevd (no signature
change). Justification: pre-v0.1 API breaks are in scope per repo policy,
and the long name was always an alias.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
chore: docstring + naming + repr cleanup, bump 0.0.6 (closes #78)
chore: docstring + naming + repr cleanup, bump 0.0.6 (closes QuantCli…