Skip to content

maint: remove numba as a direct dependency (#483)#898

Merged
kennethshsu merged 1 commit into
casact:mainfrom
SaguaroDev:483-remove-numba-dep
Jun 1, 2026
Merged

maint: remove numba as a direct dependency (#483)#898
kennethshsu merged 1 commit into
casact:mainfrom
SaguaroDev:483-remove-numba-dep

Conversation

@SaguaroDev
Copy link
Copy Markdown
Contributor

@SaguaroDev SaguaroDev commented May 31, 2026

Closes #483.

numba is listed in [project.dependencies] (numba>0.54) but is not imported anywhere in the package — a grep of the chainladder/ tree returns no import numba / from numba.

As @jbogaardt noted on the issue, numba is a hard dependency of sparse, which chainladder depends on directly. I confirmed this against the current pin: sparse 0.17.0 declares numba>=0.49, so numba is still installed transitively after removing the direct entry. @genedan's 2026-05-18 comment proposed exactly this for 0.9.3.

Removing the direct pin also stops chainladder from constraining numba independently of sparse, which is what was causing the numpy-compatibility friction reported earlier in the thread (the chainladder-pinned numba lagging numpy).

Verification

  • With numba>0.54 removed from [project.dependencies], uv pip install -e ".[dev]" re-resolves the environment and numba is still present: numba 0.63.1 (pulled via sparse).
  • Full suite: 717 passed, 12 xfailed (the xfails and warnings are pre-existing, unchanged from a clean run).

Single-line change to pyproject.toml. Happy to adjust if you'd prefer to also set a numba floor somewhere explicit, but since it's transitive-only now I left it to sparse to constrain.


Note

Low Risk
Single-line dependency metadata change; numba remains via sparse and the suite was verified unchanged.

Overview
Removes numba>0.54 from pyproject.toml [project.dependencies]. The package does not import numba directly; it remains available transitively via sparse, so install graphs still include numba without chainladder imposing its own pin.

That avoids an extra, package-level numba constraint that could drift from sparse’s requirements and contribute to numpy/numba compatibility friction.

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

numba is not imported anywhere in chainladder (grep of the package tree
returns no 'import numba' / 'from numba'). It is a hard dependency of
sparse (sparse 0.17.0 declares numba>=0.49), which chainladder depends
on directly, so numba is still installed transitively after this change.

Removing the direct 'numba>0.54' pin also stops chainladder from
constraining numba independently of sparse, which was a source of
numpy-compatibility friction reported on the issue.

Verified: with numba removed from [project.dependencies], uv re-resolves
the env with numba 0.63.1 still present (via sparse), and the full test
suite passes (717 passed, 12 xfailed) with no new failures.

Closes casact#483.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.90%. Comparing base (8a9a46e) to head (899d808).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #898   +/-   ##
=======================================
  Coverage   86.90%   86.90%           
=======================================
  Files          87       87           
  Lines        4932     4932           
  Branches      624      624           
=======================================
  Hits         4286     4286           
  Misses        456      456           
  Partials      190      190           
Flag Coverage Δ
unittests 86.90% <ø> (ø)

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 kennethshsu merged commit fc74e6f into casact:main Jun 1, 2026
10 checks passed
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.

[MAINT] Remove numba as required dependency

3 participants