FIX: Make quarterly.csv development dates ISO 8601-compatible.#930
Open
genedan wants to merge 1 commit into
Open
FIX: Make quarterly.csv development dates ISO 8601-compatible.#930genedan wants to merge 1 commit into
genedan wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #930 +/- ##
==========================================
+ Coverage 88.28% 88.30% +0.01%
==========================================
Files 88 88
Lines 5029 5029
Branches 642 642
==========================================
+ Hits 4440 4441 +1
+ Misses 444 443 -1
Partials 145 145
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
henrydingliu
approved these changes
Jun 5, 2026
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.
Summary of Changes
2nd attempt at fixing the warnings for
cl.load_sample('quarterly'). Simply changes the development dates to be ISO 8601-compatible, i.e,1995-04instead of1995Q2.Related GitHub Issue(s)
#840
#928
Additional Context for Reviewers
I decided to keep the test introduced in #929 because that ValueError block was uncovered and needed a test anyway:
chainladder-python/chainladder/core/base.py
Lines 408 to 412 in 31b3432
Also made a change to the triangle docstring
dataargument which was causing typing warnings.uv run pytest) and documentation changes (uv run jb build docs --builder=custom --custom-builder=doctest)Note
Low Risk
Scope is sample CSV formatting, a docstring type hint, and a new regression test; no changes to core Triangle parsing logic beyond what existing
_to_datetimealready does.Overview
Updates the
quarterlysample dataset so development dates use ISO-friendly strings (1995-01,1995-04, …) instead of1995Q1-style labels, eliminating pandas datetime-inference warnings when callingcl.load_sample('quarterly'). Numeric cells in the CSV are unchanged aside from dropping trailing.0on integers.Also documents the
Triangleconstructordataparameter with a modern union type (DataFrame | DataFrameXchg | dict), and addstest_to_datetime_uninferrable_format_raisesto assert aValueErrorwith message "Unable to infer datetime" when origin/development strings cannot be parsed.Reviewed by Cursor Bugbot for commit a708691. Bugbot is set up for automated code reviews on this repo. Configure here.