Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv for Python package manager #571

Open
hongquan opened this issue Mar 10, 2025 · 0 comments
Open

Use uv for Python package manager #571

hongquan opened this issue Mar 10, 2025 · 0 comments

Comments

@hongquan
Copy link
Member

hongquan commented Mar 10, 2025

When adding new Python libraries or updating the existing ones, we need to find compatible version. The job will be easier, more reliable if our dependencies are managed by a modern Python package managers like Poetry, PDM, uv. Due to its speed, let's go with uv.

When adopting uv, please also rearrange the depdendency list in pyproject.toml. Currently, the dependencies which are tools for development, not the part of applications, are placed in "dev" feature. It is not correct. They should be placed in "dependency-group".


Update

  • Please split the dependency groups to these:
    • doc: For sphinx and other libs required to build docs.
    • test: For pytest and other tools, libs required to run unittest. Later on, we will add mypy and stubs libraries (like django-stubs) to this group.
    • lint: For Ruff.
    • dev: For the rest.

This task is not simply updating pyproject.toml file. We also need to update Docker build script, GH Action to use uv to install Python libs, because pip doesn't understand uv's lock file.


Update

  • Renamed docs group.
  • Added dev group.
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

No branches or pull requests

1 participant