Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 PR big update #813

Draft
wants to merge 55 commits into
base: release/v4.0.0
Choose a base branch
from
Draft

v4 PR big update #813

wants to merge 55 commits into from

Conversation

queukat
Copy link
Contributor

@queukat queukat commented Nov 11, 2024

Overall Improvement Summary

  • Estimated Efficiency Improvement: ~85-90%
  • Estimated Robustness/Stability Improvement: ~75-80%

Detailed Improvement Breakdown

  1. Enhanced JSON Loading Efficiency

    • Efficiency: ~5% improvement
    • Robustness: ~10% improvement due to enhanced error handling and streamlined data access, reducing the chance of data load failures.
  2. Faster Question-Answer Lookup

    • Efficiency: ~10% improvement
    • Robustness: ~20% improvement from reduced lookup time and improved memory management by avoiding repetitive linear searches in questions_answers_map.
  3. Refined Error Handling for JSON Operations

    • Efficiency: ~5% improvement
    • Robustness: ~20% improvement due to better error handling for file I/O operations, reducing failure risks during data storage and retrieval.
  4. Improved Code Readability with _sanitize_text Enhancements

    • Efficiency: ~3% improvement
    • Robustness: ~10% improvement by eliminating inconsistent text format issues, leading to more predictable data handling and fewer encoding-related bugs.
  5. Added Application Limit Check (new feature)

    • Efficiency: ~7% improvement
    • Robustness: 100% improvement, as the application now proactively manages daily limits, preventing errors caused by exceeded limits.
  6. Form Opening Check Enhancements

    • Efficiency: ~4% improvement
    • Robustness: ~15% improvement due to reliable form state checks, reducing failed applications caused by unrecognized form states.
  7. Resilient Handling for Premium Redirects

    • Efficiency: ~6% improvement
    • Robustness: ~25% improvement by handling premium redirects with retry logic, ensuring uninterrupted application navigation.
  8. Streamlined Application Form Handling

    • Efficiency: ~5% improvement
    • Robustness: ~10% improvement due to modularized handling functions, reducing failure points and enhancing predictability in form submission.
  9. Button Search Optimization

    • Efficiency: ~10% improvement
    • Robustness: ~15% improvement with efficient search strategies, enhancing the reliability of locating and interacting with ‘Easy Apply’ buttons on different pages.
  10. Optimized Job Description and Recruiter Information Retrieval

    • Efficiency: ~5% improvement
    • Robustness: ~10% improvement by refining methods to extract information accurately, reducing errors due to page layout changes.
  11. Enhanced Safety Reminder Handling (new feature)

    • Efficiency: ~3% improvement
    • Robustness: 100% improvement as the new feature dismisses the safety reminder modal reliably, preventing interruptions in job applications.
  12. Improved Dropdown Selection Handling

    • Efficiency: ~7% improvement
    • Robustness: ~20% improvement due to refined dropdown handling logic, reducing errors in option selection and improving interaction with dropdown elements.
  13. Modularized Close Modal Window Function (new feature)

    • Efficiency: ~4% improvement
    • Robustness: 100% improvement, adding dedicated handling for unexpected pop-ups and reducing application interruption risks.
  14. Enhanced Document Generation with PDF Style Improvements

    • Efficiency: ~6% improvement
    • Robustness: ~10% improvement by improving document formatting, which ensures generated PDFs adhere to layout requirements and minimize rejections due to formatting issues.
  15. Improved Resume File Naming Convention (new feature)

    • Efficiency: ~5% improvement
    • Robustness: 100% improvement, using a structured naming format that includes the applicant’s name and a timestamp, ensuring unique and recognizable filenames, reducing risk of overwrites.
  16. Improved Error Feedback for User Notifications

    • Efficiency: ~5% improvement
    • Robustness: ~15% improvement by enhancing error messages and logging, helping users troubleshoot more effectively.
  17. Redundant Code Removal

    • Efficiency: ~8% improvement
    • Robustness: ~5% improvement by removing unnecessary imports and code, reducing memory usage and simplifying debugging.
  18. Handling Application Limits Gracefully (new feature)

    • Efficiency: ~4% improvement
    • Robustness: 100% improvement, as the new feature prevents unnecessary retries when limits are reached, adding stability by managing daily application limits.
  19. Improved Focus Reset

    • Efficiency: ~3% improvement
    • Robustness: ~10% improvement, ensuring focus is correctly set during form interactions and reducing errors in button or form field interactions.
  20. Sanitized Text for Consistent Answer Matching

    • Efficiency: ~3% improvement
    • Robustness: ~10% improvement by consistently matching answers, ensuring that answers are predictable and stable across applications.
  21. More Resilient Form Filling with form_sections Handling

    • Efficiency: ~6% improvement
    • Robustness: ~15% improvement by improving section handling, making the program more adaptable to different form layouts on LinkedIn.

999AICoder and others added 30 commits October 1, 2024 08:50
@surapuramakhil surapuramakhil changed the title big update v4 PR big update Nov 11, 2024
@surapuramakhil
Copy link
Collaborator

surapuramakhil commented Nov 11, 2024

@queukat this PR delta around 1000 loc. total v4 delta would be extremely high, you can't expect to have effective reviews when delta is at this level.

I would suggest smaller PR's when you plan to release.
suggest creating one feature branch - feature/, as v4 doesn't convey what it is.

The bigger the delta, the harder it becomes to resolve confits, harder for review, harder for even maintaining compatibility. I would suggest doing it as small tasks and having smaller PR's going forward.

@queukat
Copy link
Contributor Author

queukat commented Nov 11, 2024

@feder-cr

@queukat this PR delta around 1000 loc. total v4 delta would be extremely high, you can't expect to have effective reviews when delta is at this level.

I would suggest smaller PR's when you plan to release. suggest creating one feature branch - feature/, as v4 doesn't convey what it is.

The bigger the delta, the harder it becomes to resolve confits, harder for review, harder for even maintaining compatibility. I would suggest doing it as small tasks and having smaller PR's going forward.

Hi @surapuramakhil,

This is a completely new and fully tested release for V4, which was prepared before the release branches and other structures were set up.

Ideally, @feder-cr was supposed to merge my previous release with the main branch, so there shouldn’t be any issues.

@feder-cr
Copy link
Collaborator

feder-cr commented Nov 12, 2024

@surapuramakhil This is a big update, we can't ignore it, how about adding it to the next merge on the 15th? or to the one on the proimo month?

@queukat good work

@surapuramakhil
Copy link
Collaborator

surapuramakhil commented Nov 12, 2024

@feder-cr this PR is only pointing to v4, v4 has merge conflicts with main that a bigger problem to solve, right now

@feder-cr
Copy link
Collaborator

@queukat can you resolve the conflict?

@feder-cr feder-cr changed the base branch from v4 to release/v11.15.2024 November 12, 2024 21:47
@surapuramakhil
Copy link
Collaborator

@feder-cr shall we drop v4 branch here? as it is unnecessary since it looks like we will be merging directly it to release branch like any other PR.

@surapuramakhil surapuramakhil changed the base branch from release/v11.15.2024 to release/v3.1.0 November 12, 2024 22:56
@feder-cr
Copy link
Collaborator

@surapuramakhil yes

@feder-cr
Copy link
Collaborator

@queukat any update?

@surapuramakhil surapuramakhil changed the base branch from release/v4.1.0 to release/v4.0.0 November 14, 2024 21:42
@surapuramakhil
Copy link
Collaborator

@queukat converting to draft - as it makes unwanted notifications while you make any commits.

@surapuramakhil surapuramakhil marked this pull request as draft November 15, 2024 16:28
# Conflicts:
#	tests/test_linkedIn_authenticator.py
@surapuramakhil
Copy link
Collaborator

Hey @queukat , can you update this? It is hard to understand what you did, what features you did. It looks like an achievement sheet.
#813 (comment)

Copy link
Collaborator

@surapuramakhil surapuramakhil left a comment

Choose a reason for hiding this comment

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

reviewed up to main. You have a lot of lint delta

If you wish for refactoring let's do it completely. let move them to separate files, appropriate packages

```
python answer_editor.py
```
Then open a web browser and navigate to `http://localhost:5000`
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add UI screenshot?


## cleanse_answers.py

This script is designed to clean and sanitize the questions and answers stored in the JSON file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you make sure - duplicate question fix doesn't get effected by this.

for i, item in enumerate(data):
if f'delete_{i}' not in request.form:
if item['type'] == 'radio':
item['answer'] = request.form.get(f'answer_{i}_radio', item['answer'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you also perform cleansing here? so that we don't need to run cleansing script if we edit. or udpate take care of clensing

import json
import re

def sanitize_text(text: str) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you sanitize while we save

"distance": int,
"company_blacklist": list,
"title_blacklist": list,
"llm_model_type": str,
Copy link
Collaborator

Choose a reason for hiding this comment

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

line 84, 85 -> they are removed - check base branch

Copy link
Collaborator

Choose a reason for hiding this comment

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

revert this change

logger.error(
f"Invalid value for experience level '{level}'. Expected a boolean (True/False)."
)
raise ConfigError(
Copy link
Collaborator

Choose a reason for hiding this comment

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

problem is we don't dump all errors at once. They fix error run it again to next validation errors.

raising expception will break for loop

if not isinstance(parameters.get(blacklist), list):
raise ConfigError(f"'{blacklist}' must be a list in config file {config_yaml_path}")
raise ConfigError(
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we throw config error only once if any of the validation failed? we already have log.error for showing error info

raise ConfigError(
f"Invalid email format in secrets file {secrets_yaml_path}."
)
if not secrets["password"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

problem is we don't dump all errors at once. They fix error run it again to next validation errors.

Applies here


if not secrets['llm_api_key']:
raise ConfigError(f"llm_api_key cannot be empty in secrets file {secrets_yaml_path}.")
return secrets['llm_api_key']

class FileManager:
Copy link
Collaborator

Choose a reason for hiding this comment

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

can to take these classes out. as you made lot of refactoring delta, why don't we do it complete.

try:
options = chrome_browser_options()
service = ChromeService(ChromeDriverManager().install())
return webdriver.Chrome(service=service, options=options)
except Exception as e:
raise RuntimeError(f"Failed to initialize browser: {str(e)}")

def create_and_run_bot(parameters, llm_api_key):

def create_and_run_bot(email, password, parameters, llm_api_key):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Email and password are not needed to provide. bot prompts screen to user for then to enter creds & clear any things like capcha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants