Getting Started

Instructions for developers

Conda configuration

Create your conda environment using the environment.yml used by the build servers.

1 conda env create --file environment.yml
2 activate SNAPRed
3 python -m pip install -e .

Line 3 installs the code in editable mode so other methods can work.

If it has been a while, one can update using

activate SNAPRed
conda env update --file environment.yml  --prune

This can be simplified greatly by using direnv and an .envrc file with contents similar to

layout anaconda SNAPRed /opt/anaconda/bin/conda

The location of conda should point at where your version is actually installed.

Starting the gui

The gui can be started either by using the defined entrypoint

python -m snapred

or by executing the entry in the module (which is what the entrypoint is defined as)

python -m snapred

Other common operations

The test framework can be run using

python -m pytest

Note that the tests currently have a fixture that tests for the presence of a directory containing “large” test files.

The documentation can be run using

cd docs
make html

Sphinx has been configured to turn warnings into errors to make it more clear that there are issues with the documentation.