Installation
The easy (CHS) way
Log in to CHS Pangeo JupyterHub, and edit/create your ~/.condarc
file:
channels:
- conda-forge
- defaults
channel_priority: strict
envs_dirs:
- /home/jovyan/my-conda-envs
Then create the stglib environment, install stglib, and activate the environment:
conda create -n stglib stglib ipykernel
conda activate stglib
Now you can start processing data!
The easy (local machine) way
We recommend managing your Python packages using Mambaforge. Alternatively, you can use Anaconda/Miniconda.
Mambaforge
Install Mambaforge by following this link.
Install and activate an stglib environment:
mamba create -n stglib stglib
mamba activate stglib
Now you can start processing data!
Anaconda or Miniconda
Ensure you have a working Anaconda or Miniconda installation.
Set your channel priority to conda-forge:
conda config --add channels conda-forge
conda config --set channel_priority strict
Install and activate an stglib environment:
conda create -n stglib stglib
conda activate stglib
Now you can start processing data!
If you want to contribute to stglib development
Set up Mambaforge or Anaconda as above. Obtain stglib by cloning the GitHub repo. Change to a directory where you’d like stglib to live and type:
git clone https://github.com/USGS-CMG/stglib.git
After cd
ing to the directory containing stglib, type:
conda env create -n stglib --file requirements.yml
This will create a Conda environment with the requirements for stglib installed. Activate the stglib environment by typing:
conda activate stglib
Then type:
pip install -e . --no-deps
This will create an editable stglib installation so you can make changes to the codebase. Get the latest changes to stglib by running git pull
.
When new run scripts are added to stglib (for example, if support for a new instrument has been added), a git pull
will not add them to your path. In this case you also need to re-run the pip install
line above to install any new run scripts.