Since version 0.3, tyssue depends on CGAL for collision detection, and thus a c++ compiler toolchain. It is thus advised to use conda for a simple installation procedure.
If you have a conda environment ready:
conda install -c conda-forge tyssue
This will install tyssue and all its dependencies, with the pre-compiled binary parts.
This install a cross-platform, pure python version of tyssue. Some advanced features are not available, namely:
- Collision detection
- Periodic boundary sheet generation
python -m pip install --user --upgrade tyssue
Those are the instructions to install the package from source on a debian-like linux distribution. If you allready have a basic scientific python stack, use it, don't install anaconda.
With an Debian like system, this is achieved by:
sudo apt install build-essential cmake g++
If you want to do that, I assume you allready know how to manage
dependencies on your platform. The simplest way to manage dependencies is to use conda
to manage the dependencies (you can use mamba
as a faster alternative to conda).
Start by cloning tyssue recursively to also grab pybind11:
git clone --recursive https://github.com/damcb/tyssue.git
cd tyssue
Then create a virtual environement:
conda env create -f environment.yml
Then install python:
python setup.py install
If all went well, you have successfully installed tyssue.
pip install pytest pytest-cov nbval
A Makefile
provides some utility function. Try :
make tests # Run tests with nose
make coverage # Run tests with coverage
make flake8 # Check PEP8 on the code
make nbtest # Tests all the demo notebooks - requires nbval
The documentation uses nbsphinx to convert the jupyter notebooks in doc/notebooks to html with sphinx.
pip install sphinx nbsphinx sphinx-autobuild
cd tyssue/doc
make html