build: add make targets for install, uninstall, test, lint, clean, distclean#138
build: add make targets for install, uninstall, test, lint, clean, distclean#138trevor-vaughan wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughAdds ChangesDevelopment Workflow Setup
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
mk/dev.mk (1)
20-20: ⚡ Quick winAdd --yes flag for non-interactive uninstall.
The
uv pip uninstallcommand should include the--yesor-yflag to prevent prompts during automated Make target execution.📝 Suggested enhancement
- uv pip uninstall lola-ai; \ + uv pip uninstall --yes lola-ai; \🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@mk/dev.mk` at line 20, Update the uninstall command in the Make target so it runs non-interactively by adding the confirmation flag to the existing command "uv pip uninstall lola-ai" (use "--yes" or "-y"); locate the occurrence of that exact command in mk/dev.mk and change it to include the flag so automation won't block on a prompt.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@mk/dev.mk`:
- Line 20: Update the uninstall command in the Make target so it runs
non-interactively by adding the confirmation flag to the existing command "uv
pip uninstall lola-ai" (use "--yes" or "-y"); locate the occurrence of that
exact command in mk/dev.mk and change it to include the flag so automation won't
block on a prompt.
…stclean Adds mk/dev.mk fragment following the existing modular Makefile pattern (alongside mk/mkdocs.mk and mk/adr.mk). All targets drive uv against the project-local .venv via UV_PROJECT_ENVIRONMENT, so they work uniformly regardless of any global uv configuration. - install: uv sync --group dev (creates or updates .venv) - uninstall: removes lola-ai package; graceful no-op when no .venv - test: uv run pytest (auto-syncs venv if missing) - lint: ruff check + format check + mypy - clean: prunes caches, build artifacts, bytecode; preserves .venv, .lola, and .git via find -prune to avoid descending into restricted subtrees - distclean: cascades clean + docs-clean, then removes .venv and the hatch-vcs _version.py Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Fixes: LobsterTrap#130
24f90d4 to
386109d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mk/dev.mk`:
- Line 60: The rm -rf invocation in mk/dev.mk uses the UV_PROJECT_ENVIRONMENT
variable unquoted which can lead to path-splitting or globbing issues; update
the delete command to wrap the UV_PROJECT_ENVIRONMENT variable in double quotes
so the entire venv path is treated as a single argument (modify the line
containing `@rm` -rf $(UV_PROJECT_ENVIRONMENT) to quote the variable).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
|
||
| distclean: clean docs-clean ## - deep clean: also removes .venv and generated _version.py (slow to rebuild) | ||
| @echo "Removing virtual environment at $(UV_PROJECT_ENVIRONMENT)..." | ||
| @rm -rf $(UV_PROJECT_ENVIRONMENT) |
There was a problem hiding this comment.
Quote the venv path in destructive delete command.
Line 60 should quote $(UV_PROJECT_ENVIRONMENT) to avoid path-splitting edge cases.
Suggested patch
- `@rm` -rf $(UV_PROJECT_ENVIRONMENT)
+ `@rm` -rf "$(UV_PROJECT_ENVIRONMENT)"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @rm -rf $(UV_PROJECT_ENVIRONMENT) | |
| `@rm` -rf "$(UV_PROJECT_ENVIRONMENT)" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@mk/dev.mk` at line 60, The rm -rf invocation in mk/dev.mk uses the
UV_PROJECT_ENVIRONMENT variable unquoted which can lead to path-splitting or
globbing issues; update the delete command to wrap the UV_PROJECT_ENVIRONMENT
variable in double quotes so the entire venv path is treated as a single
argument (modify the line containing `@rm` -rf $(UV_PROJECT_ENVIRONMENT) to quote
the variable).
Summary
Adds the following usual
maketargets:Related Issues
Fixes: #130
Checklist
pytest)ruff check src tests)ty check)AI Disclosure
AI Use - Claude Opus 4.7 (1M context)
Summary by CodeRabbit