The PyCSEP tools help earthquake forecast model developers evaluate their forecasts with the goal of understanding earthquake predictability.
PyCSEP should:
- Help modelers become familiar with formats, procedures, and evaluations used in CSEP Testing Centers.
- Provide vetted software for model developers to use in their research.
- Provide quantative and visual tools to assess earthquake forecast quality.
- Promote open-science ideas by ensuring transparency and availability of scientific code and results.
- Curate benchmark models and data sets for modelers to conduct retrospective experiments of their forecasts.
This package must be installed from GitHub until an offical release is made available on PyPI and Conda-Forge. We recommend making a virtual environment to ensure there are no conflicts in dependencies.
This installation will be editable and used for development. This way any changes made to the package will be usable within in the python environment.
-
Clone repository from
git clone https://github.com/SCECcode/pycsep
-
Create environment for installation
- Miniconda (recommended):
conda env create -f requirements.yml
conda activate csep-dev
Note: If you want to go back to your default environment use the command
conda deactivate
.- Virtualenv:
We highly recommend using Conda, because this tools helps to manage binary dependencies on Python pacakages. If you must usevirtaulenv
follow these instructions:
cd pycsep
mkdir venv
cd venv
python3 -m venv csep-dev
source csep-dev/bin/activate
cd ..
Note: If you want to go back to your default environment use the command
deactivate
.Note: There is an issue installing Cartopy on MacOS with Proj >=6.0.0 and will be addressed in 0.18 release of Cartopy. If this package is needed please manually install or use Conda instructions above. Additionally, if you choose the manual build, you might need to resolve build issues as they arise. This is usually caused by not having the proper python statics installed to build the binary packages or poorly written setup.py scripts from other packages.
Also python 3.7 is required.
- Miniconda (recommended):
-
Navigate to repo
cd pycsep
(If you are not already there...) -
Install package
pip install .
You can verify the installation works by opening a python interpreter and typing import csep
. If you see
no errors the installation worked.
Additionally, you can run the test suite by navigating to the project root directory and running ./run_tests.sh
.
The test suite requires a properly configured environment to run correctly. For the tests to run properly you need
to install using conda (1) or install with pip install .[test]
.
With this editable installation you can freely edit the package and have the changes propagate to the python installation.
If you need to install this package on a Linux system we recommend to use a Ubuntu Linux v18.04 LTS based system. The prerequsites for using this package by venv are the linux packages:
build-essential
python3-dev
python3-venv
python3-pip