Thank you for your interest in contributing! This document provides guidelines and instructions for contributing to the Smart Hiring System.
- Code of Conduct
- Getting Started
- Development Workflow
- Coding Standards
- Commit Messages
- Pull Request Process
- Testing
- Reporting Issues
By participating in this project, you agree to maintain a respectful and inclusive environment. Be kind, constructive, and professional in all interactions.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/smart-hiring.git cd smart-hiring - Set up the development environment (see README.md)
- Create a branch for your work:
git checkout -b feature/your-feature-name
- Keep your fork up to date with the upstream
mainbranch - Work in a feature branch — never commit directly to
main - Make small, focused commits with clear messages
- Test your changes before submitting a pull request
- Ensure all existing tests still pass
| Type | Pattern | Example |
|---|---|---|
| Feature | feature/description |
feature/linkedin-oauth |
| Bug fix | fix/description |
fix/resume-parsing-error |
| Hotfix | hotfix/description |
hotfix/jwt-token-expiry |
| Documentation | docs/description |
docs/api-reference-update |
| Refactor | refactor/description |
refactor/scoring-engine |
- Follow PEP 8 style guide
- Use type hints for function signatures
- Write docstrings for all public functions and classes
- Keep functions focused — single responsibility principle
- Use meaningful variable and function names
- Maximum line length: 120 characters
def calculate_match_score(candidate: dict, job: dict) -> float:
"""
Calculate the match score between a candidate and a job posting.
Args:
candidate: Candidate profile dictionary with skills and experience.
job: Job posting dictionary with requirements.
Returns:
Match score between 0.0 and 1.0.
"""
...- Use ES6+ syntax (const/let, arrow functions, template literals)
- Follow consistent naming:
camelCasefor variables/functions,PascalCasefor classes - Add JSDoc comments for public functions
- Handle errors gracefully — always catch fetch/API errors
- Use semantic HTML elements
- Follow BEM naming convention for CSS classes where applicable
- Ensure accessibility (ARIA attributes, keyboard navigation, color contrast)
Follow the Conventional Commits format:
<type>(<scope>): <short description>
[optional body]
[optional footer]
| Type | Usage |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
style |
Code formatting (no logic change) |
refactor |
Code restructuring (no feature/fix) |
test |
Adding or updating tests |
chore |
Build scripts, CI, dependency updates |
perf |
Performance improvement |
security |
Security fix or improvement |
feat(auth): add LinkedIn OAuth integration
fix(resume): handle malformed PDF uploads gracefully
docs(api): update candidate endpoint documentation
test(fairness): add demographic parity threshold tests
-
Update your branch with the latest
main:git fetch upstream git rebase upstream/main
-
Run all tests and ensure they pass:
pytest
-
Push your branch and open a Pull Request on GitHub
-
In the PR description, include:
- What the change does and why
- Any breaking changes
- Screenshots (if UI changes)
- Related issue numbers
-
Wait for review — at least one approval is required before merging
-
Address feedback promptly and push updates to the same branch
- Code follows the project's coding standards
- All tests pass locally
- New features include appropriate tests
- Documentation is updated if needed
- No sensitive data (API keys, credentials) in the code
- Changes are backward-compatible (or breaking changes are documented)
# All tests
pytest
# Specific test file
pytest tests/test_api.py
# With coverage report
pytest --cov=backend --cov-report=html
# Backend unit tests only
pytest backend/tests/- Place test files in
tests/(integration) orbackend/tests/(unit) - Name test files
test_*.py - Name test functions
test_<description>() - Use fixtures for common setup/teardown
- Test both happy paths and error cases
When filing a bug report, include:
- Summary — Brief description of the issue
- Steps to Reproduce — Exact steps to trigger the bug
- Expected Behavior — What should happen
- Actual Behavior — What actually happens
- Environment — OS, Python version, browser (if frontend)
- Logs/Screenshots — Any relevant output or error messages
When suggesting a feature:
- Problem — What problem does this solve?
- Proposed Solution — How should it work?
- Alternatives — Other approaches you've considered
- Impact — Who benefits from this feature?
Do NOT open a public issue for security vulnerabilities.
Please refer to docs/SECURITY.md for responsible disclosure instructions.
If you have questions about contributing, open a GitHub Discussion or contact the maintainers.
Thank you for helping make Smart Hiring better!