Project to predict sports player performance outcomes using complex ML modeling.
- Python 3.12+
- uv (Python package manager)
- just (command runner)
- Rust/Cargo (for Rust components)
- Git
Install prerequisites on macOS:
Option 1: Homebrew (recommended)
brew install uv just rustOption 2: Official installers
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install just and rust via Homebrew
brew install just rustOption 3: Using Rust/Cargo (alternative for just)
# Install uv via official installer
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install Rust toolchain (includes cargo)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install just via cargo
cargo install just-
Clone the repository
git clone https://github.com/JonathanPLev/TransformerPredictionModel.git cd TransformerPredictionModel -
Set up Python environment
# Create virtual environment and install dependencies uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv sync --dev
-
Verify installation
# Check available commands just --list # Run linting and tests just check-all
Use just <command> to run these tasks:
just lint-python- Lint Python code with Ruffjust fix-python- Auto-fix Python issuesjust format-python- Format Python codejust type-check- Run MyPy type checking
just test- Run pytest testsjust test-cov- Run tests with coveragejust coverage-report- Generate HTML coverage report
just lint-yaml- Lint YAML filesjust lint-json- Lint JSON filesjust lint-rust- Lint Rust code (if applicable)just format-rust- Format Rust code
just lint-all- Run all linting tasksjust format-all- Run all formatting tasksjust check-all- Run all checks (lint + type check)just test-all- Run tests + all checksjust clean- Clean Python cache files
-
Create a feature branch
git checkout -b feat/your-feature-name
-
Make your changes and test
# Sync dependencies if you added any uv sync --dev # Run checks locally just check-all just test-cov
-
Commit with conventional format
git add . git commit -m "feat: add new prediction model"
-
Push and create PR
git push origin feat/your-feature-name # Create PR on GitHub
This project follows Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changesrefactor:- Code refactoringperf:- Performance improvementstest:- Test additions/modificationschore:- Maintenance tasks
TransformerPredictionModel/
├── .github/ # GitHub workflows and templates
│ ├── workflows/ # CI/CD workflows
│ └── pull_request_template.md
├── src/ # Source code (create as needed)
├── tests/ # Test files (create as needed)
├── pyproject.toml # Python project configuration
├── justfile # Task runner commands
├── uv.lock # Dependency lock file
└── README.md # This file
Run tests with coverage:
just test-covGenerate HTML coverage report:
just coverage-report
# Open htmlcov/index.html in your browser- Fork the repository
- Create a feature branch following the naming convention:
feat/description,fix/description, etc. - Make your changes and ensure all checks pass locally
- Write tests for new functionality
- Submit a pull request with a clear description
- All CI checks must pass
- Code owner approval required
- Conventional commit format in PR title
- Fill out the PR template completely
- Runtime: Defined in
pyproject.tomlunderdependencies - Development: Defined in
pyproject.tomlundertool.uv.dev-dependencies
- Linting: Ruff
- Type Checking: MyPy
- Testing: Pytest with coverage
- YAML Linting: yamllint
For questions or issues, please:
- Check existing Issues
- Create a new issue with detailed information
- Follow the issue template guidelines