Skip to content

build: uses uv for dependency locking#482

Closed
jeandersonbc wants to merge 1 commit into
mainfrom
fix-build-dependencies
Closed

build: uses uv for dependency locking#482
jeandersonbc wants to merge 1 commit into
mainfrom
fix-build-dependencies

Conversation

@jeandersonbc

Copy link
Copy Markdown
Contributor

This PR addresses the lack of dependency lock for development.

The main change is the adoption of UV to streamline development lifecycle:

  • Removes setup.py/setup.cfg (and favor pyproject.toml)
  • introduces uv.lock as the single universal lock file (with hashes)
  • migrates tox to tox-uv
  • updates all CI workflows and the Makefile to use UV
  • adds a clean target,
  • documents the contributor workflow in the README.

I considered using pip-tools but the final result created way too many configuration files. UV is more convenient since it also brings control over python versions for development.

@jeandersonbc jeandersonbc requested a review from a team as a code owner May 29, 2026 11:11
@jeandersonbc jeandersonbc force-pushed the fix-build-dependencies branch from 787ffda to 1765a01 Compare May 29, 2026 11:11

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the project's dependency management and tooling from pip and setup.py to uv and pyproject.toml, updating the Makefile, README.md, and tox.ini accordingly. Feedback on these changes includes: 1) in tox.ini, running 'make tests' bypasses tox's isolated environments, so the test command should be run directly; 2) in the Makefile, hardcoding uv configurations prevents custom enterprise setups, and the 'clean' target's find command should be optimized using '-prune'; 3) the custom uv index in pyproject.toml is redundant and should be removed; and 4) the README.md should recommend uv's standalone installer instead of pip.

Comment thread tox.ini
Comment thread Makefile
Comment on lines +1 to +3
# UV_NO_CONFIG bypasses system overrides
# UV_DEFAULT_INDEX enforces the use of PYPI registry
UV=UV_NO_CONFIG=1 UV_DEFAULT_INDEX=https://pypi.org/simple/ uv

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding UV_NO_CONFIG=1 and UV_DEFAULT_INDEX=https://pypi.org/simple/ prevents developers in enterprise environments from using their custom uv configurations, private package registries, or corporate proxies. It is better to allow UV to be overridden or simply default to uv without bypassing user configurations.

UV ?= uv

Comment thread Makefile
Comment thread pyproject.toml
Comment on lines +49 to +51
[[tool.uv.index]]
url = "https://pypi.org/simple/"
default = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Defining [[tool.uv.index]] pointing to PyPI as the default is redundant because uv already defaults to PyPI. Moreover, hardcoding this in pyproject.toml makes it harder for developers or CI environments using private package mirrors to override the index. It is recommended to remove this block.

Comment thread README.md Outdated
@jeandersonbc jeandersonbc force-pushed the fix-build-dependencies branch from 1765a01 to 369275d Compare May 29, 2026 11:19
Removes setup.py/setup.cfg, introduces uv.lock as the single universal lock file (with hashes),
migrates tox to tox-uv, updates all CI workflows and the Makefile to use UV, adds a clean
target, and documents the contributor workflow in the README.
@jeandersonbc jeandersonbc force-pushed the fix-build-dependencies branch 4 times, most recently from dcfaf79 to be3d854 Compare May 29, 2026 12:03
@sonarqubecloud

Copy link
Copy Markdown

@jeandersonbc

Copy link
Copy Markdown
Contributor Author

Closing this for now, as I want more time to address this.

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