Installation
============

TACO Format can be installed both as a Python package and as a Rust crate.

Python Installation
-------------------

The recommended way to install TACO Format for Python is via pip:

.. code-block:: bash

    pip install taco-format

This will install the pre-built binary wheels for your platform if available. If not, it will try to build from source, which requires Rust and maturin to be installed.

Requirements
~~~~~~~~~~~~

- Python 3.8 or newer
- Rust compiler (only if building from source)
- `maturin`` (for building from source)

Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~

- ASE (Atomic Simulation Environment) - For interoperability with ASE
- MDAnalysis - For XTC format comparison

Installation from Source
~~~~~~~~~~~~~~~~~~~~~~~~

To install from source:

.. code-block:: bash

    git clone https://gitlab.com/taco-format/taco.git
    cd taco
    pip install maturin
    maturin develop --release

Running the tests
~~~~~~~~~~~~~~~~~

Tests are implemented using `pytest`. To run the tests after installation, you can use:

.. code-block:: bash

    pip install pytest
    pytest

Rust Installation
-----------------

To use TACO Format in your Rust project, add it to your `Cargo.toml`:

.. code-block:: toml

    [dependencies]
    taco_format = "0.1.1"

You can also build from source:

.. code-block:: bash

    git clone https://gitlab.com/taco-format/taco.git
    cd taco
    cargo build --release

Verify Installation
-------------------

To verify your installation, you can run:

.. code-block:: python

    import taco_format
    print(taco_format.__version__)