Installation

Users

To install Lightshow, simply use pip

pip install lightshow

Make sure you’ve set your Materials Project v2 API key as well! You can find some documentation on how to query data here and how to set up your new API key here.

export MP_API_KEY="your_Materials_Project_v2_API_key"

(or preferably, add MP_API_KEY to your bash profile).

More details can be found at our documentation.

Developers

For developers: after cloning Lightshow locally, install pre-commit via

pip install pre-commit
pre-commit
pre-commit install

and check that the tests (below) work correctly (these can be run via pytest). After cloning, simply use

pytest lightshow/_tests

or with coverage

pytest -v --cov --cov-report xml lightshow/_tests

We use helper scripts to parse the pyproject.toml file and install only specific packages required for certain parts of development. For development, we recommend installing all dependencies:

bash scripts/install.sh       # Install Lightshow's core dependencies
bash scripts/install.sh test  # Install the test requirements only
bash scripts/install.sh doc   # Install requirements for building the docs