QuantEcon / QuantEcon/QuantEcon.py
MAINT: Raise test coverage on _arma, _lss, _kalman
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 2.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 3
Description
Problem
Package coverage is strong overall, but three long-standing core modules lag well behind (figures from the current instrument; re-baseline after the coverage-measurement fix in this milestone lands):
| Module | Coverage | Untested regions |
|---|---|---|
_arma.py |
53% | property setters (phi/theta), simulation/impulse-response paths |
_lss.py |
75% | validation branches, simulate_linear_model region, stationarity paths |
_kalman.py |
80% | stationary_* computations, smoothing branches |
Notably, simulate_linear_model is one of the six names missing from the top-level namespace (#853) — untested code and broken export travel together.
Proposed change
Targeted tests, not ceremony: setter round-trips and seeded simulation shape/determinism checks for _arma; constructor-validation pytest.raises cases and a simulate_linear_model statistical sanity check for _lss; the stationary-solution fixed-point property (residual of Σ = A Σ A' + C C') for _kalman. Aim ≥85% per module; don't chase plotting/__repr__ lines.
Acceptance criteria
- Each module ≥85% against the post-fix coverage baseline
- New tests are deterministic (seeded) and fast
From the July 2026 technical-debt audit (AI-assisted; claims verified against 28d4b3b on 2026-07-25).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the existing tests and the three named modules: _arma.py, _lss.py, and _kalman.py. Re-run coverage after the measurement fix, then add deterministic tests for the listed setters, validation, simulation, stationarity, and smoothing paths; done means each module reaches at least 85% with fast seeded tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100