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

Added support for the uv package and project manager #408

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

GatlenCulp
Copy link

@GatlenCulp GatlenCulp commented Dec 29, 2024

Summary

This PR integrates uv — a fast Python package and project manager written in Rust by the team that made the ruff linter — as an environment manager. Updates made to the Makefile and CLI to support this.

GatScreen_2024-12-30_16 00 24@2x

Key Changes

  • Makefile
    • make create_environment - Added a target to creates a virtual environment with uv and installs the requested python version using uv
    • make requirements simply installs dependencies with uv pip install -r requirements.txt which is faster than normal pip. This does not generate a lockfile and the dependencies will be removed if uv sync is run. (see below for more info)

Testing

  • uv added as an additional environment manager in test_creation.py and a harness was added in similar style to the other environment managers. Tests passing locally.
  • GitHub actions tests are passing passing

Recommendations

  • Consider adding an option with no dependency file and track dependencies in pyproject.toml only. This allows for using the higher-level and convenient uv sync or uv add commands which generate a lockfile. This is also becoming more standard.
    • Using uv add -r requirements.txt after removing -e . from the file will add the dependencies to pyproject.toml and generate the lockfile. This might be a better implementation for make requirements

@GatlenCulp GatlenCulp marked this pull request as ready for review December 30, 2024 22:22
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.

1 participant