Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Job Matcher

About

Takes job listings from a specified category and a resume and outputs the top jobs that match.

Important

An Adzuna API key is required for the gathering of job listings and a Google Gemini API key for the embedding of the data. You can obtain these on the Adzuna API website and the Google Gemini API docs.

Installation

  1. Clone the Repository
git clone https://github.com/Jess-Klost/job-matcher.git
cd job-matcher/
  1. Clone and Activate Conda environment
conda env create -f requirement.yaml
conda activate job-matcher
  1. Run Setup Script
python3 setup.py
  1. Add API Keys and Configure

Open config.env and paste your Adzuna and Gemini API keys into their respective variables. Then specify job search parameters. For more information on configuration view the Configuration Guide.

  1. Provide Resume Text

Add a text file named resume.txt to the data directory containing the text from your resume.

Note: The path to the resume file can be changed in config.env.

  1. Run Program
python3 main.py

Note for Linux Users

There is an issue with some installations of Firefox that disallows it from accessing the default TMP directory, causing this program to hang. The simplest fix for this is setting the TMPDIR environment variable to a custom TMP directory, which can be done with these commands.

  1. Create a new directory
mkdir tmp
  1. Set the TMPDIR Environment Variable for Firefox to the Directory
export TMPDIR="./tmp" firefox

For a more permanent solution I recommend setting up direnv and creating a .envrc file containing the second command and placing it in the job-matcher directory.

Running as a Docker Image

Note: This assumes that you have already have gone through the setup and now have a data directory, config.env file, and a results.txt. These can either be created manually or can be created automatically by running the setup.py script as directed in the Installation Instructions.

  1. Build Docker Image
sudo docker build -t job-matcher .
  1. Run Docker Image
sudo docker run -v ./config.env:/home/config.env -v ./data:/home/data -v ./results.txt:/home/results.txt -t job-matcher

Testing

There are pytest tests for this project located in the tests directory.

To run these make sure the Conda environment is activated and run this command:

pytest

You can also run specific test files like so:

pytest test_1.py test_2.py...

Data Acquisition

Job listings are gathered with the Adzuna API using the Requests library. The program loads search parameters and keys from a local config file. Since, the Adzuna API only gives the first 500 characters of each listing's description, the program uses Selenium to get the full description directly from the Adzuna website. The site's robots.txt file is checked before performing this operation.

Requests made with Selenium are limited to 2 per second, meaning that gathering listings can take a few minutes. Because of this the program checks if data already exists and only fetches new listings depending on the data's age, by default 1 week, which can be changed in the config file.

Configuration Guide

Parameter Required Default Value Expected Type Description
ADZUNA_APP_ID yes none string Adzuna App ID
ADZUNA_API_KEY yes none string Adzuna API Key
GEMINI_API_KEY yes none string Google Gemini API Key
DATA_DIR yes data/ string Directory where gathered data is stored (must end in a /)
RESUME_FILE yes data/resume.txt string Path to resume file (must be a text file)
MAX_DATA_AGE no 7 integer Age of data before fetching a new dataset (in days)
Note: Set to -1 to fetch new data every time
RESULTS_COUNT no 10 integer How many of the top results to show
SEARCH_TERMS yes "Software Engineer" string Phrase to search for in job listings
WHERE yes none string Location to search from (city or zip code)
DISTANCE no 40 integer Radius around WHERE to search (in kilometers)
MAX_RESULTS no 100 integer Limit to amount of jobs to fetch

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages