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

Add compatibility stubs for missing run_first.py and streamlit_app.py

Open sonianuj287 opened this issue 2 months ago • 11 comments

Pull Request Title

Related Issue

Description

Type

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

Proposed Changes

Screenshots / Code Snippets (if applicable)

How to Test

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) https://github.com/srbhr/Resume-Matcher/issues/533#issuecomment-3418319785

Additional Information


Summary by cubic

Removed the legacy FIX_ISSUE_409.md and added compatibility stubs to guide Streamlit users to the new FastAPI + Next.js setup. Updated CONTRIBUTING and README with the new setup flow and local run commands.

  • Migration
    • Added run_first.py and streamlit_app.py stubs that provide migration instructions and can attempt auto-setup.
    • Updated .github/CONTRIBUTING.md and README with the new architecture, setup scripts, and dev endpoints.
    • Removed FIX_ISSUE_409.md since the DOCX conversion issue (#409) is resolved.

Summary by CodeRabbit

  • Documentation

    • README updated with compatibility notes and migration guidance for FastAPI + Next.js.
    • Added step-by-step migration and quick-start guidance for legacy Streamlit users.
    • Removed the CONTRIBUTING guide and an older troubleshooting/POC document.
  • Chores

    • Added lightweight compatibility helpers to guide and optionally bootstrap migration from legacy workflow.

sonianuj287 avatar Oct 18 '25 18:10 sonianuj287

[!WARNING]

Rate limit exceeded

@sonianuj287 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 958e97320ce2a05a81a498350e41a77d78b71739 and 0017ceb9a18ee12a4e1a09478860f483d5f0f48a.

📒 Files selected for processing (4)
  • .github/CONTRIBUTING.md (0 hunks)
  • README.md (1 hunks)
  • run_first.py (1 hunks)
  • streamlit_app.py (1 hunks)

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Removes contributor guidance file, adds README notes for legacy users, and introduces two compatibility stub scripts (run_first.py, streamlit_app.py) to guide/migrate users from Streamlit to a FastAPI + Next.js stack. Also deletes FIX_ISSUE_409.md.

Changes

Cohort / File(s) Summary
Deleted contributor guide
\.github/CONTRIBUTING.md
Entire contributing guide removed (bug reporting, testing, setup, deployment, pre-commit, community links).
README updates
README.md
Adds "Legacy Users" note explaining run_first.py and streamlit_app.py act as compatibility stubs and instructing legacy commands for migration guidance.
Compatibility stubs (new)
run_first.py, streamlit_app.py
Adds run_first.py (migration banner, setup-file checks, OS-aware auto-setup attempts, CLI flow) and streamlit_app.py (migration banner, architecture comparison, setup checks, provide instructions, attempt to launch new app via npm). Multiple public functions added.
Deleted issue note
FIX_ISSUE_409.md
Removes documentation/POC for Issue #409 (diagnosis, solution, install/test instructions).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Runner as run_first.py
    participant StreamStub as streamlit_app.py
    participant Setup as setup scripts (setup.sh / setup.ps1)
    participant NPM as npm / next dev

    User->>Runner: python run_first.py
    Runner->>User: Print migration banner & check setup files
    Runner->>Setup: Verify existence / optionally execute auto-setup
    Setup-->>Runner: status (found / executed / failed)
    Runner->>User: Suggest OS-aware next steps or confirm auto-setup

    User->>StreamStub: python streamlit_app.py
    StreamStub->>User: Print migration banner & show comparison
    StreamStub->>Setup: check_new_setup (package.json, scripts)
    Setup-->>StreamStub: ready / missing
    StreamStub->>User: Provide setup instructions
    alt setup ready & user confirms
        StreamStub->>NPM: npm run dev (launch)
        NPM-->>User: App output / running
    else missing or failure
        StreamStub->>User: Provide resources & manual steps
    end

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • srbhr

Poem

🐇 A little hop, a helpful script in tow,

I guide old runners where new sidewalks go.
From Streamlit nests to FastAPI trees,
Next.js breezes and smoother keys.
Hop on — migration blooms, steady and slow.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Add compatibility stubs for missing run_first.py and streamlit_app.py" directly aligns with the core objective and primary changes in the changeset. The PR's main purpose, as documented in the objectives, is to add two new compatibility stub files to guide users migrating from Streamlit to the new FastAPI + Next.js architecture. The title is specific and clear, accurately identifying the files being added and their purpose (compatibility stubs), and avoids vague or generic terminology. While the PR also includes secondary changes such as deleting CONTRIBUTING.md and FIX_ISSUE_409.md and updating README.md, the title appropriately focuses on the primary change, which is appropriate for a summary-level description.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

coderabbitai[bot] avatar Oct 18 '25 18:10 coderabbitai[bot]

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🟢
🎫 #533
🟢 Provide or restore the files named run_first.py and streamlit_app.py so users can find
them after cloning.
Ensure the repository clearly guides users on how to run the application given the
migration away from Streamlit.
Update documentation to clarify the new locations/roles of these entry points or their
replacements.
Confirm whether those files were removed/renamed and offer a working path for users
following older docs.
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.

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

qodo-code-review[bot] avatar Oct 18 '25 18:10 qodo-code-review[bot]

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Capture and show setup script errors

Capture and display the standard error output from the subprocess.run call to
provide users with detailed error messages if the setup script fails.

streamlit_app.py [256-262]

 result = subprocess.run([
     "powershell", "-ExecutionPolicy", "Bypass",
     "-File", str(setup_script)
-])
+], capture_output=True, text=True)
 if result.returncode != 0:
     print("❌ Setup failed. Please run setup manually.")
