GeoProfile 0.4.0
A Python library for visualizing geotechnical profiles.
Requires Python: >=3.11
Keywords: visualizing

# GeoProfile

[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

Explore the depths of the Earth with GeoProfile, a comprehensive package designed for geotechnical professionals and
researchers. This versatile toolkit is your go-to resource for analyzing and visualizing geotechnical profiles, offering
a seamless experience in understanding the complex stratigraphy of the subsurface.

Whether you are involved in civil engineering, environmental science, or geotechnical exploration, GeoProfile is your
indispensable companion for unraveling the mysteries beneath the surface. Elevate your geotechnical analysis and make
informed decisions with GeoProfile – where geology meets technology.

# Installation

To install this package, including the `map` and `gef` reading functionality, run:

```bash
pip install geoprofile[map, gef]
```

To skip the installation of the `GeoProfile` library, in case you do not need it (e.g. only use pure plotting), run:

```bash
pip install geoprofile
```

# Contribution

## Environment

We recommend developing in Python3.13 with a clean virtual environment (using `virtualenv` or `conda`), installing the
requirements from the requirements.txt file:

Example using `virtualenv` and `pip` to install the dependencies in a new environment .env on Linux:

```bash
python -m venv .env
source .env/bin/activate
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -e .
```

Example using `conda`and `pip` to install the dependencies in a new environment env on Windows, using Anaconda Prompt.
First you clone the GeoProfile repository to a local folder (c:\my_python_files\geoprofile) and change directory towards
it. You will create an empty conda environment with python 3.13 and activate it. Python 3.13 is given in
`requirements.txt`. The name of the environment is not `env`, as in Linux example above, because the name `env` has a
special property in conda. You will update pip. Install dependencies.

Last line is optional. Installation of `ipykernel` allows to run a notebook in this environment.

```bash
git clone https://github.com/cemsbv/GeoProfile.git c:\my_python_files\geoprofile
cd c:\my_python_files\geoprofile
conda create --name env_geoprofile --no-default-packages python=3.13
conda activate env_geoprofile
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -e .
conda install ipykernel
```

## Documentation

Build the docs:

```bash
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install .
sphinx-build -b html docs public
```

Note: You'll need to set the `NUCLEI_TOKEN` environmental variable.
You can get your token at: `https://nuclei.cemsbv.io/`

## Format & Lint

To maintain code quality we use the GitHub super-linter.

To run the linters locally, run the `run_super_linters.sh` bash script from the root directory.

## UnitTest

Test the software with the use of coverage:

```bash
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -e .
coverage run -m pytest
```

## Requirements

Requirements are autogenerated by `pip-compile` with python 3.13

```bash
uv pip compile --extra=test --extra=docs --extra=map --extra=gef --extra=notebook --extra=plot --output-file=requirements.txt pyproject.toml
```

To update the requirements within the defined ranges, run:

```bash
uv pip compile --upgrade --extra=test --extra=docs --extra=map --extra=gef --extra=notebook --extra=plot --output-file=requirements.txt pyproject.toml
```