Thank you for your interest in contributing to Fishtest! This guide covers the development workflow and coding standards for the project.
| Component | Minimum Version | Purpose |
|---|---|---|
| Python | >= 3.14 | Server runtime |
| Python | >= 3.8 | Worker runtime |
| MongoDB | mongod service |
Data store |
| uv | latest | Package manager |
# Clone the repository
git clone https://github.com/official-stockfish/fishtest.git
cd fishtest
# Install development dependencies (pre-commit, ruff, ty)
uv sync
# Install server dependencies
cd server && uv sync && uv sync --group test && cd ..
# Install pre-commit hooks
uv run pre-commit installcd server
FISHTEST_INSECURE_DEV=1 uv run uvicorn fishtest.app:app --reload --port 8000Setting FISHTEST_INSECURE_DEV=1 enables an insecure fallback secret key
for cookie signing. This must never be used in production.
mkdir -p .local/mongo-data
mongod --dbpath .local/mongo-data --fork --logpath .local/mongod.log
pushd server && uv run python -m unittest discover -s tests -v
popd && mongod --shutdown --dbpath .local/mongo-datauv run ruff format
uv run ruff check --select I --fix
uv run ruff check- Follow the Google HTML/CSS Style Guide and the Google JavaScript Style Guide.
- Format with Prettier:
npx prettier --write 'server/fishtest/static/{css/*.css,html/*.html,js/*.js}'The repository uses pre-commit hooks to automate
formatting and linting on every commit. The hooks are configured in
.pre-commit-config.yaml and include:
- Trailing whitespace removal
- End-of-file fixer
- TOML/YAML validation
- Ruff formatting and linting
uv.locksync check
Run hooks manually on all files:
uv run pre-commit run --all-filesTo temporarily skip hooks during a commit:
git commit --no-verify -m "message"- Open an issue first — describe what you plan to change and wait for feedback from a maintainer before writing code.
- Fork the repository and create a feature branch from
master. - Keep PRs small and focused — one logical change per pull request.
- Run the full pre-commit suite before pushing.
- Write tests for new server functionality (the project uses
unittestwithhttpxfor HTTP tests). - Write a clear PR description linking to the related issue.
- Respond to review feedback promptly.
fishtest/
├── server/
│ ├── fishtest/ # Server application
│ │ ├── app.py # FastAPI application entry point
│ │ ├── views.py # Route handlers
│ │ ├── api.py # Worker API endpoints
│ │ ├── rundb.py # Test run database layer
│ │ ├── templates/ # Jinja2 templates (.html.j2)
│ │ └── static/ # CSS, JS, images
│ └── tests/ # Server test suite
├── worker/ # Distributed worker client
├── docs/ # Architecture & deployment docs
└── pyproject.toml # Root project config
- Development Guide — environment variables, nginx config, and multi-instance testing.
- Architecture Overview — server design and threading model.
- API Reference — worker API endpoints.
- Wiki Contributing Page - development environment setup, coding styles, development wrokflow.
- Coding Style Guide (Issue #634) — original style discussion.