Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.18 KB

File metadata and controls

46 lines (33 loc) · 1.18 KB

Contributing to tqstack

Development Setup

# Clone the repository
git clone https://github.com/<your-username>/tqstack.git
cd tqstack

# Create a virtual environment
python3 -m venv .venv && source .venv/bin/activate

# Install dependencies
pip install fastapi uvicorn[standard] httpx pydantic pytest pytest-asyncio

# Install TurboQuant MLX (external dependency)
git clone https://github.com/sharpner/turboquant-mlx.git ../turboquant-mlx

Running Tests

# Set TurboQuant path
export PYTHONPATH="../turboquant-mlx:$PYTHONPATH"

# Run all unit tests (no model download required)
pytest tests/test_hybrid_cache.py tests/test_shared.py tests/test_router.py tests/test_tq_patch_v2.py -v

# Run integration tests (requires MLX and model download)
pytest tests/test_sidecar.py -v

Code Style

  • Follow PEP 8 for Python code
  • Use type hints where practical
  • Keep docstrings on all public functions and classes
  • Shell scripts use set -euo pipefail
  • All files use LF line endings (enforced by .gitattributes)

Pull Requests

  • Describe the problem and the solution
  • Include tests for new functionality
  • Run pytest before submitting
  • Keep commits focused and atomic