Skip to content

Conversation

@PR-HARIHARAN
Copy link

@PR-HARIHARAN PR-HARIHARAN commented Oct 3, 2025

Pull Request Title

feat: Complete UV migration - remove requirements.txt, add workspace config, and modernize docs

Related Issue

#512 (already closed, maintainer confirmed UV compatibility)

Description

This pull request finalizes the migration to UV. It removes old files, adds new configs, and updates the documentation so the project fully supports UV.

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify): Migration to UV

Proposed Changes

  • Remove requirements.txt and move dependencies to pyproject.toml
  • Add UV workspace configuration at the project root
  • Update all npm scripts to use UV commands
  • Generate uv.lock for reproducible installs
  • Update documentation (README, SETUP, CONTRIBUTING)
  • Add .env setup instructions
  • Update error messages to suggest UV commands
  • Add UV_MIGRATION.md with a step-by-step migration guide
  • Improve development workflow with faster dependency handling

Checklist

  • Code compiles with no errors or warnings
  • Changes tested and verified
  • Documentation updated
  • Changes follow project coding style
  • Commit messages are clear and follow guidelines
  • All tests (if applicable) pass
  • Linked to related issue (already closed by maintainer)

Additional Information

This is my first open-source contribution. Feedback is welcome so I can improve further!


Summary by cubic

Completes migration from pip to uv to speed up installs and simplify setup. Dependencies now live in pyproject.toml, with a uv workspace and lockfile added, and all scripts and docs updated.

  • Migration
    • Removed apps/backend/requirements.txt; defined backend deps (with dev/test extras) in apps/backend/pyproject.toml.
    • Added root pyproject.toml uv workspace and uv.lock for reproducible installs.
    • Switched npm scripts to uv sync/run; backend commands use --project apps/backend.
    • Updated docs and tooling for uv (README, SETUP, CONTRIBUTING, CONFIGURING, UV_MIGRATION.md), added .env setup, and replaced pip guidance with uv add in code and tests.

Summary by CodeRabbit

  • Documentation

    • Rewrote setup and contribution guides with streamlined steps, environment file examples, and updated prerequisites.
    • Introduced uv-based installation instructions across docs and clarified dev workflow commands.
    • Added a migration guide outlining the switch from pip to uv.
  • Chores

    • Migrated Python dependency management to uv, replacing legacy requirement files and adding workspace configuration.
    • Updated scripts to use uv for install, dev, build, and start tasks.
    • Added editor settings to standardize Python environment management.
  • Tests

    • Updated user-facing dependency guidance in test messages to reflect uv usage.

- Replace requirements.txt with pyproject.toml dependencies
- Set up uv workspace configuration at project root
- Update all npm scripts to use uv commands
- Generate uv.lock for reproducible dependency resolution
- Update documentation (README, SETUP, CONTRIBUTING)
- Add environment setup instructions for .env files
- Update error messages to suggest uv commands
- Add UV_MIGRATION.md with comprehensive migration guide
- Improve development workflow with faster dependency management

Closes srbhr#409
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Migrates Python dependency management to uv across backend and docs. Updates commands, scripts, and messages to use uv, introduces workspace config, replaces requirements.txt with pyproject.toml and dev tooling, adjusts VSCode Python settings, and revises setup/READMEs. Minor backend messages updated for DOCX dependency guidance.

Changes

Cohort / File(s) Summary of changes
Docs: uv adoption and setup refresh
README.md, SETUP.md, .github/CONTRIBUTING.md, UV_MIGRATION.md, docs/CONFIGURING.md
Rewrote installation/setup to use uv; added env file examples; updated prerequisites; added migration notes; revised specific install commands (e.g., use uv add); clarified workflows and troubleshooting.
Backend dependency management migration
apps/backend/pyproject.toml, apps/backend/requirements.txt (removed)
Switched from requirements.txt to pyproject/uv; broadened version pins to >=; added metadata, optional/test groups, and tool configs (black, isort, mypy, ruff, pytest).
Workspace/tooling configuration
pyproject.toml, .vscode/settings.json
Added uv workspace with member apps/backend; set VSCode Python env/package manager defaults to Conda and empty project list.
Backend DOCX guidance updates
apps/backend/app/services/resume_service.py, apps/backend/install_docx_deps.py, apps/backend/test_docx_dependencies.py
Updated install guidance messages from pip to uv add with markitdown[all]>=0.1.2; directory check now expects pyproject.toml. Control flow unchanged.
Frontend scripts targeting uv project execution
package.json
Updated backend scripts to use uv run --project apps/backend ... and uv sync for install; preserved existing uvicorn commands and parameters.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • srbhr

