Skip to content

Development Setup

Get started contributing to Sentimatrix.

Prerequisites

  • Python 3.10+
  • Git
  • GPU (optional, for faster testing)

Clone Repository

git clone https://github.com/Siddharth-magesh/Sentimatrix.git
cd Sentimatrix

Install Dependencies

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# venv\Scripts\activate  # Windows

# Install in development mode
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Install Playwright (for scraper tests)

playwright install chromium

Run Tests

# All tests
pytest

# With coverage
pytest --cov=sentimatrix --cov-report=html

# Specific test file
pytest tests/test_sentiment.py

# Fast tests only
pytest -m "not slow"

Code Quality

# Format code
black sentimatrix tests
isort sentimatrix tests

# Lint
ruff check sentimatrix tests

# Type check
mypy sentimatrix

Build Documentation

cd website
pip install -r requirements.txt
mkdocs serve