Skip to content

fix: Use uv instead of pip in Makefile - #109

Merged
evansenter merged 6 commits into
mainfrom
fix/makefile-use-uv
Mar 30, 2026
Merged

fix: Use uv instead of pip in Makefile#109
evansenter merged 6 commits into
mainfrom
fix/makefile-use-uv

Conversation

@evansenter

Copy link
Copy Markdown
Owner

Summary

  • Replace .venv/bin/pip install with uv sync in venv, dev, install-server, and install-client targets
  • Remove venv as prerequisite from install-server and install-client (uv sync handles it)
  • Aligns with agent-session-analytics Makefile conventions

Closes #108

Test plan

  • make check passes (299 tests)
  • make install-client REMOTE_URL=... works on a fresh clone
  • make install-server works on the server machine

🤖 Generated with Claude Code

Align with agent-session-analytics by using `uv sync` instead of
`.venv/bin/pip install`. The pip-based venv target breaks on machines
where uv manages environments.

Closes #108

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 19, 2026

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Replaces pip install with uv sync across all Makefile targets (venv, dev, install-server, install-client) and removes the now-unnecessary venv prerequisite from install targets, fixing the fresh-clone failure described in #108.

Issues Found

Critical

None

Important

None

Suggestions

  • Makefile:24 - The venv target is now functionally identical to what install-server and dev already do inline (uv sync). Consider whether it's still worth keeping as a standalone target, or if it exists purely as a convenience alias. Not a problem, but worth a quick thought on whether to keep it in .PHONY and documented, or simplify.

Verdict

REQUEST_CHANGES - One minor suggestion about the now-redundant venv target.


Automated review by Claude Code

CI was using pip which resolves latest fastmcp, but a newer version
broke the .fn attribute used in tests. Using uv sync with the lockfile
ensures CI uses the same pinned dependencies as local development.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 19, 2026

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Replaces pip install with uv sync across Makefile targets and CI workflows, fixing the fresh-clone failure where .venv/bin/pip doesn't exist when uv manages the environment. Also adds astral-sh/setup-uv@v5 to CI.

Issues Found

Critical

None

Important

None

Suggestions

  • Makefile:24 - The venv target is now just uv sync, which is identical to the first command in install-server (line 36) and a subset of dev (line 29). Consider removing it or making it an alias (e.g., venv: install-server) to reduce duplication. If kept as a convenience entry point, a comment clarifying its purpose relative to dev would help. (Also raised in prior review round.)

Verdict

REQUEST_CHANGES - One minor suggestion about the now-redundant venv target.


Automated review by Claude Code

The lockfile pins fastmcp to 2.14.4 — without it, CI resolves
fastmcp 3.x which broke the .fn attribute API used in tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 19, 2026

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Replaces pip install with uv sync across the Makefile and CI workflows, and commits uv.lock, fixing the fresh-clone failure described in #108 where .venv/bin/pip doesn't exist in uv-managed environments.

Issues Found

Critical

None

Important

  • scripts/install-systemd.sh:17, scripts/install-launchagent.sh:16 - Error messages still suggest python3 -m venv .venv && source .venv/bin/activate && pip install -e . as the recovery command when the venv is missing. Since the Makefile now uses uv sync exclusively, these should suggest make install-server or uv sync instead. Similarly, scripts/install-cli.sh:15 suggests pip install -e .. These stale error messages will confuse users on fresh clones — the exact scenario this PR fixes.

Suggestions

  • Makefile:24-25 - The venv target (uv sync) is now identical to the first command in install-server (line 36) and a strict subset of dev (line 29, uv sync --extra dev). Consider whether venv still earns its place as a standalone target, or if it should just alias one of the others. (Also raised in prior review rounds.)
  • Makefile:7-16 - The fmt, lint, and test targets call ruff/pytest directly (without uv run), while CI uses uv run ruff ... and uv run pytest .... Both work when the venv is activated, but make check will fail if run without activation since the tools won't be on PATH. Consider using uv run in the Makefile targets too for consistency with CI and to avoid relying on venv activation.

Previously Addressed (Filtered)

None — no "Feedback Addressed" comments found from prior rounds.

Verdict

REQUEST_CHANGES - One important issue (stale pip-based error messages in shell scripts undermine the fix this PR provides) and two suggestions.


Automated review by Claude Code

- Update error messages in install scripts to suggest `uv sync` instead
  of the old `python3 -m venv && pip install` commands
- Use `uv run` in Makefile fmt/lint/test targets for consistency with CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 19, 2026

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Replaces pip install with uv sync across the Makefile and CI workflows, updates shell script error messages to reference uv sync, commits uv.lock, and adds astral-sh/setup-uv@v5 to CI — fixing the fresh-clone failure described in #108.

Issues Found

Critical

None

Important

None

Suggestions

  • Makefile:24-25 - The venv target is now just uv sync, which is identical to the inline command in install-server (line 36) and a strict subset of dev (line 29, uv sync --extra dev). Consider removing it or making it an alias for another target to reduce duplication. (Also noted in prior review rounds — no "Feedback Addressed" comment found, so re-raising.)

Verdict

REQUEST_CHANGES - One suggestion about the now-redundant venv target.


Automated review by Claude Code

@evansenter

Copy link
Copy Markdown
Owner Author

Feedback Addressed

Implemented

  • [Important] Stale pip-based error messages in install-systemd.sh, install-launchagent.sh, install-cli.sh — updated to suggest uv sync/make install-server
  • [Suggestion] uv run consistency in Makefile fmt/lint/test targets — now matches CI

Skipped

  • [Suggestion] Redundant venv target — intentionally kept as a standalone "just sync deps" entry point, matching agent-session-analytics conventions

evansenter and others added 2 commits March 30, 2026 23:52
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove `source .venv/bin/activate` from dev.sh, use `uv run` instead
- Add `--python` to `uv sync` in CI test matrix to guarantee each
  matrix entry actually tests the specified Python version

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Clean migration from pip to uv across the Makefile, CI workflows, shell scripts, and docs. All previously raised feedback has been addressed: shell script error messages now reference uv sync, Makefile targets use uv run consistently with CI, and the venv target is intentionally retained per project conventions.

Previously Addressed (Filtered)

  • [Important] Stale pip error messages in shell scripts — Implemented ✓
  • [Suggestion] uv run consistency in Makefile — Implemented ✓
  • [Suggestion] Redundant venv target — Skipped (intentionally kept, matches agent-session-analytics conventions) ✓

Verdict

APPROVE - All previous feedback addressed. No new issues found. The changes are straightforward, correct, and well-scoped.


Automated review by Claude Code

@evansenter

Copy link
Copy Markdown
Owner Author

No reviewer feedback

claude-review APPROVED on latest commit. All previously raised items were addressed in prior rounds. No new issues found.

@evansenter
evansenter merged commit 3307e7d into main Mar 30, 2026
5 checks passed
@evansenter
evansenter deleted the fix/makefile-use-uv branch March 30, 2026 23:11
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.

fix: Makefile install-client uses pip but venv is created by uv

1 participant