Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WorkTeam01/team-practice/llms.txt

Use this file to discover all available pages before exploring further.

Python Calculator requires Python 3.12 or later. The graphical interface relies on tkinter, which ships as part of the Python standard library on all major platforms — no additional system package is needed for most installations. The only third-party dependency is pytest (version 7.0.0 or higher), used exclusively for the test suite.
Python 3.12 or newer is required. Earlier versions of Python are not supported and may produce unexpected behavior or import errors.

Installation steps

1

Clone the repository

Download the project source code from GitHub:
git clone https://github.com/WorkTeam01/team-practice.git
2

Change into the project directory

cd team-practice
3

(Optional) Create and activate a virtual environment

Using a virtual environment keeps the project’s dependencies isolated from your global Python installation. This step is recommended but not strictly required.
python3 -m venv .venv
source .venv/bin/activate
4

Install dependencies

Install the project’s dependencies from requirements.txt. The only package listed is pytest:
pip install -r requirements.txt
The requirements.txt file contains a single entry — pytest>=7.0.0. All other functionality (tkinter for the GUI, re for expression validation, math internals) is part of the Python standard library and requires no separate installation.
tkinter is included in the standard Python distribution on Windows and macOS. On some Linux distributions it may be provided as a separate system package. If you see an ImportError: No module named 'tkinter' when launching the GUI, install it via your package manager — for example, sudo apt install python3-tk on Debian/Ubuntu.

Verifying the installation

Once the dependencies are installed, confirm everything is working by running the full test suite:
pytest -v
A successful installation produces output similar to the following, with all tests marked as PASSED:
collected 63+ items

tests/test_calculator.py::test_add ...                 PASSED
tests/test_calculator.py::test_subtract ...            PASSED
tests/test_calculator.py::test_multiply ...            PASSED
tests/test_calculator.py::test_divide ...              PASSED
tests/test_calculator.py::test_power ...               PASSED
tests/test_calculator.py::test_parentheses ...         PASSED
tests/test_gui.py::test_number_button_click ...        PASSED
tests/test_gui.py::test_clear_click ...                PASSED
...

==================== 63 passed in Xs ====================
You can also run individual test modules or filter by name:
# Run only the core math tests
pytest tests/test_calculator.py -v

# Run only the GUI tests
pytest tests/test_gui.py -v

# Filter by test name keyword
pytest tests/test_gui.py -k "parenthesis" -v

# Generate an HTML coverage report
pytest --cov=src --cov-report=html -v
With the installation verified, continue to the Quickstart to launch the calculator and run your first computation.

Build docs developers (and LLMs) love