Nowcast Figures Development Environment
This section explains how to set up an isolated Conda environment for nowcast web site figure development and testing.
The environment will have both the SalishSeaNowcast
nowcast system package,
and the salishsea-site
web site app package installed in it,
along with all of their dependencies.
The SalishSeaNowcast
and salishsea-site
packages use some Python language features that are not available in versions prior to Python 3.6,
in particular:
formatted string literals (aka f-strings)
Figure development and web site operation both require access to the Salish Sea project /results/
directory tree.
So,
you should set up this environment on a Waterhole “fish” machine.
The following instructions assume that you have Miniconda installed.
You will also need up-to-date clones of the following repositories from GitHub:
NEMO_Nowcast: https://github.com/43ravens/NEMO_Nowcast
moad_tools: https://github.com/UBC-MOAD/moad_tools
SalishSeaCmd: https://github.com/SalishSeaCast/SalishSeaCmd
SalishSeaNowcast: https://github.com/SalishSeaCast/SalishSeaNowcast
tidal-predictions: https://github.com/SalishSeaCast/tidal-predictions
salishsea-site: https://github.com/SalishSeaCast/salishsea-site
Assuming that all of those repositories are cloned,
one beside the other,
in a directory like MEOPAR/
,
and with the capitalization shown on the left above,
you can create and activate a figures development environment with these commands:
$ cd SalishSeaNowcast
$ conda env create -f envs/environment-fig-dev.yaml
$ conda activate nowcast-fig-dev
(nowcast-fig-dev)$ python3 -m pip install --editable ../NEMO_Nowcast
(nowcast-fig-dev)$ python3 -m pip install --editable ../moad_tools
(nowcast-fig-dev)$ python3 -m pip install --editable ../Reshapr
(nowcast-fig-dev)$ python3 -m pip install --editable ../tools/SalishSeaTools
(nowcast-fig-dev)$ python3 -m pip install --editable ../NEMO-Cmd
(nowcast-fig-dev)$ python3 -m pip install --editable ../SalishSeaCmd
(nowcast-fig-dev)$ python3 -m pip install --editable ../salishsea-site/
(nowcast-fig-dev)$ python3 -m pip install --editable .
The --editable
option in the pip install command above installs the packages from the cloned repos via symlinks so that the installed packages will be automatically updated as the repos evolve.
To deactivate the environment use:
(nowcast-fig-dev)$ conda deactivate