Poem

Thump-thump, I hop through locks anew,
uv trails where pip once grew.
pyproject burrows, tidy and bright,
scripts aligned for swift daylight.
DOCX crumbs? I nudge the clue—
“uv add,” says bunny, “and you’re through!”
Happy hops in workspace dew.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run `@coderabbitai generate docstrings` to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the core “UV migration” work by noting removal of requirements.txt, addition of workspace configuration, and modernization of documentation, which aligns precisely with the PR’s primary objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Oct 3, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Unpinned dependencies

Description: Multiple runtime dependencies are pinned with broad >= version specifiers (e.g., FastAPI,
httpx, uvicorn), which can introduce supply-chain or breaking-change risks from upstream
updates; consider using a lockfile or tighter pins for production environments.
pyproject.toml [20-44]

Referred Code
"aiosqlite>=0.21.0",
"beautifulsoup4>=4.13.4",
"coloredlogs>=15.0.1",
"email-validator>=2.2.0",
"fastapi>=0.115.12",
"html2text>=2025.4.15",
"httpx>=0.28.1",
"itsdangerous>=2.2.0",
"magika>=0.6.1",
"markdown>=3.8",
"markdownify>=1.1.0",
"markitdown[all]>=0.1.2",
"numpy>=2.2.4",
"ollama>=0.4.7",
"openai>=1.75.0",
"pdfminer-six>=20250327",
"pydantic>=2.11.3",
"pydantic-settings>=2.8.1",
"python-dotenv>=1.1.0",
"python-multipart>=0.0.20",
"requests>=2.32.3",


 ... (clipped 4 lines)
Ticket Compliance
🟡
🎫 #512
🟢 Migrate dependency management from pip to uv across the project.
Update installation and development documentation to use uv commands and workflow.
Provide workspace configuration suitable for monorepo using uv.
Replace pip-based install instructions/messages in code and scripts with uv equivalents.
🔴 Ensure lockfile/reproducible installs with uv.
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Oct 3, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix broken markdown formatting error

Fix the broken markdown in SETUP.md where an image tag is incorrectly merged
with a list of prerequisites, causing rendering issues.

SETUP.md [3-6]

 # Local Setup Guide for Resume-Matcher
 
-![insta- **Python** ≥ 3.12 (`python3`, `pip3` for uv bootstrap only)
-- **uv** ≥ 0.6.0 (fast Python package manager) 
-- **curl** (for installing uv & Ollama)
-- **make** (for Makefile integration)g_resume_matcher](assets/how_to_install_resumematcher.png)
+![installing_resume_matcher](assets/how_to_install_resumematcher.png)
 
 This document provides cross-platform instructions to get the project up and running locally.

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a significant formatting error in the setup documentation that makes the instructions confusing and unprofessional, and fixing it is important for usability.

Medium
High-level
Re-evaluate the dependency versioning strategy

The dependency versioning in pyproject.toml was changed to minimum versions
(>=), which risks instability on updates. It is recommended to use compatible
release specifiers (~=) for better long-term stability.

Examples:

