.. include:: /_substitutions.rst

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

Create a Python environment (recommended)
-----------------------------------------

It is recommended to install |LModeAk| in a dedicated Python environment
to avoid dependency conflicts with other packages.

Using ``conda``::

   conda create -n lmodea python=3.11
   conda activate lmodea

Using ``venv``::

   python -m venv lmodea
   source lmodea/bin/activate

Install via pip from GitHub (recommended)
-----------------------------------------

.. code-block:: bash

   pip install git+https://github.com/SMU-CATCO/LModeA-k.git

This installs the ``lmodea-k`` and ``lmodea-k-plot`` command-line tools into the active Python environment.

To install the optional CRYSTAL parser dependencies as well:

.. code-block:: bash

   pip install "git+https://github.com/SMU-CATCO/LModeA-k.git#egg=LModeA-k[crystal]"

Install from a local checkout (alternative)
-------------------------------------------

.. code-block:: bash

   git clone https://github.com/SMU-CATCO/LModeA-k.git
   cd LModeA-k
   pip install .

To include the optional CRYSTAL parser dependencies from a local checkout:

.. code-block:: bash

   pip install .[crystal]

Verify installation
-------------------

.. code-block:: bash

   lmodea-k --help

If the command prints usage information, the installation was successful.

Requirements and notes
----------------------
- Python ≥ 3.10.
- Network access is needed the first time to fetch dependencies.
- PyPI/conda packages may be provided in the future; for now, use one of the methods above.

Building the docs (optional)
----------------------------

Docs are not required to run the code. To build them locally:

.. code-block:: bash

   pip install -r docs/requirements.txt
   cd docs
   make clean html

HTML output: ``docs/build/html/index.html``.
