-
Notifications
You must be signed in to change notification settings - Fork 9
How to Use
You'll need a working Python environment to run the code.
The recommended way to set up your environment is through the
Anaconda Python distribution which
provides the conda
package manager.
Anaconda can be installed in your user directory and does not interfere with
the system Python installation.
The required dependencies are specified in the file environment.yml
.
We use conda
virtual environments to manage the project dependencies in
isolation.
Thus, you can install our dependencies without causing conflicts with your
setup (even with different Python versions).
Run the following command in the repository folder (where environment.yml
is located) to create a separate environment and install all required
dependencies in it:
conda env create
Before running any code you must activate the conda environment:
source activate ENVIRONMENT_NAME
or, if you're on Windows:
activate ENVIRONMENT_NAME
This will enable the environment for your current terminal session. Any subsequent commands will use software that is installed in the environment.
To build and test the software, produce all results and figures, and compile the manuscript PDF, run this in the top level of the repository:
make all
If all goes well, the manuscript PDF will be placed in manuscript/output
.
You can also run individual steps in the process using the Makefile
s from the
code
and manuscript
folders. See the respective README.md
files for
instructions.
Another way of exploring the code results is to execute the Jupyter notebooks individually. To do this, you must first start the notebook server by going into the repository top level and running:
jupyter notebook
This will start the server and open your default web browser to the Jupyter
interface. In the page, go into the code/notebooks
folder and select the
notebook that you wish to view/run.
The notebook is divided into cells (some have text while other have code).
Each cell can be executed using Shift + Enter
.
Executing text cells does nothing and executing code cells runs the code
and produces it's output.
To execute the whole notebook, run all cells in order.