Install Lentil for development#

Forking the Lentil repo#

Lentil is hosted at andykee/lentil.git. If you plan on solving issues or submitting pull requests to the main Lentil repository, you should first fork this repository by visiting andykee/lentil.git and clicking on the Fork button on the top right of the page. See the GitHub documentation for more details.

Installing from source#

If you want to build from source in order to work on Lentil itself, first clone the Lentil repository:

git clone https://github.com/andykee/lentil.git

If you forked the Lentil repository, you should clone the Lentil repository from your fork instead (replacing <your-username> with your GitHub username):

git clone https://github.com/<your-username>/lentil.git

Now you can install Lentil in editable mode from the lentil directory:

pip install -e .

Development dependencies#

Lentil uses the pytest framework for testing. Install it with

pip install pytest

The additional Python packages required to build the documentation are listed in docs/requirements.txt and can be installed using

pip install -r docs/requirements.txt

Running the test suite#

To run the tests, in the root directory of your development repository run:

pytest tests

Building the documentation#

The documentation source is found in the docs/ directory. The configuration file for Sphinx is docs/conf.py. It controls which directories Sphinx parses, how the docs are built, and how the extensions are used. To build the documentation in html format, cd into docs/ and run:

make html

The built docs will be placed in the folder docs/_build/html.