Skip to content

Porting to uv#443

Open
EtienneT wants to merge 10 commits into
NannyML:mainfrom
EtienneT:main
Open

Porting to uv#443
EtienneT wants to merge 10 commits into
NannyML:mainfrom
EtienneT:main

Conversation

@EtienneT
Copy link
Copy Markdown

@EtienneT EtienneT commented Jun 5, 2025

I am doing this pull request more as a suggestion, but I had difficulties adding nannyml in my own project because of various package problems in windows. I decided to run uvx migrate-to-uv to port it from poetry to uv. Now everything works perfectly when I want to install it on my project (using my github fork for now). But uv is much faster than poetry and very pleasant to use.

Just run uv sync at the root of the repository and it should create a virtual environment in the folder .venv.

I just had to comment out the dependency on jupyterlab, it had problems building y-py package which jupyterlab depends on. But if I comment out jupyterlab, everything still worked fine for me, but I am probably missing something.

@EtienneT EtienneT requested review from nikml and nnansters as code owners June 5, 2025 19:47
@nnansters
Copy link
Copy Markdown
Contributor

Hey @EtienneT ,

Thanks for the initiative on this one! We've been using uv in some other projects already and I hadn't gotten round to introduce it here. I was dreading it a bit, to be honest, without reason apparently!

From what I recall the jupyterlab dependency was there as part of the docs generation process. When I get to reviewing this PR (and a couple more that are still open) I'll see how it breaks stuff.

In any case: big thanks for this!

@EtienneT
Copy link
Copy Markdown
Author

EtienneT commented Jun 9, 2025

Glad I could help, it took 5 min to port to uv (thanks to uvx migrate-to-uv) and then I could use it in my own project by referencing my github fork directly simply by adding the github repo as a dependency using uv.

@stale
Copy link
Copy Markdown

stale Bot commented Aug 8, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Aug 8, 2025
@EtienneT
Copy link
Copy Markdown
Author

EtienneT commented Aug 8, 2025

Bump just to make sure this issues doesn't stay stale.

@stale stale Bot removed the stale label Aug 8, 2025
@stale
Copy link
Copy Markdown

stale Bot commented Oct 7, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Oct 7, 2025
@stale stale Bot closed this Oct 14, 2025
@nnansters nnansters reopened this Apr 20, 2026
@stale stale Bot removed the stale label Apr 20, 2026
nnansters and others added 8 commits April 20, 2026 23:19
- Re-add kaleido (>=1.0) to dev dependencies; it was silently dropped
  during migrate-to-uv. Bump to 1.x for security fixes.
- Bump plotly to >=6.1,<7 for kaleido 1.x API compatibility
  (plotly 5.x uses the deprecated kaleido scope API).
- Restore lightgbm upper bound to <4.6 (migrate-to-uv widened it to <5).
- Pin pandas<3 to avoid pandas 3.0's strict dtype coercion breaking
  hundreds of tests on Python 3.11+ CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mean_absolute_error now returns a Python float rather than np.float64,
which doesn't have .round(). Wrap with the builtin round() instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two CBPE tests compared hardcoded floats with strict equality after
rounding to 4 decimals. These drifted across sklearn/numpy/scipy
versions (roc_auc and average_precision_score internals changed),
producing 4th-5th decimal differences on Python 3.11+ CI.

Switch to np.allclose / pd.testing.assert_frame_equal with atol=1e-4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The [testenv:build] recipe still called `poetry build` after the port.
Replace with `uv build`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mypy 1.20 rejects ** unpacking on dict[str, Any] | None. Substitute
an empty dict when the attribute is None.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
allowlist_externals only tells tox not to complain about unknown
commands; it doesn't install them. Add `uv` to deps so `uv build`
runs on CI (which doesn't have uv on PATH by default).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI on Python 3.11 (sklearn 1.8, numpy 2.4) produces roc_auc drifts
of ~6e-4 against the hardcoded expectations — the previous 1e-4
tolerance wasn't enough. Relax to 1e-3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.

3 participants