Installation

This part of the documentation covers the installation of GEOLib. The first step to using any software package is getting it properly installed.

GEOLib installation

GEOLib releases are available from PyPI:

$ pip install d-geolib

To install the latest GEOLib simply the following command:

$ pip install git+git@github.com:Deltares/GEOLib.git

Note that both locations are private and require authentication.

GEOLib service

If you also want to host your own calculation service, you should also install some extra packages:

$ pip install 'geolib-0.1.0-py3-none-any.whl[server]'

Packages used

This package, unlike GEOLib+, tries to limit the number of heavy depedencies. The main packages used are:

  • Pixi for package and dependency management (local development).

  • Pydantic for validation of types and some parameters (min/max/defaults).

You don’t need to install anything manually, as the Pixi installation should take care of it.

Available Environments

GEOLib provides several Pixi environments for different use cases:

  • default - Base environment with core dependencies only

  • test - Testing environment with pytest and coverage tools

  • dev - Complete development environment (includes dev tools, docs, and test utilities)

  • server - Server environment with FastAPI and Uvicorn

  • docs - Documentation building environment with Sphinx

To activate a specific environment:

$ pixi shell -e dev      # Activate full development environment
$ pixi shell -e test     # Activate testing environment
$ pixi shell -e server   # Activate server environment
$ pixi shell -e docs     # Activate documentation environment

Get the Source Code

GEOLib is actively developed on Github, where the code is always available.

You can either clone the public repository:

$ git clone git@github.com:Deltares/GEOLib.git

Once you have a copy of the source, you can set up a development environment using Pixi:

$ cd geolib
$ pixi install

For development, you can then run commands with:

$ pixi run pytest          # Run tests
$ pixi run mypy geolib     # Type checking
$ pixi run sphinx ...      # Build documentation