Skip to content

Install

TOPS needs Python 3.10 or newer. Its only dependencies are numpy, scipy, pandas, matplotlib and progressbar2, so it installs in seconds.

From PyPI

pip install tops
uv add tops

Check that it works:

python -c "import tops.dynamic; print('TOPS is ready')"

From source

TOPS is meant to be read and modified, so many users work from a clone. An editable install picks up your changes to the source straight away:

git clone https://github.com/hallvar-h/TOPS.git
cd TOPS
pip install -e .

The repository uses uv for development. With uv, uv sync creates an environment with TOPS and the test tools:

uv sync
uv run pytest            # fast tests
uv run pytest -m slow    # full-length validation against PowerFactory

Try it without installing

The example notebooks run in the browser on Binder:

Binder

Building this documentation

uv sync --group docs
uv run mkdocs serve

Then open http://127.0.0.1:8000. uv run mkdocs build --strict is what CI runs; it fails on broken links and on code examples that raise an error.

Next: run your first simulation.