Skip to content

Installation Guide for cheersafe package#

This guide will help you install the cheersafe package on your system.

Prerequisites#

Ensure that you have Python and pip installed on your system. You can check this by running the following commands in your terminal:

python --version
pip --version

If you do not have Python or pip installed, please install them first.

Installation Steps#

  1. Clone the cheersafe repository to your local machine:
git clone https://github.com/CHEER-Hub/CHEERSafe.git
  1. Navigate to the cloned repository:
cd CHEERSafe
  1. Install the package using pip:
pip install .

Geospatial Dependencies#

The exposure and loss-estimation modules read GeoParquet, shapefile and GeoPackage layers through geopandas, shapely and pyarrow. They are core dependencies, so pip install . installs them. On platforms without binary wheels, install them from conda-forge first and then run pip install .:

conda install -c conda-forge geopandas shapely pyarrow
pip install .

Verify with:

python -c "import geopandas, shapely, pyarrow; print(geopandas.__version__)"

Optional Dependencies#

The package comes with optional dependencies for development and documentation:

Development Dependencies#

To install development tools (pytest, pytest-cov, tox):

pip install .[dev]

Documentation Dependencies#

To install documentation tools (mkdocs and related packages):

pip install .[docs]

Jupyter Dependencies#

To install Jupyter kernel support:

pip install .[jupyter]

Install All Optional Dependencies#

To install all optional dependencies at once:

pip install .[dev,docs,jupyter]

That's it! You have successfully installed the cheersafe package on your system.