srbhr / Resume-Matcher

Resume Matcher is an open source, free tool to improve your resume. It works by using language models to compare and rank resumes with job descriptions.
https://www.resumematcher.fyi/
Apache License 2.0
4.76k stars 1.93k forks source link

Fix #117 - Having less than 2 resumes causes an error: "IndexError: list index out of range" #118

Closed mohamedaleya closed 4 months ago

mohamedaleya commented 11 months ago

Pull Request Title

Fixed having less than 2 resumes causes an error: "IndexError: list index out of range"

Related Issue

117

Description

This PR fixes an issue where users having at most 2 resumes in their Data directory will have errors in certain conditions. It will also improve the UX: For example, if the user added only 1 resume, we should remove the slider. On the other hand, if he has no resumes, a warning should appear reminding him to add a resume.

Type

Proposed Changes

Screenshots / Code Snippets (if applicable)

No resumes: brave_y6nI7Bz9wa

1 resume: brave_RaHfthsfCm

2 resumes: brave_s6Eb6w0sXx

More than 2 resumes: brave_KiBdzCc3gE

How to Test

  1. Launch the app after removing all current items in the Data folder.
  2. Conditions: 2.1. Keep it with no resumes, then refresh tab and test. 2.2. Add exactly 1 resume, then refresh tab and test. 2.3. Add exactly 2 resumes, then refresh tab and test.

Checklist

Additional Information

srbhr commented 10 months ago

Thanks @mohamedaleya I feel the issue was already resolved by another PR long before.