chore: use uv for dep management#4221
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
|
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
Signed-off-by: Xuanwo <github@xuanwo.io>
PsiACE
left a comment
There was a problem hiding this comment.
Using [dependency-groups] in pyproject.toml for uv to manage development, documentation, and test dependencies is a great idea.
for big project, use uv workspace
|
Thank you, will take a look over |
|
@Xuanwo I just moved to use uv workspace for lance namespace: https://github.com/lancedb/lance-namespace It works pretty well with a shared |
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
|
cc @jackye1995 to take another look |
| # Optional heavy dependencies | ||
| ray = ["ray[data]<2.38; python_version<'3.12'"] |
There was a problem hiding this comment.
I hope eventually we can put tensorflow, duckdb, polars and others over here. I think our "core test dependencies" really should just by pytest and pytest-benchmark.
There was a problem hiding this comment.
what would be the difference? When we run a test that involves one of these dependencies, we still would need to install it. Do you expect we also separate out those tests agaisnt tensorflow, duckdb, etc. so normal pytest only tests core functionalities?
There was a problem hiding this comment.
Yeah I think it would be nice to have test just cover all core tests.
Then an integration-tests dependency list to install heavy depencies like tensorflow and torch.
It's pretty easy in pytest to skip a test if a dependency is not found using pytest.importorskip(): https://docs.pytest.org/en/stable/how-to/skipping.html#skipping-on-a-missing-import-dependency
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
| # Optional heavy dependencies | ||
| ray = ["ray[data]<2.38; python_version<'3.12'"] |
There was a problem hiding this comment.
Yeah I think it would be nice to have test just cover all core tests.
Then an integration-tests dependency list to install heavy depencies like tensorflow and torch.
It's pretty easy in pytest to skip a test if a dependency is not found using pytest.importorskip(): https://docs.pytest.org/en/stable/how-to/skipping.html#skipping-on-a-missing-import-dependency
Signed-off-by: Xuanwo <github@xuanwo.io>
|
Will work on a new one. |
This updates the Python contributor docs to prefer `uv` for local environment initialization and day-to-day command execution, while keeping the documented `Makefile` targets unchanged. I intentionally did not migrate CI in this PR. We have already tried broader `uv` rollouts in #4221 and are still carrying a larger CI refactor in #5210; the current Python workflows still have materially different dependency shapes across lint, wheel-install test, benchmark, and optional Torch / TensorFlow / Ray paths, so I don't see a single environment definition we can switch to safely without a dedicated CI pass. This keeps the local guidance moving in the right direction without pretending the CI environment has already been unified. No tests were run because this is a docs-only change.
Close #4138
This PR only introduces
uv, and in subsequent ones, we will gather any missing dependencies inpyconfig.tomllikeuv pip install --system -r docs/requirements.txt.