A chess tournament software in Python
Project description
Chess Tournament Software
A standalone, offline Python application to manage chess tournaments and players — using the MVC architecture and a CLI interface.
Table of Contents
- Installation
- Execution
- Makefile Commands
- Tests
- Linting & Formatting
- Pre-commit Hooks
- Code Architecture
- Features
- Author
Installation
To configure and run the program, follow the steps below:
1.Clone the repository:
If you haven't already cloned the repository, use the following command:
git clone https://gitlab.com/thi26/chess-tournament-software.git
cd chess-tournament-software
2.Create and activate a virtual environment:
python -m venv venv
- On Windows:
.\venv\Scripts\activate
- On mac OS/Linux:
source venv/bin/activate
3.Install the project and development dependencies:
pip install -e ".[dev]"
Includes development tools like black, flake8, pytest, and pre-commit.
Execution
To start the application (after activation of your virtualenv):
chess
Optional flags:
chess --quiet # Reduces console output
Makefile Commands
This project includes a Makefile to simplify your workflow:
make install-dev # Install the app + dev dependencies
make test # Run all tests
make lint # Lint code with flake8
make format # Format code with black
make pre-commit # Run all pre-commit hooks
make clean # Remove cache and temporary files
Tests
Tests are located in the tests/ folder and use pytest:
make test
A test report in HTML is generated automatically in pytest-report/ during GitLab CI.
Linting & Formatting
To ensure consistent code style:
Lint with Flake8:
make lint
Auto-format with Black:
make format
Pre-commit Hooks
The project uses pre-commit to check code before committing:
make pre-commit
This runs checks like black, flake8, etc., on staged files before allowing the commit.
Code Architecture
The application follows the Model-View-Controller (MVC) pattern to ensure maintainable and testable code.
Features
Player Management: Add, edit, list players
Tournament Management: Create tournaments, pair rounds, record match results
Reports: Generate player and tournament reports
Author
@Thi26, OpenClassrooms student Training: Python Application Developer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chess_tournament-0.1.0.tar.gz.
File metadata
- Download URL: chess_tournament-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e8ca35eff3de80fd280bc2518fac24498272b311e9a692ee5eeee0d92e45bec
|
|
| MD5 |
1f994096a14151c554e2abbf45675879
|
|
| BLAKE2b-256 |
c70808ab0114233e33c186e9ee403eaa54f33e5e016df499e673ae9c50afa3f9
|
File details
Details for the file chess_tournament-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chess_tournament-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8007ab132dc6071eab97cdc90d165b8312baafe2713020facb67be5172b5b46f
|
|
| MD5 |
b3e6da1396aa1e377dc1eda7a9d079cb
|
|
| BLAKE2b-256 |
f47a6aecd9e3fa03b81587c859333a1accf922f834398f3426a1089910282a41
|