Project documentation and guides
A sophisticated trait-based personality analysis tool that helps companies find candidates whose personalities best match specific job descriptions. The system analyzes personality traits using friendliness and dominance scores to create compatibility rankings.
Clone the Repository
bash
git clone <repository-url>
cd traits
Set Up Virtual Environment (Recommended)
bash
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install Dependencies
bash
python setup_dependencies.py
# Or manually install required packages:
pip install scipy numpy
Initialize the System ```bash # Set up directories and databases python setup_directories.py
# Populate default traits python populate_traits_db.py ```
The tool provides a comprehensive CLI with the following commands:
# Create a new personality trait
python main.py trait create <name> <friendliness> <dominance>
# List all available traits
python main.py trait list
Examples:
# Create a trait for being detail-oriented
python main.py trait create "detail_oriented" 7.0 5.0
# Create a trait for being creative
python main.py trait create "creative" 8.0 6.0
# Create a new person profile
python main.py person create "<full_name>"
# Add personality description to a person
python main.py person add_desc "<name>" "<description>"
# List all person profiles
python main.py person list
Examples:
# Create person profiles
python main.py person create "Alice Johnson"
python main.py person create "Bob Smith"
# Add personality descriptions
python main.py person add_desc "Alice Johnson" "friendly, collaborative team player with strong leadership qualities"
python main.py person add_desc "Bob Smith" "analytical, detail-oriented problem solver who works well independently"
# Find candidates matching a job description
python main.py company query "<company_name>" "<job_description>"
Examples:
# Match for a leadership position
python main.py company query "TechCorp" "seeking innovative leader with strong communication skills"
# Match for a research position
python main.py company query "ResearchLab" "looking for analytical, detail-oriented researcher who can work independently"
# 1. Set up some traits
python main.py trait create "innovative" 9.0 8.0
python main.py trait create "analytical" 3.0 4.0
python main.py trait create "collaborative" 8.0 5.0
# 2. Create candidate profiles
python main.py person create "Sarah Chen"
python main.py person create "Mike Rodriguez"
python main.py person create "Emma Davis"
# 3. Add personality descriptions
python main.py person add_desc "Sarah Chen" "innovative and creative problem solver with strong leadership skills"
python main.py person add_desc "Mike Rodriguez" "analytical and detail-oriented researcher who prefers working independently"
python main.py person add_desc "Emma Davis" "collaborative team player who excels in group settings"
# 4. Find matches for different job types
python main.py company query "InnovationTeam" "seeking creative innovators for our R&D department"
python main.py company query "ResearchDept" "looking for independent analytical thinkers"
python main.py company query "MarketingTeam" "need collaborative team players for our creative campaigns"
main.py - CLI entry point with argument parsing and command routingservices/ - Business logic layer:person_service.py - Person-related business operationscompany_service.py - Company matching and analysis logicperson_dao.py - Data access object for person database operationstrait_dao.py - Data access object for trait database operationspersonality_models.py - Data classes for personality traits and statisticsdb_connection.py - Database connection context managertrait_commands.py - CLI handlers for trait operationsperson_commands.py - CLI handlers for person operationscompany_commands.py - CLI handlers for company matchingCREATE TABLE persons (
person TEXT PRIMARY KEY,
friendliness REAL DEFAULT 0.0,
dominance REAL DEFAULT 0.0,
n_friendliness INTEGER DEFAULT 0,
n_dominance INTEGER DEFAULT 0
)
CREATE TABLE traits (
trait TEXT PRIMARY KEY,
friendliness REAL,
dominance REAL
)
The system comes pre-loaded with these personality traits:
python -m pytest tests/
# Reset and repopulate databases
python populate_db.py
This project is licensed under the MIT License - see the LICENSE file for details.
For bug reports or feature requests, please open an issue in the project repository.
View the full repository on GitHub