Installation

Contents

Installation#

To install tsdate simply run:

$ python -m pip install tsdate

Once installed, tsdate’s Command Line Interface (CLI) can be accessed via:

$ python -m tsdate

or

$ tsdate

Alternatively, the Python API allows more fine-grained control of the inference process.

Development#

See the tskit developer documentation for the general development workflow (git, prek, testing, documentation). Install development dependencies with uv sync and run the tests with:

$ uv run pytest

Tsdate makes extensive use of numba’s “just in time” (jit) compilation to speed up time-consuming numerical functions. Because of the need to compile these functions, loading the tsdate package can take tens of seconds. To speed up loading time, you can set the environment variable

TSDATE_ENABLE_NUMBA_CACHE=1

The compiled code is not cached by default as it can be problematic when e.g. running the same installation on different CPU types in a cluster, and can occassionally lead to unexpected crashes.