Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

audio-engineer/chess-teacher-stockfish

Repository files navigation

ChessTeacher Stockfish

This containerized Python application is a REST API built using FastAPI that serves Stockfish engine responses using py-stockfish/stockfish as a wrapper.

The Stockfish software is licensed under GPL v3. The full source code for the version of the software used in this project can be found here: official-stockfish/Stockfish.

To build it, run:

docker build -t audio-engineer/chess-teacher-stockfish:latest .

Or, if you are using PyCharm, run the Build run configuration.

Documentation

API documentation can be found at localhost:8000/docs and localhost:8000/redoc.

Local Development

docker compose up -d
docker exec -it chess-teacher-stockfish-python-1 /bin/sh
fastapi dev --host 0.0.0.0 src/chess_teacher_stockfish/main.py

To run the linters in the python service container:

pylint src/ && flake8 && ruff check

To run the testing suite in the python service container:

python -m pytest --cov=src.chess_teacher_stockfish
docker compose down