Migrate to uv for dependency management#85
Conversation
nstrauss
left a comment
There was a problem hiding this comment.
Cloned locally and ran through all the new make commands with uv. Succeeded at each step with no issues. Resulting builds look identical as expected. I already see the associated matrix job passing (https://github.com/macadmins/jamf-pro-sdk-python/actions/runs/27036259358) across macOS and Ubuntu.
The only suggestion I have is to document how to update dependencies with uv as I'm sure that'll come up in the future. For those not familiar with the project, how can the lockfile be safely modified, and is it worth (or even a good idea) bumping dependencies automatically with something like Dependabot. Otherwise solid PR and the right direction for dependency management.
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
| python-version: | ||
| - "3.9" |
There was a problem hiding this comment.
With 3.9 being EOL we should remove from the matrix and drop support. Something we already talked about. Doesn't have to be in this PR.
Overview
Migrates the development workflow from pip/venv to uv. This PR only includes changes to tooling, it does not change source code whatsoever.
What Changed
Tooling
uv.lockfor reproducible and pinned installs.Makefiletargets now useuvand all targets are declared.PHONYto prevent collisionsuv buildproduces the same sdist and wheelCI
astral-sh/setup-uvwith lockfile based caching and run through existingmaketargetsDocs
docs/contributing/index.rst→ "Dev environment setup" updated to the uv flow (install uv,make install, no manual venv activation required)pip install jamf-pro-sdkWhy
uvgives reproducible installs from the lockfile that is committed, but my primary desire for migrating to uv is efficiency and ease. It sets up the environment much faster and is a single tool for envs, deps, and builds.