Skip to content

Commit

Permalink
Pathing changes + .gitignore fix
Browse files Browse the repository at this point in the history
As in title:
- Static pathing -> Relative pathing (in run_first.py)
- previous .gitignore structure messed up directory structure (srbhr#272)
  • Loading branch information
P4jMepR committed Jun 30, 2024
1 parent 0b39f8c commit 58f346c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,7 @@ scripts/similarity/config.yml
*.local.yml

# Processed or local files
/Data/Processed/*
/Data/Processed/JobDescription
/Data/Processed/Resumes

*.local.pdf
8 changes: 6 additions & 2 deletions run_first.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import json
import logging
import os
import traceback


from scripts import JobDescriptionProcessor, ResumeProcessor
from scripts.utils import get_filenames_from_dir, init_logging_config

init_logging_config()

PROCESSED_RESUMES_PATH = "Data/Processed/Resumes"
PROCESSED_JOB_DESCRIPTIONS_PATH = "Data/Processed/JobDescription"
PROCESSED_RESUMES_PATH = os.path.join(os.getcwd(), "Data", "Processed", "Resumes")
PROCESSED_JOB_DESCRIPTIONS_PATH = os.path.join(os.getcwd(), "Data", "Processed", "JobDescription")


def read_json(filename):
Expand Down Expand Up @@ -44,6 +46,7 @@ def remove_old_files(files_path):
logging.error("There are no resumes present in the specified folder.")
logging.error("Exiting from the program.")
logging.error("Please add resumes in the Data/Resumes folder and try again.")
logging.error(str(traceback.format_exc()))
exit(1)

# Now after getting the file_names parse the resumes into a JSON Format.
Expand All @@ -66,6 +69,7 @@ def remove_old_files(files_path):
logging.error("There are no job-description present in the specified folder.")
logging.error("Exiting from the program.")
logging.error("Please add resumes in the Data/JobDescription folder and try again.")
logging.error(str(traceback.format_exc()))
exit(1)

# Now after getting the file_names parse the resumes into a JSON Format.
Expand Down

0 comments on commit 58f346c

Please sign in to comment.