Tirsvad 29936b6812
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Skipped
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 6s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 29s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 1m4s
TirSystem/git-workflows: Validate / validate (push) Successful in 17s
Merge pull request 'Close the conditions of RC-032 and RC-034' (#61) from rc-032-034-close-conditions into main
2026-11-20 09:35:10 +01:00
2026-11-20 16:33:13 +08:00
2026-11-20 05:29:22 +01:00

🚀 Typing Speed Test

A desktop application that tests how fast you type: it shows a sample text, times you while you type it and reports your words per minute and accuracy. It is the Day 86 assignment of the Udemy course "100 Days of Code: The Complete Python Pro Bootcamp", written for course participants and for visitors who want a readable, runnable example.

📚 Table of Contents

🧭 Overview

The program is built in four steps, and each step has a screenshot here and a wiki page (English, Danish and Bahasa Malaysia) that explains what the step taught:

  1. Step 1: a window that shows a sample text (start_test).
  2. Step 2: a timer that starts with the first key and live feedback on right and wrong characters.
  3. Step 3: the result in words per minute and accuracy (calculate_wpm, calculate_accuracy), and a restart.
  4. Step 4: a trainer with more sample texts and a high score list (save_high_score).

The repository is laid out as follows:

Folder or file Holds
src/typing_speed_test/ The application, in layers: domain, application, infrastructure and presentation
src/typing_speed_test/constants.py Every constant of the application
tests/ The pytest tests: unit, integration and gui
docs/ Project documents, the wiki sources (docs/wiki/) and the screenshots (docs/screenshots/)
docker/gui/ The Linux container in which graphical tests and screenshots run
scripts/ check.sh, the quality gate, and run-gui-tests.sh, the container runner
pyproject.toml The single configuration file of the project and its tools
Doxyfile The Doxygen configuration for the source comments

📋 Requirements

  • Python 3.13 or newer, with Tkinter (included in the standard installers of Python).
  • No runtime dependency: the program uses the standard library only.
  • For development only: pytest, pytest-cov, ruff, mypy and import-linter (installed with the dev group), Doxygen for the source manual, Docker for graphical tests and screenshots, and opengrep for the security scan.

🛠️ Setup

Create a local virtual environment named .venv, activate it, upgrade pip and install the project.

On Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

On Linux and macOS:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Leave the environment with deactivate. Install without the development tools with python -m pip install -e ..

▶️ Run

With the environment active:

python -m typing_speed_test

The program is available from step 1 on. The controls of each step are described in the wiki.

🧪 Tests

With the environment active:

python -m pytest

Before a push, run the whole quality gate (tests with coverage, ruff, mypy, import-linter and the opengrep scan):

bash scripts/check.sh

Graphical tests and screenshots never run on your desktop. They run in a Linux container with a virtual display:

bash scripts/run-gui-tests.sh python -m pytest -m gui

Build the source manual with doxygen Doxyfile; it is written to build/doxygen/index.html.

🪟 Steps

Each step has screenshots made in a Linux container and a wiki page that explains what it taught.

🪟 Step 1: window and sample text

start_test chooses a sample text and the window shows it with an empty input field. The time does not run until you type.

The window as it opens

The input field has the focus

Wiki: Step 1.

🪟 Step 2: timer and typing

The time starts with the first character. Right characters turn green, wrong ones red, and the status line counts down from 60 seconds. When the text is complete or the time is over, the input is locked.

Typing with one mistake

The finished test

Wiki: Step 2.

🪟 Step 3: result and restart

When the test ends the window shows words per minute, accuracy and the number of right and wrong characters. A word is five characters, spaces included: 300 right characters in 60 seconds are 60 words per minute. The Restart button starts again.

The result of a finished test

After the restart

Wiki: Step 3.

🪟 Step 4: the trainer

Six sample texts, a chooser until the first key, and a list of the ten best results that is kept in a file in your home folder between runs.

The chooser before a test starts

A finished test with the high score list

Wiki: Step 4.

💭 Reflection

What was easy, what was hard and what the project taught is in the wiki: Reflection.

📄 License

GNU Affero General Public License, version 3. See the LICENSE file.

📎 Appendix: Project documents

The documents a newcomer needs, in reading order.

Document What it tells you
Business Case Why the project exists, its scope and success criteria
Stakeholder Analysis Who is involved; the stakeholder IDs used for owners and reviewers
Project Plan The gateways and their schedule
Milestones One document per gateway: Go/No-Go criteria and tasks
Artifact registry Where each artifact type lives, the next version, the PO language and domain
Framework README The framework this project uses
Framework changelog What changed in each framework release

S
Description
Typing speed test with a Tkinter GUI: measures words per minute and accuracy, with sample texts and high scores. Day 86 of Udemy 100 Days of Code. Python 3.13, pytest, no runtime dependencies, wiki in English, Danish and Bahasa Malaysia.
Readme AGPL-3.0
855 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 96.8%
Shell 3%
Dockerfile 0.2%