Use uv pip for workspace dependency installs#471
Conversation
|
Codex seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Use comfy-cli's own
uvdependency for default workspace dependency installs, while still targeting the selected ComfyUI workspace Python explicitly.This updates the normal
comfy install/comfy updatedependency paths to run uv's pip-compatible installer as:instead of requiring the workspace environment itself to provide
python -m pip.Why
uv-created virtual environments can legitimately omit pip. In that setup, a ComfyUI workspace can have a valid Python interpreter but
comfy updatefails during dependency restore with:I hit this while trying to keep a ComfyUI install fully uv-managed. After routing the same install/update calls through uv while targeting the workspace interpreter, the flow completed normally and quickly. The dependency step produced uv output such as
Resolved,Prepared, andInstalled, andcomfy install --restorealso installed ComfyUI-Manager successfully.This keeps the default install/update path aligned with the existing uv support advertised by comfy-cli, rather than requiring users to manually repair pip or use a separate restore workaround.
Benefits
comfy install,comfy install --restore, andcomfy updatealigned with uv-backed dependency management.python -m pipif uv is unavailable.Changes
--python.comfy update.--extra-index-urlinstalls by adding uv's--index-strategy unsafe-best-match.python -m pipif uv is unavailable.pipanduvinto the target environment for fast-deps compatibility with remaining pip-based paths.Validation
git diff --checkpython3 -m py_compile comfy_cli/uv.py comfy_cli/command/install.py comfy_cli/cmdline.py.codacy/codacy.config.json, so local analysis first required generated config.codacy pull-request gh Comfy-Org comfy-cli 471returnedNot Foundwith the available token.mainis not protected by Codacy checks. That requires Comfy-Org repository admin configuration; this PR cannot enforce upstream branch protection by itself.Targeted pytest was prepared but not completed locally because the sandbox could not resolve PyPI while building the test environment before network escalation was approved.