Migrate development workflow to uv lockfile - #2016
Conversation
| deactivate || true | ||
| rm -rf .venv | ||
| uv venv .venv | ||
| uv sync --frozen --all-extras |
There was a problem hiding this comment.
This is not the same logic anymore. Previously it was:
- delete the venv
- create a new venv
Now we're also installing all the dependencies (including extras). So this needs to be addressed.
liopeer
left a comment
There was a problem hiding this comment.
Thanks for the work! I think I will have to take this over, since we will need to also fix a few things in the overall dependency handling. Might touch a bit too many things in the code base for a first contribution (but don't worry, once we merge the commits will still be associated with you as well!).
| ## build source and wheel package | ||
| dist: clean | ||
| python -m build | ||
| uv build |
There was a problem hiding this comment.
Need to check if that actually gives the same result.
| # useful for local development. | ||
| # Install the package in non-editable mode in CI. | ||
| ifdef CI | ||
| EDITABLE= |
There was a problem hiding this comment.
I think EDITABLE is not used anymore. Only NO_EDITABLE.
| install-minimal-extras: | ||
| uv pip install --exclude-newer ${EXCLUDE_NEWER_DATE} ${EDITABLE} ".[dev]" | ||
| uv pip install --resolution=lowest-direct --exclude-newer ${EXCLUDE_NEWER_DATE} --reinstall ${EDITABLE} ".[matplotlib,minimal,timm,video]" --requirement pyproject.toml | ||
| uv sync --python=${MINIMAL_PYTHON_VERSION} --resolution=lowest-direct --exclude-newer ${EXCLUDE_NEWER_DATE} ${NO_EDITABLE} --group dev --extra matplotlib --extra minimal --extra timm --extra video --upgrade-group dev |
There was a problem hiding this comment.
This currently does not properly work since we're not setting lower bounds for many packages.
Fixes #2015
Summary
uv.lockwith the configured cutoff datemake lockuv run --frozenCONTRIBUTING.mdandCLAUDE.mdfor the new workflowTesting
make lockpassesmake format-checkpassesmake type-checknow completes and reports five existing type-checking errors in unrelated filesmake install-minimalcurrently fails due to an existing NumPy 1.18.1/Python 3.12 compatibility issue