apps/backend/pyproject.toml [19-44]
dependencies = [
    "aiosqlite>=0.21.0",
    "beautifulsoup4>=4.13.4",
    "coloredlogs>=15.0.1",
    "email-validator>=2.2.0",
    "fastapi>=0.115.12",
    "html2text>=2025.4.15",
    "httpx>=0.28.1",
    "itsdangerous>=2.2.0",
    "magika>=0.6.1",

 ... (clipped 16 lines)

Solution Walkthrough:

Before:

# apps/backend/pyproject.toml
[project]
dependencies = [
    "aiosqlite>=0.21.0",
    "fastapi>=0.115.12",
    "markitdown[all]>=0.1.2",
    "ollama>=0.4.7",
    # ... and so on for all dependencies
]

After:

# apps/backend/pyproject.toml
[project]
dependencies = [
    "aiosqlite~=0.21.0",
    "fastapi~=0.115.12",
    "markitdown[all]~=0.1.2",
    "ollama~=0.4.7",
    # ... and so on for all dependencies
]
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential long-term stability risk in using >= for dependencies and proposes a more robust versioning strategy with ~=, which is a significant improvement for project maintainability.

Medium
General
Remove user-specific VS Code settings

Remove the user-specific .vscode/settings.json file as it specifies conda for
environment management, which conflicts with the project's migration to uv.

.vscode/settings.json [1-5]

-{
-    "python-envs.defaultEnvManager": "ms-python.python:conda",
-    "python-envs.defaultPackageManager": "ms-python.python:conda",
-    "python-envs.defaultProjects": []
-}
 
+
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that user-specific editor settings have been committed, which contradicts the project's new uv setup and should not be in the repository.

Medium
Remove redundant development dependency definitions

Remove the redundant [tool.uv].dev-dependencies section and use the standard
[project.optional-dependencies].dev for defining development dependencies to
avoid duplication.

apps/backend/pyproject.toml [46-84]

 [project.optional-dependencies]
 dev = [
     "pytest>=8.0.0",
     "pytest-asyncio>=0.21.0",
     "pytest-cov>=4.0.0",
     "black>=23.0.0",
     "isort>=5.12.0",
     "mypy>=1.0.0",
     "ruff>=0.1.0",
 ]
 test = [
     "pytest>=8.0.0",
     "pytest-asyncio>=0.21.0",
     "pytest-cov>=4.0.0",
     "httpx>=0.28.1",
 ]
 
 ...
 
 [tool.uv]
-dev-dependencies = [
-    "pytest>=8.0.0",
-    "pytest-asyncio>=0.21.0",
-    "pytest-cov>=4.0.0",
-    "black>=23.0.0",
-    "isort>=5.12.0",
-    "mypy>=1.0.0",
-    "ruff>=0.1.0",
-]

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies redundant dependency definitions and proposes removing the tool-specific one, which improves maintainability and aligns with standard pyproject.toml practices.

Low
  • More

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/backend/install_docx_deps.py (1)

15-26: Critical: Script still uses pip instead of uv.

The script's guidance message (line 51) tells users to use uv add, but the script itself uses pip install at line 22. This creates a critical inconsistency where the script's behavior doesn't match the project's migration to uv.

Apply this diff to update the installation logic to use uv:

 def install_dependencies():
     """Install the missing dependencies for DOCX processing"""
     print("Installing markitdown with DOCX support...")
     
     dependencies = [
-        "markitdown[all]==0.1.2"
+        "markitdown[all]>=0.1.2"
     ]
     
     for dep in dependencies:
         print(f"Installing {dep}...")
         try:
-            subprocess.check_call([sys.executable, "-m", "pip", "install", dep])
+            subprocess.check_call(["uv", "add", dep])
             print(f"✓ Successfully installed {dep}")
         except subprocess.CalledProcessError as e:
             print(f"✗ Failed to install {dep}: {e}")
             return False

Also update the version constraint from ==0.1.2 to >=0.1.2 for consistency with other files in this PR.

🧹 Nitpick comments (1)
apps/backend/pyproject.toml (1)

46-55: Dev dependencies are duplicated.

Development dependencies are specified in both [project.optional-dependencies] (lines 47-55) and [tool.uv] (lines 76-84) sections. This duplication can lead to maintenance issues and version drift.

Choose one approach:

Option 1: Use only [project.optional-dependencies] (standard)

-[tool.uv]
-dev-dependencies = [
-    "pytest>=8.0.0",
-    "pytest-asyncio>=0.21.0",
-    "pytest-cov>=4.0.0",
-    "black>=23.0.0",
-    "isort>=5.12.0",
-    "mypy>=1.0.0",
-    "ruff>=0.1.0",
-]

Option 2: Use only [tool.uv] (uv-specific)

-[project.optional-dependencies]
-dev = [
-    "pytest>=8.0.0",
-    "pytest-asyncio>=0.21.0",
-    "pytest-cov>=4.0.0",
-    "black>=23.0.0",
-    "isort>=5.12.0",
-    "mypy>=1.0.0",
-    "ruff>=0.1.0",
-]

Note: The [project.optional-dependencies] approach is more standard and tool-agnostic, while [tool.uv] is uv-specific. If using uv exclusively, Option 2 is cleaner. If maintaining compatibility with other tools, Option 1 is preferred.

Also applies to: 75-84

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c75adf and 4981f99.

📒 Files selected for processing (13)
  • .github/CONTRIBUTING.md (2 hunks)
  • .vscode/settings.json (1 hunks)
  • README.md (2 hunks)
  • SETUP.md (3 hunks)
  • UV_MIGRATION.md (1 hunks)
  • apps/backend/app/services/resume_service.py (2 hunks)
  • apps/backend/install_docx_deps.py (2 hunks)
  • apps/backend/pyproject.toml (1 hunks)
  • apps/backend/requirements.txt (0 hunks)
  • apps/backend/test_docx_dependencies.py (2 hunks)
  • docs/CONFIGURING.md (1 hunks)
  • package.json (1 hunks)
  • pyproject.toml (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/backend/requirements.txt
🧰 Additional context used
📓 Path-based instructions (3)
apps/backend/app/{models,services}/**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use SQLAlchemy ORM with async sessions for database access

Files:

  • apps/backend/app/services/resume_service.py
apps/backend/app/services/**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/backend/app/services/**/*.py: Use temporary files for document processing and always clean up after processing
Implement async processing for file operations in backend services
Cache processed results when appropriate in backend services

Files:

  • apps/backend/app/services/resume_service.py
apps/backend/app/{agent,services}/**/*.py

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use structured prompts and validate AI model responses against Pydantic models

Files:

  • apps/backend/app/services/resume_service.py
🪛 markdownlint-cli2 (0.18.1)
UV_MIGRATION.md

70-70: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

SETUP.md

48-48: Blank line inside blockquote

(MD028, no-blanks-blockquote)

🔇 Additional comments (10)
pyproject.toml (1)

1-5: LGTM! Clean workspace configuration.

The uv workspace setup correctly identifies the backend as a workspace member, and the explanatory comments help clarify the separation between Python (uv) and Node.js (npm) dependency management.

apps/backend/app/services/resume_service.py (1)

50-50: LGTM! Updated to uv command.

The log message correctly reflects the migration from pip to uv for dependency installation.

UV_MIGRATION.md (1)

1-92: Excellent migration documentation!

This comprehensive guide provides clear before/after comparisons, benefits, new commands, workspace structure, and a verification checklist. It will help developers understand and adopt the uv workflow effectively.

apps/backend/install_docx_deps.py (1)

40-42: LGTM! Correctly updated for uv workspace.

The directory validation now checks for pyproject.toml instead of requirements.txt, aligning with the uv-based project structure.

apps/backend/test_docx_dependencies.py (1)

31-31: LGTM! Consistent uv command updates.

All three installation guidance messages have been correctly updated to use uv add 'markitdown[all]>=0.1.2', maintaining consistency with the project's migration to uv-based dependency management.

Also applies to: 36-36, 88-88

apps/backend/pyproject.toml (2)

19-44: LGTM! Well-structured dependencies.

All dependencies use minimum version constraints (>=), which provides flexibility while ensuring compatibility. This aligns with the project's migration to uv.


89-132: Comprehensive tool configurations.

The black, isort, mypy, ruff, and pytest configurations are well-defined and follow best practices for Python development tooling.

.github/CONTRIBUTING.md (3)

54-140: Excellent setup documentation!

The updated installation instructions provide multiple setup paths (quick setup via npm, alternative methods via scripts, and manual setup), clear environment file examples with actual values, and helpful troubleshooting guidance. This significantly improves the contributor experience.


141-186: Clear development workflow with uv.

The development workflow section effectively documents the transition to uv, providing common commands for both package management and development tasks, along with required environment variables. This helps developers quickly understand the new tooling.


205-211: LGTM! Flexible pre-commit installation options.

Offering both uv tool install and system-wide pip install gives developers flexibility while encouraging the use of uv. This is a pragmatic approach during the migration period.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

5 issues found across 13 files

Prompt for AI agents (all 5 issues)

Understand the root cause of the following 5 issues and fix them.


<file name="UV_MIGRATION.md">

<violation number="1" location="UV_MIGRATION.md:24">
`UV_MIGRATION.md` states that a root-level `uv.lock` file was added, but the file is missing from the repository. Please either add the lockfile or adjust the documentation to reflect the current state.</violation>
</file>

<file name=".github/CONTRIBUTING.md">

<violation number="1" location=".github/CONTRIBUTING.md:58">
The quick-setup `npm install` step will fail on a fresh machine because the generated script immediately calls `uv sync`, but the docs don’t warn that uv must already be installed. Please call out the uv prerequisite here or adjust the instructions so the step succeeds.</violation>
</file>

<file name="apps/backend/pyproject.toml">

<violation number="1" location="apps/backend/pyproject.toml:64">
The new console script maps to `app.main:app`, but that symbol is the FastAPI application instance, not a zero-argument callable. Building/installing this package will generate a CLI that immediately crashes because packaging invokes the target as a function with no parameters, while `FastAPI` objects require ASGI scope arguments. Please point the script to an actual CLI function or remove it.</violation>
</file>

<file name=".vscode/settings.json">

<violation number="1" location=".vscode/settings.json:2">
VS Code settings force Conda as the default Python environment, which conflicts with the uv-based workflow and can lead to inconsistent environments. Remove this key or configure the interpreter to use the project’s uv-managed virtual environment.</violation>
</file>

<file name="SETUP.md">

<violation number="1" location="SETUP.md:3">
Broken Markdown image: the alt text contains list items, preventing the image from rendering and mangling the prerequisites list. Restore proper image syntax and place the bullet list below the image.</violation>
</file>


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant