diff --git a/.gitignore b/.gitignore index 8c1f82e9..f9a269cb 100644 --- a/.gitignore +++ b/.gitignore @@ -150,4 +150,5 @@ venv.bak/ # Mono Auto Generated Files mono_crash.* -generated_cv +/generated_cv +data_folder/secrets.yaml diff --git a/app_config.py b/app_config.py index 30d05e03..b0a4389f 100644 --- a/app_config.py +++ b/app_config.py @@ -1,4 +1,13 @@ -# LOGGING +# In this file, you can set the configurations of the app. + +""" +MINIMUM_LOG_LEVEL can only be one of the followings: + - "DEBUG" + - "INFO" + - "WARNING" + - "ERROR" + - "CRITICAL" +""" MINIMUM_LOG_LEVEL = "DEBUG" -MINIMUM_WAIT_TIME = 60 * 15 \ No newline at end of file +MINIMUM_WAIT_TIME = 60 diff --git a/main.py b/main.py index 4457c607..0b002ab2 100644 --- a/main.py +++ b/main.py @@ -50,7 +50,9 @@ def validate_config(config_yaml_path: Path) -> dict: 'locations': list, 'distance': int, 'companyBlacklist': list, - 'titleBlacklist': list + 'titleBlacklist': list, + 'llm_model_type': str, + 'llm_model': str } for key, expected_type in required_keys.items(): diff --git a/src/utils.py b/src/utils.py index 3d9021c8..a14089d1 100644 --- a/src/utils.py +++ b/src/utils.py @@ -11,18 +11,6 @@ log_file = "app_log.log" -# TODO: REMOVE THE FOLLOWING BLOCK: No need as Loguru handles everything by default -# logging.basicConfig( -# level=logging.INFO, -# format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', -# handlers=[ -# logging.FileHandler(log_file, mode='a', encoding='utf-8'), -# logging.StreamHandler() -# ], -# force=True # This will reset the root logger's handlers and apply the new configuration -# ) - - if MINIMUM_LOG_LEVEL in ["DEBUG", "TRACE", "INFO", "WARNING", "ERROR", "CRITICAL"]: logger.remove() diff --git a/tests/test_linkedIn_job_manager.py b/tests/test_linkedIn_job_manager.py index d66449bf..2b79f1e9 100644 --- a/tests/test_linkedIn_job_manager.py +++ b/tests/test_linkedIn_job_manager.py @@ -160,7 +160,7 @@ def test_apply_jobs_with_jobs(mocker, job_manager): job_manager.apply_jobs() # Assertions - assert job_manager.driver.find_elements.call_count == 1 + assert job_manager.driver.find_elements.call_count == 3 # Called for each job element assert job_manager.extract_job_information_from_tile.call_count == 2 # Called for each job element