wildfires requires Python >= 3.7.
It needs to be installed from source (note the use of SSH instead of HTTPS), either using:
pip install git+ssh://[email protected]/akuhnregnier/wildfires.git@master#egg=wildfires
or after cloning (forking) for development purposes:
git clone [email protected]:akuhnregnier/wildfires.git
pip install -e "wildfires"
Required packages are not installed using those commands, because the requirements.yml
environment file was designed to facilitate package installation using conda
(see here or here).
JupyterLab ipywidgets:
conda install ipywidgets
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install @jupyter-widgets/jupyterlab-manager
The instructions below assume that you are using Linux and managing Python using pyenv and pyenv-virtualenv.
All essential configuration steps detailed in the section Prerequisites are automatically carried out by dev/bootstrap.py
.
To view options for this initial setup, run
dev/bootstrap.py --help
dev/install_jupyter_extensions.py
This information is mainly for reference and additional documentation of dev/bootstrap.py
, or if individual parts (like using pytest
) should be carried out independently.
Installing all packages and configuring all tools:
dev/bootstrap.py existing
By default, the new environment will be called 'wildfires'.
Installation will fail if an environment with this name is already present, unless the --force
flag is supplied, as shown below:
dev/bootstrap.py new --force
Internally dev/bootstrap.py new
uses conda env create
with support for the --name
and --force
options.
Creating a new environment called 'wildfires':
conda env create --file requirements.yaml --name wildfires
Overwriting an existing environment called 'wildfires':
conda env create --file requirements.yaml --name wildfires --force
Making a new environment the local default environment for the repository using pyenv (assuming --name wildfires
was used):
pyenv activate wildfires
pyenv local $PYENV_VERSION
To set up pre-commit hooks, run
pre-commit install
This needs to be done every time the repository is cloned (as is done by dev/bootstrap.py
)!
pre-commit run --verbose --all-files
Run pytest
in the root directory of the repository, so that all tests will be discovered.
If DeprecationWarning warnings are desired, run pytest -Wd
instead.
Note that pytest is also run as part of the pre-commit hooks set up by pre-commit.