# 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
# 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
- 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)
- Describe the problem and the solution
- Include tests for new functionality
- Run
pytest before submitting
- Keep commits focused and atomic