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

build: always use uv for dependency management #265

Merged
merged 5 commits into from
Sep 9, 2024
Merged

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Sep 5, 2024

Modifies the build tooling to always use uv pip instead of pip and uv build instead of python -m build.

Additional checks are added to ensure that uv exists on the system. If uv does not exists, then it is installed via pip. If pip is not installed, it is installed via python -m ensurepip. The pip check is required for a virtual environment created by uv venv since by default, uv venv does not install pip.

The UV_SYSTEM_PYTHON environment variable is set in CI and Docker to force uv to use the system Python environment instead of depending on a virtual environment. See https://docs.astral.sh/uv/configuration/environment/

This reduces the execution time of make from 22s to 5s on my machine without a Pip cache. With a hydrated PIp cache, the execution time is reduced from 8s to 2s.

Copy link

github-actions bot commented Sep 5, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1257 1212 96% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 818e1b8 by action🐍

Copy link
Collaborator

@zackverham zackverham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool - makes sense to me!

I'm not super familiar with uv but it looks to be pretty easy to drop-in as a replacement.

@tdstein tdstein merged commit 2a36391 into main Sep 9, 2024
33 checks passed
@tdstein tdstein deleted the tdstein/uv-tooling branch September 9, 2024 14:13
tdstein added a commit that referenced this pull request Sep 20, 2024
BREAKING CHANGE: removes support for accessing resource fields using
`__getattr__` (e.g., `user.username`). Use `__getitem__` instead (e.g.,
`user["username"]`.

depends on #265 and #266
closes #262
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.

2 participants