Page:
Setup
Pages
Home da
Home ms
Home
Reflection da
Reflection ms
Reflection
Setup da
Setup ms
Setup
Step 1 Window And Text da
Step 1 Window And Text ms
Step 1 Window And Text
Step 2 Timer And Typing da
Step 2 Timer And Typing ms
Step 2 Timer And Typing
Step 3 Result da
Step 3 Result ms
Step 3 Result
Step 4 Trainer da
Step 4 Trainer ms
Step 4 Trainer
Clone
1
Setup
Tirsvad edited this page 2026-11-20 05:52:16 +01:00
English · Dansk · Bahasa Malaysia
Setup
This page shows how to get the project running on your own machine. You need Python 3.13 or newer.
Create the environment
Create a local virtual environment named .venv in the project folder, activate it, and upgrade pip:
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
On Linux and macOS, activate it with source .venv/bin/activate instead.
Install the project
python -m pip install -e ".[dev]"
The command reads pyproject.toml. The program has no runtime dependency; the dev group adds the test and check tools.
Run the application
With the environment active, start the program from the project folder (available from step 1):
python -m typing_speed_test
Run the tests
python -m pytest
What we gained in this step
- One configuration file.
pyproject.tomlholds the project name, the Python version it needs, its empty list of runtime dependencies and the settings of every tool. - A virtual environment.
.venvkeeps the project's packages apart from the rest of the machine, so the project runs the same everywhere. - Tests from the first day. A first test already checks the constants, so the habit of running
pyteststarts before any feature exists. - Constants in one place.
constants.pyholds every fixed value, such as the 60 seconds of the test and the five characters of a word, so no number is repeated in the code. - Documented source. Doxygen comments and a
Doxyfileturn the comments into a browsable manual. - A quality gate.
scripts/check.shruns tests, linter, type checker and a security scan before every push. - A safe place for graphical tests. A Linux container with a virtual display runs the window tests and takes the screenshots, so the tests never take over your mouse and keyboard.
Typing Speed Test
- Home
- Setup
- Step 1: window and sample text
- Step 2: timer and typing
- Step 3: result and restart
- Step 4: the trainer
- Reflection
Languages