+    if result.stderr:
+        print(f"   Error: {result.stderr}")
     return False
  • [ ] Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out a lack of error reporting and proposes capturing and displaying stderr, which significantly improves the debuggability and user experience of the setup script.

Medium
Possible issue
Prevent potential None value from markdown

To prevent a potential None value from markdown.markdown, provide an empty
string as a fallback for the updated_resume variable.

apps/backend/app/services/score_improvement_service.py [251]

-"updated_resume": markdown.markdown(text=updated_resume),
+"updated_resume": markdown.markdown(text=updated_resume or ""),

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that updated_resume could be None, and provides a simple fix to prevent markdown.markdown from returning None, which improves the robustness of the API response.

Low
  • [ ] Update

qodo-code-review[bot] avatar Oct 18 '25 18:10 qodo-code-review[bot]

Hi @srbhr , Could you please review this PR and suggest me changes.

Thanks :)

sonianuj287 avatar Oct 18 '25 18:10 sonianuj287

Hi @srbhr @atarora @iHirenDev , not sure whom to tag. Could you please review this PR. Thanks :)

sonianuj287 avatar Oct 21 '25 17:10 sonianuj287

@sonianuj287 why are you tagging me ? I'm not in this project, I just opened a PR like you. please remove me from this PR.

survivant avatar Oct 21 '25 20:10 survivant

Hi @srbhr @rrvrs @elliotclee @Sayvai @SubramanyamChalla24 , could you please review this PR and suggest me changes. Thanks :)

sonianuj287 avatar Oct 23 '25 18:10 sonianuj287

Hi @srbhr @rrvrs @elliotclee @Sayvai @SubramanyamChalla24 , could you please review this PR and suggest me changes. Thanks :)

SRBHR is the man you want to connect with. If he doesn't respond here, try catching him on the RM discord. He has been sick the past ten days so I don't know when he'll be back in action though. I am not really up to date with RM, especially with the rewrite that SRBHR is doing, so I can't really be of much help with reviewing the PR right now.

elliotclee avatar Oct 23 '25 19:10 elliotclee

Thanks @elliotclee for being there while I was away.

srbhr avatar Oct 27 '25 07:10 srbhr

@sonianuj287 where are the instructions for running the streamlit application? We moved away from the steamlit app a few months ago towards a FastAPI/Next based code.

srbhr avatar Oct 27 '25 07:10 srbhr

Would merging this be helpful?

srbhr avatar Oct 27 '25 07:10 srbhr