Replace pip-compile-based dependency management with uv-based approach#1352
Conversation
Switch to the use of uv means we don't need this anymore.
The use of uv makes it possible to generate lock files with the necessary version constraints automatically; we don't have to figure them out manually.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request migrates the dependency compilation process from a Docker-based pip-compile setup to a local bash script utilizing uv. It updates the dependency files with Python version markers, regenerates the environment files with hashes, and configures uv in pyproject.toml. The review feedback highlights two key issues: the getopts parser in the new bash script will incorrectly swallow options intended for uv, and a critical lower bound constraint for cirq-core was omitted for Python versions older than 3.11.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request replaces the previous Docker-based pip-compile workflow with a faster, uv-based dependency compilation process. It introduces a new script, dev_tools/requirements/create-env-files.sh, updates dependency requirements with environment markers, regenerates the environment lock files with hashes, and configures uv in pyproject.toml. Feedback on the changes highlights a potential Shellcheck warning (SC2086) in the new shell script due to unquoted variables, with a recommendation to use a Bash array to safely handle optional arguments.
pavoljuhas
left a comment
There was a problem hiding this comment.
Please see inline comments regarding max_compat files, otherwise LGTM.
Also, if all .env.txt files will be only generated by the uv, consider marking them up with the linguist-generated git attribute like here (can be a separate PR).
pavoljuhas
left a comment
There was a problem hiding this comment.
LGTM, please see one last suggestion before merging.
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
|
Resolved by #1340 |
Replace the Docker file and scripts in dev_tools/requirements with a simpler scheme that uses
uv. Among other things,uv's smarter method for producing lock files makes it possible to deal with Cirq version interactions with Python's versions, so that users can use the latest Cirq version if they are also using recent Python versions.