Installation guide
Requirements
The requirements are the following:
python>=3.8torch>=1.7.0numpy>=1.18opt_einsum(https://pypi.org/project/opt-einsum/)
The GPU (if available) version of pytorch is recommended to be installed. Read the official installation guide for further info.
Using pip
You can install the package using the pip command:
pip install torchTT
The latest github version can be installed using:
pip install git+https://github.com/ion-g-ion/torchTT
One can also clone the repository and manually install the package:
git clone https://github.com/ion-g-ion/torchTT
cd torchTT
pip install .
Using uv
You can install the package using uv:
uv pip install torchTT
The latest github version can be installed using:
uv pip install git+https://github.com/ion-g-ion/torchTT
One can also clone the repository and install the package using uv:
git clone https://github.com/ion-g-ion/torchTT
cd torchTT
uv sync
Or install in editable mode:
uv pip install -e .
Development Installation
For development, you may want to install the package with additional development dependencies (pytest, sphinx, ipykernel, matplotlib):
Using pip:
pip install -e ".[dev]"
Using uv:
uv sync --extra dev
or
uv pip install -e ".[dev]"
This will install the package in editable mode along with all development tools needed for testing, building documentation, and working with Jupyter notebooks.
Tests
The directory tests/ from the root folder contains all the unittests. To run them use the command:
pytest tests/
Building Documentation
To build the documentation locally, you need:
Install development dependencies (see Development Installation above)
Install pandoc (required for rendering Jupyter notebooks in the documentation):
Ubuntu/Debian:
sudo apt install pandocmacOS:
brew install pandocWindows:
choco install pandocor download from https://pandoc.org/installing.html
Build the documentation:
make html
The generated documentation will be in _build/html/.