Skip to content

Fixed readme failed tests, improved badges and words #768#776

Merged
henrydingliu merged 2 commits into
mainfrom
#768
May 14, 2026
Merged

Fixed readme failed tests, improved badges and words #768#776
henrydingliu merged 2 commits into
mainfrom
#768

Conversation

@kennethshsu
Copy link
Copy Markdown
Collaborator

@kennethshsu kennethshsu commented May 13, 2026

Summary of Changes

  • Improved readme badges, words
  • Fixed the test runs on push again (it was accidentally commented out)

Related GitHub Issue(s)

Fixes #768

Additional Context for Reviewers

N/A

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)

Note

Low Risk
Low risk: changes are limited to GitHub Actions triggers and README badge/text updates, with no impact to runtime/library behavior.

Overview
Re-enables the pytest.yml GitHub Actions workflow on push events (all branches), restoring automatic unit test runs outside of PRs.

Refreshes README.rst badges by reordering them, adding conda-forge version/download badges, restoring the license badge, and making minor wording/formatting tweaks (e.g., emphasizing "YOUR" and renaming the documentation section).

Reviewed by Cursor Bugbot for commit b498d66. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.08%. Comparing base (f8dd20b) to head (b498d66).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #776   +/-   ##
=======================================
  Coverage   86.08%   86.08%           
=======================================
  Files          86       86           
  Lines        4923     4923           
  Branches      638      638           
=======================================
  Hits         4238     4238           
  Misses        486      486           
  Partials      199      199           
Flag Coverage Δ
unittests 86.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

@henrydingliu this is the clean PR, I nuked the other one and just started over, it was too messy for me to undo everything. Sorry about that.

@henrydingliu
Copy link
Copy Markdown
Collaborator

still showing failing unit test
image

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

The badge looks at the runs on main only, so GitHub will run the test if (and only if) something is pushed to main after this merge. Tests run on PRs are not good enough (but I thought they would, which is why I commented out - this is wrong).

@henrydingliu
Copy link
Copy Markdown
Collaborator

if main isn't gonna be getting a lot of pushes due to how our collaborator group works, then maybe we should switch the badge to be based on the nightly instead?

CI Upstream

@kennethshsu
Copy link
Copy Markdown
Collaborator Author

I think main is the norm on ReadMes, we can add the upstream/nightly too but that's definitely more for developers.

@henrydingliu henrydingliu merged commit 7f35bbc into main May 14, 2026
15 checks passed
henrydingliu pushed a commit that referenced this pull request May 14, 2026
* uncomment the test runs on push

* badges, rearrangement, words
@kennethshsu kennethshsu deleted the #768 branch May 14, 2026 18:49
henrydingliu added a commit that referenced this pull request May 15, 2026
* REFACTOR: Reorganize type hierarchy of sparse.py. Move array-level functions to sparse.COO, and keep module-level functions to sp.

Replaces xp() with xp.COO() to create sparse arrays when xp used to be callable and was used as a constructor.

* FIX: Apply bugbot fixes.

* FIX: Apply bugbot fixes.

* FIX: Apply bugbot fixes.

* TEST: Add unit tests to chainladder.utils.sparse to cover missing lines.

* Expanded apriori docstring

* Improved docstring and added examples

* added code for doc tests

* Added a new checkbox to remind PR to run tests

* better command and surpressed some warnings

* Added example, removed reference to chainladder

* doctstrings with examples

* Added covergence to the n_iters parameter.

* docstring improvement and examples

* Added expectedloss method

* Improved docstrings and examples

* New clrd from CAS

* added load_sample

* Build(deps): Bump mistune from 3.1.4 to 3.2.1

