Resume-Matcher icon indicating copy to clipboard operation
Resume-Matcher copied to clipboard

Uv not getting installed during setup on macos

Open NoeFabris opened this issue 5 months ago • 1 comments

Pull Request Title

Improving setup script to install uv on macos with homebrew

Related Issue

#475

Description

if macos added the installation script for uv using homebrew

Type

  • [x] Bug Fix
  • [ ] Feature Enhancement
  • [ ] Documentation Update
  • [ ] Code Refactoring
  • [ ] Other (please specify):

Proposed Changes

use homebrew to install uv on mac

Screenshots / Code Snippets (if applicable)

ensure uv

if ! command -v uv &> /dev/null; then info "uv not found; installing…" if [[ "$OS_TYPE" == "macOS" ]]; then brew install uv || error "Failed to install uv via Homebrew" else curl -LsSf https://astral.sh/uv/install.sh | sh || error "Failed to install uv" export PATH="$HOME/.local/bin:$PATH" fi success "uv installed" fi check_cmd uv success "All prerequisites satisfied."

How to Test

  1. run the setup script on a macos laptop that doesn't have uv already installed
  2. start the project
  3. upload the PDF
  4. at the moment it gives error because uv is missing, after running the updated script everything works.

Checklist

  • [ x] The code compiles successfully without any errors or warnings
  • [ x] The changes have been tested and verified
  • [ x] The documentation has been updated (if applicable)
  • [ x] The changes follow the project's coding guidelines and best practices
  • [ x] The commit messages are descriptive and follow the project's guidelines
  • [ x] All tests (if applicable) pass successfully
  • [ x] This pull request has been linked to the related issue (if applicable)

Additional Information


Summary by cubic

Fixed the setup script so that uv is installed on macOS using Homebrew if it is missing.

  • Bug Fixes
    • Added Homebrew-based installation for uv on macOS to address issue #475.

Summary by CodeRabbit

  • Chores
    • Improved installation process for the uv tool with OS-specific handling, using Homebrew on macOS and curl-based installation on other systems.
    • Added clearer success and error messages during installation.

NoeFabris avatar Jul 31 '25 10:07 NoeFabris

Walkthrough

The setup.sh script was updated to enhance the installation logic for the uv tool. The script now detects if it is running on macOS and uses Homebrew for installation; otherwise, it defaults to the previous curl-based method. Success and error messages were adjusted accordingly.

Changes

Cohort / File(s) Change Summary
Script OS-specific Installation
setup.sh
Added OS detection for uv installation. Uses Homebrew on macOS; retains curl install for others. Adjusted messaging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Poem

A bunny hops with bashful glee,
Now uv installs more cleverly!
On Mac it brews, on others curls,
Adapting well for all the worlds.
With scripts refined and logic neat,
This change makes setup extra sweet!
🐇✨

[!NOTE]

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2ed00b980616f2b0d99c4419b47c91a28ff6525 and 3a5ad2c0949a7245babc23c6836dab2ddad260cd.

📒 Files selected for processing (1)
  • setup.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: srbhr
PR: srbhr/Resume-Matcher#396
File: setup.ps1:152-155
Timestamp: 2025-07-21T04:13:08.518Z
Learning: Astral UV's official Windows installation method uses `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"` which directly executes a remote script. This is their recommended approach and should be followed in setup scripts.
Learnt from: srbhr
PR: srbhr/Resume-Matcher#396
File: setup.ps1:152-155
Timestamp: 2025-07-21T04:13:08.518Z
Learning: Astral UV's official Windows installation method uses `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"` which directly executes a remote script. This is their recommended approach per official documentation and should be followed in setup scripts rather than implementing custom download-then-execute patterns.
setup.sh (3)

Learnt from: srbhr PR: srbhr/Resume-Matcher#396 File: setup.ps1:152-155 Timestamp: 2025-07-21T04:13:08.518Z Learning: Astral UV's official Windows installation method uses powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" which directly executes a remote script. This is their recommended approach and should be followed in setup scripts.

Learnt from: srbhr PR: srbhr/Resume-Matcher#396 File: setup.ps1:152-155 Timestamp: 2025-07-21T04:13:08.518Z Learning: Astral UV's official Windows installation method uses powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" which directly executes a remote script. This is their recommended approach per official documentation and should be followed in setup scripts rather than implementing custom download-then-execute patterns.

Learnt from: elliotclee PR: srbhr/Resume-Matcher#457 File: setup.sh:168-180 Timestamp: 2025-07-28T19:07:07.416Z Learning: elliotclee prefers simpler code over defensive programming in setup script contexts where .env files are considered trustworthy sources, and views additional security measures as unnecessary complexity when the trust boundary is already established.

🔇 Additional comments (1)
setup.sh (1)

100-110: OS-specific branch is a nice improvement.

Introducing a macOS branch resolves the original issue where uv wasn’t installed on macOS—good catch.

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Jul 31 '25 10:07 coderabbitai[bot]