IMAS-Python is a pure Python package. While it can be used without it, for full functionality of the package you need an installation of the IMAS Core library. See :ref:`IMAS-Python 5 minute introduction` for a quick overview of its most basic functionalities.
To get started, you can install it from pypi.org:
pip install imas-python
We recommend using a :external:py:mod:`venv`. Then, clone the IMAS-Python repository and run pip install:
python3 -m venv ./venv
. venv/bin/activate
git clone git@github.com:iterorganization/IMAS-Python.git
cd IMAS-Python
pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install .
For development an installation in editable mode may be more convenient, and you will need some extra dependencies to run the test suite and build documentation.
pip install -e .[test,docs]
Test your installation by trying
cd ~
python -c "import imas; print(imas.__version__)"
This is how to run the IMAS-Python test suite:
# inside the IMAS-Python git repository
pytest imas --mini
# run with a specific backend, requires IMAS-Core installed
pytest imas --ascii --mini
And to build the IMAS-Python documentation, execute:
make -C docs html