chore: post-merge hardening, coverage, and 2.1.0#22
Merged
Conversation
Follow-up to #20 (SE gamma fix) and #21 (n_grid), landing changes that weren't part of either contributor PR: - base.py: n_grid < 2 now raises ValueError (was a degenerate grid); validated before the empty-t early return. Document n_grid on cum() and the sibling volume methods (were stale "currently unused"); pass **kwargs through monthly_vol_equiv's prepend for consistency. - test/test_perf.py: add coverage for the n_grid guard and the SE small-n gamma-overflow fallback path. - docs/versions.rst: 2.1.0 entry (SE fix flagged as a breaking numerical change; n_grid; THM cleanup). - docs/numerical_integration.rst + integration_validation.py: n_grid convergence analysis (second-order; 10k -> ~2e-6, 2000 -> ~5e-5), SE small-n fallback note, print_ngrid_convergence(). - ci.yml + pyproject.toml + .gitignore: upload coverage to Coveralls via coverallsapp/github-action (ubuntu/3.12 cell, continue-on-error). - Bump version 2.0.0 -> 2.1.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #20 (SE gamma fix) and #21 (
n_grid), landing changes that weren't part of either contributor PR.Hardening
n_gridguard —_integrate_withnow raisesValueErrorforn_grid < 2(a degenerate grid), validated before the empty-tearly return.n_gridis documented on the publiccum()and the sibling volume methods (interval_vol,monthly_vol,monthly_vol_equiv), which previously claimed kwargs were "currently unused, reserved for future use."monthly_vol_equivnow threads**kwargsthrough itsprependcall, matchinginterval_vol.Tests
n_grid < 2guard and the SE small-ngamma-overflow fallback path (the parametrized SE regression only exercisedn ∈ [0.3, 0.8], i.e. the closed-form branch).Error analysis
docs/numerical_integration.rst+integration_validation.pygain ann_gridconvergence characterization (second-order; 10,000 → ~2e-6, 2,000 → ~5e-5 worst-case relative error), a note on the SE small-nfallback, and aprint_ngrid_convergence()helper so the table is reproducible. Accuracy is governed byn_grid, not the density of the requestedtarray.Coverage
coverallsapp/github-action@v2(ubuntu/3.12 cell).pytestnow writescoverage.lcov. The upload step iscontinue-on-errorbecause thetestmatrix is a required check onmain— a Coveralls outage must not block merges.coverage/coverallscan be re-added as a required check once it reports.Version
2.0.0→2.1.0. The SE fix is flagged in the version history as a breaking numerical change (EUR/cum for any SE fit withn ≠ 0.5now differ — understated up to ~64% atn=0.3, overstated ~10% forn > 0.5).Verified locally:
ruffclean,mypyclean, 39 tests pass.