Bumps [mistune](https://github.com/lepture/mistune) from 3.1.4 to 3.2.1.
- [Release notes](https://github.com/lepture/mistune/releases)
- [Changelog](https://github.com/lepture/mistune/blob/main/docs/changes.rst)
- [Commits](lepture/mistune@v3.1.4...v3.2.1)

---
updated-dependencies:
- dependency-name: mistune
  dependency-version: 3.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Improved docstring

* Clarification

* Update pyproject.toml

* Updated the example in fit

* v.0.9.2 release notes

* Added a last minute PR

* Added more releaes notes from older versions that were not included in the doc site

* Bumping pandas to 2.3.3 in preparation of pandas 3.0

* Small typo, thanks AF!

* One more approved PR (docstrings improvement)

* bumping pandas

* Fix Adjustments API page linking to chainladder.workflow (#762)

Closes #757

The Adjustments section header in docs/library/api.md was a copy-paste
of the Workflow section. The :mod: link and .. automodule:: directive
both pointed at chainladder.workflow, so the rendered RTD page for
Adjustments hyperlinked to the Workflow module page.

The four classes listed under Adjustments (BootstrapODPSample,
BerquistSherman, Trend, ParallelogramOLF) all live in
chainladder.adjustments, which is the correct target.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>

* Annotate matplotlib dependency as required for TriangleDisplay.heatmap() (#761)

Per maintainer feedback on #758/#761: matplotlib is needed at runtime
for TriangleDisplay.heatmap() even though it isn't imported directly,
so it must remain a core dependency. Add an inline comment so future
contributors don't try to move it again.

Co-authored-by: Nick Kinney <nkinney06@gmail.com>

* Build(deps): Bump urllib3 from 2.6.3 to 2.7.0

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updated date and some final merged PRs

* Add more installation options

* Added uv run in the pytest

* feat(data): wire clrd2025 into load_sample, docs, and tests (#745)

Adds the clrd2025 branch in load_sample mirroring the existing clrd
config, but using the modernized CAS Schedule P column names
(IncurredLosses rather than IncurLoss). Updates the docstring's
complete dataset list and the sample-data documentation page. Adds a
targeted test asserting the six LOBs, modern column names, and origin
starting at 1998.

The underlying clrd2025.csv was added by @kennethshsu on branch #745.

Closes part of #745.

* Added the new clrd2025

* test(development): assert exclusions-ignored UserWarning in drop tests (#765) (#777)

* test(development): assert exclusions-ignored UserWarning in drop tests (#765)

Per #765, ~75 UserWarnings firing from chainladder/development/base.py
during tests that deliberately exercise the drop/exclusion path were
not being asserted. Wrapping each warning-producing call in
`pytest.warns(UserWarning, match=...)` makes the contract explicit:
the test fails if the warning stops firing OR if its message changes.

Per @kennethshsu's preference on the issue thread, used the
`pytest.warns` idiom uniformly (no blanket `@pytest.mark.filterwarnings`),
so each individual call site that should warn does so observably.

Affected tests (chainladder/development/tests/):
  - test_development.py: test_drophighlow (5 of 7 calls), test_new_drop_5,
    test_new_drop_5a (both _set_weight_func calls), test_new_drop_7,
    test_pipeline (both fits)
  - test_incremental.py: test_pipeline (both fits); added `import pytest`

The two `test_drophighlow` calls that don't warn (`drop_high=0` and
`drop_high=[T,F,T,F]`) were left untouched — wrapping them would
incorrectly require a warning that doesn't fire.

Verified locally: 671 passed, 12 xfailed (pre-existing). Targeted
6-test 'exclusions ignored' warning count drops from 10 to 4 in the
pytest summary (the remaining 4 are pytest's source-line accounting
from inside the `pytest.warns` blocks, not leaked warnings).

Refs #765.

* Annotate exclusions-ignored warning as test-asserted

Add an in-source comment above each warnings.warn(...) call for the
'Some exclusions have been ignored...' UserWarning, noting that the
message is matched by pytest.warns(..., match=...) in the development
test suite. Future edits to the warning text must update the
corresponding test matchers.

Addresses review feedback on #777.

* Fixed readme failed tests, improved badges and words #768 (#776)

* uncomment the test runs on push

* badges, rearrangement, words

* #686 (#772)

* Implemented policy_length

* undo the refactor

* added tests for policy_length

* Fixed bug to round D to int

* Fixed an issue on the tests

* Removed blank line

* Formatted with black

* Added more tests

* clarification

* Moved the parallelogram tests from utilities to parallelogram file

* Refactored leap and nonleap

* Improved docstring with assumption

* Refactored, all bugs resolved

* Cleaned up debugger

* Clean up, removed debugger

* Added a guard to prevent averaging nothing

* Added another simple example

* Added Henry's tests

* Fixed bugbot errors

* Added 2 new tests

* Removed the fstring

* Improved docstring and added two examples (#788)

* Improved docstring and added two examples

* Added a new test iat exceptions - thanks HL

* Allowing project to drop a threshold of 0.1%

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Gene Dan <genedan@gmail.com>
Co-authored-by: Kenneth Hsu <kennethshsu@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wendy-w2029z <wj78919@gmail.com>
Co-authored-by: Kevin <74339271+SaguaroDev@users.noreply.github.com>
Co-authored-by: Nick Kinney <nkinney06@gmail.com>
Co-authored-by: Nick Kinney <Nick.Kinney4@gmail.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.

Readme Build failure

2 participants