Repository navigation
bizdays 2.0.0: v2 integration (WIL-154 go/no-go) - #68
Merged
Merged
Conversation
- Implemented comprehensive tests for the DateIndex class in `test_dateindex_numpy.py`, covering various scenarios for business day calculations, including normal and reversed date ranges, as well as vectorized operations. - Created utility tests in `test_utils.py` for the `match` function and `isstr` type checker, ensuring correct behavior for various input cases. - Introduced utility functions in `utils.py`, including a custom exception `DateOutOfRange`, and implemented the `match` function to find indices of elements in a table.
…ce match function
- Created ANBIMA.txt with holiday dates from 2000 to 2078. - Added B3.cal with weekends and holiday dates from 2000 to 2024. - Introduced Actual.cal as a placeholder for actual calendar data. - Added Test.cal with sample holiday data for testing purposes. - Updated import statement in test_calendar.py to reflect new module structure.
…t cases for ANBIMA calendar
…ariable assignments
Checked against bizdays 1.0.19: DateOutOfRange was already exported (only its base class changed), offset past the end raised IndexError, offset(d, 0) keeps a holiday unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e wheel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Calendar() and Calendar.load() raise ValueError for wrong argument types (weekdays, name, financial, filename), as the Errors section says. - Use a neutral payment example instead of the wrong NTN-B coupon date. - getdate docstring lists every accepted ref and expr type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIL-145: v1-to-v2 behaviour matrix
WIL-146: complete the v1-to-v2 migration guide
WIL-147: API reference and executable v2 examples
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iles Upgrade only the dev/docs packages that pip-audit flags on Python 3.10 and 3.14 (bleach, certifi, filelock, fonttools, idna, lxml, mistune, nbconvert, pillow, pygments, pytest, requests, soupsieve, tornado, urllib3, virtualenv), plus packaging and typing-extensions so that virtualenv can reach a fixed version on Python 3.10 too. The runtime export (numpy, pandas, python-dateutil, pytz, six, tzdata) and the bizdays version (2.0.0) do not change. Delete GUIA_MIGRACAO_PYTEST.md and docs/plans/2026-03-08-code-quality-improvements.md: nothing references them, and plans live in Linear, not in the repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bizdays has no "all" extra, so bizdays[all] installed core only. The smoke script now also turns any error in run_checks into a problem in its JSON line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 1.0.20: use the design 4.3 fallback heading, since 1.x has no date yet - test: reject YYYY-MM-DD placeholder headings - breaking: drop the KeyError clause, it is already a bug fix - breaking: v1 needed Python 3.9 or newer, not only 3.9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The temporary repo had no commit, so main also failed on the 'no commit' path and the test passed without the dirty check. Add an empty commit and assert the 'not a clean git tree' message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIL-154: release hygiene (uv.lock security refresh, stray files)
WIL-155: 2.0.0 changelog and release notes
WIL-153: validate the release candidate from clean installations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIL-155: date the 2.0.0 changelog entry
- Calendar(name=None), the 1.0.19 default, gives name "" again - weekdays may be a NumPy array or pandas Series - structured NumPy arrays as dates raise ValueError - long date strings accept ASCII digits only - getdate year refs beyond 2**53 raise ValueError - JSON calendar files with a UTF-8 BOM load - README/API docs: ANBIMA is official up to 2079, projected after Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIL-154: final review fixes
wilsonfreitas
marked this pull request as ready for review
November 8, 2026 09:29
…changelog entry 1.0.20 is now the last 1.x release on PyPI. It has the same API as 1.0.19 and only extends the B3 data, so the guide compares 2.0 with 1.0.20 and says where 1.0.19 differs (B3 ended in 2026). The CHANGELOG gets the real 1.0.20 entry from origin/1.x (final-review finding 8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WIL-146: migration guide baseline is 1.0.20
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.
What this is
This PR merges
feature/typingintomaster. It is bizdays 2.0.0: a newCalendarbuilt on NumPy, with every method vectorized, a frozen public API, and a release workflow with trusted publishing.This PR is the WIL-154 go/no-go review target. Do not merge it by hand. WIL-157 merges it, after Wilson posts
GOon WIL-154 and gives a separate go-ahead for the merge.H):cc1868bad2978ab0fb13d8306081b853c2cc943ev2.0.0rc3(commit458ee3f, parentH; it only changes the version to2.0.0rc3inpyproject.tomlanduv.lock)origin/master(2d9051c) is an ancestor ofH: 0 commits behind, 170 ahead.Breaking changes
2.0.0 breaks the 1.x API. The full list, with one "how to migrate" entry per change, is in
docs/source/migration.rstand in the2.0.0section ofCHANGELOG.md. The main ones:numpy>=1.24,pandas>=2(pandas 3 tested).bizdays[pmc],bizdays[xcal],bizdays[work].Calendar,list_calendars,DateOutOfRange.get_option/set_option, the pandas/ISO modes andcal.vecare gone.datetime64,float64,bool_, arrays); missing values areNaN/NaT.Calendar.load()takes keywords only (name=orfilename=) and reads only JSON calendar files.YYYY-MM-DD; whole-number counts; equal vector lengths (or length 1).DateOutOfRange(now aValueError).getdate(expr, ref)replacesgetdate(expr, year, month)and follows the R bizdays grammar.API inventory
Public names:
Calendar,list_calendars,DateOutOfRange. Reference:docs/source/api.rst.CalendarmembersCalendar(...),Calendar.load(name=... | filename=...)name,holidays,weekdays,startdate,enddate,financialisbizday,inrangebizdays,diff,getbizdaysoffset,following,preceding,modified_following,modified_preceding,adjust_next,adjust_previousseq,getdateDateOutOfRangeis aValueErrorand haspositions(every element out of range).list_calendars()lists the packaged calendars (ANBIMA, B3, Actual) and the provider calendars (PMC/,XCAL/,WORK/).Linear issues
Milestone "python-bizdays 2.0.0". All issues are Done except WIL-154 (this review), and WIL-157 and WIL-156, which by design run after Wilson's GO.
feature/typingCalendar.getbizdaysfor v2feature/typingwithmastera3229b1py.typed, overloads)Risks and accepted findings
CHANGELOG.md1.0.20 entry keeps its fallback text, because 1.0.20 (WIL-228, on the1.xbranch) is not released yet; copy the real entry when it ships.filelock 4.1.0,pillow 12.3.0,tornado 6.5.10inuv.lock. They are contributor tools, not shipped. The fixed versions (4.2.1, 13.0.0, 6.6) need Python 3.11 or newer. Accepted.GOcomment on WIL-154 is the approval of record.Test evidence (on
H)CI on
H: all 13 checks pass, including the requiredci-okanddocs.v2.0.0rc3(tests, docs, build, TestPyPI upload, smoke; PyPI skipped): https://github.com/wilsonfreitas/python-bizdays/actions/runs/42471920474 and https://test.pypi.org/project/bizdays/2.0.0rc3/Dependabot
Today
masterhas 115 open alerts (4 critical, 60 high, 46 medium, 5 low). All of them are onpoetry.lock, which this PR deletes. None is a runtime dependency.poetry.lockonmasteruv.lockMerge plan
H.--match-head-commit cc1868bad2978ab0fb13d8306081b853c2cc943e, only after Wilson'sGOon WIL-154 and his go-ahead for WIL-157.masteris protected by a ruleset: PR required, required checksci-okanddocs, no force push, no deletion, no bypass.VAL_SUMS, then tags and publishes.🤖 Generated with Claude Code