Skip to content

Commit

Permalink
Merge pull request #318 from cgre-aachen/dev_gemgis2
Browse files Browse the repository at this point in the history
Updating tests and enhance coverage
  • Loading branch information
AlexanderJuestel authored Dec 14, 2023
2 parents f982be3 + 45f7680 commit 64ead99
Show file tree
Hide file tree
Showing 18 changed files with 438 additions and 1,054 deletions.
86 changes: 47 additions & 39 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
name: GemGIS CI

on:
push:
branches: [ main, dev_aj, dev_alex ]

pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

name: Pytest
on: [push]
jobs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
testing:
name: Testing
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.10'
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: gemgis_testing
environment-file: environment.yml
python-version: 3.9
channels: conda-forge
- name: List dependencies
run: |
conda list pygeos
conda list geopandas
conda list rasterio
conda list pyvista
conda list gemgis
- name: Install dependencies
run: |
pip install -r requirements_optional.txt
- name: Run tests with pytest
run: |
pytest
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install owslib geopy gempy==2.3.1 xmltodict pypdf mplstereonet scikit-image scipy rioxarray tqdm
- name: Debug
run: |
ls -R # List all files and directories recursively
pwd # Print the current working directory
- name: Generate coverage report
working-directory: ./tests
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Debug
run: |
ls -R # List all files and directories recursively
pwd # Print the current working directory
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
#coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: coverage.xml
#,./coverage2.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
[![DOI](https://joss.theoj.org/papers/10.21105/joss.03709/status.svg)](https://doi.org/10.21105/joss.03709)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6511767.svg)](https://doi.org/10.5281/zenodo.6511767)
[![DOI](https://img.shields.io/badge/DOI-https%3A%2F%2Fdoi.org%2F10.5194%2Fegusphere--egu21--4613-blue)](https://doi.org/10.5194/egusphere-egu21-4613)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/GemGIS)


<p align="center"><img src="https://raw.githubusercontent.com/cgre-aachen/gemgis/main/docs/getting_started/images/task1.png" width="200"><img src="https://raw.githubusercontent.com/cgre-aachen/gemgis/main/docs/getting_started/images/model1.png" width="300"></p>

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"id": "9a8518ee",
"metadata": {},
"source": [
"# Defining well and well log values\n",
"## Defining well and well log values\n",
"\n",
"First, we define an arbitrary well path using three points as NumPy Array. The measured depths (`dist`) and and some random values are defined as 1D NumPy arrays. "
]
Expand Down Expand Up @@ -258,7 +258,7 @@
"id": "ae3c83df",
"metadata": {},
"source": [
"# Interpolate/Resample between points\n",
"## Interpolate/Resample between points\n",
"\n",
"The second step is to resample linearly between each provided well path point. A spacing of 5 cm between each point is chosen by default. "
]
Expand Down Expand Up @@ -426,7 +426,7 @@
"id": "4608fa6c",
"metadata": {},
"source": [
"# Create Polyline from well path coordinates\n",
"## Create Polyline from well path coordinates\n",
"\n",
"Then, we create a polyline of the original well path for visualization purposes. "
]
Expand Down Expand Up @@ -479,7 +479,7 @@
"id": "fec8f8a7",
"metadata": {},
"source": [
"# Creating Spline from resampled well path coordinates\n",
"## Creating Spline from resampled well path coordinates\n",
"\n",
"Now, we are creating spline of the resampled points. This automatically calculates the `arc_length` which will be utilized in the next step. "
]
Expand Down Expand Up @@ -539,7 +539,7 @@
"id": "2efa0148",
"metadata": {},
"source": [
"# Getting the Points along the resampled Spline\n",
"## Getting the Points along the resampled Spline\n",
"\n",
"The main step is to assign a resampled value to a measured value using `get_points_along_spline`. "
]
Expand Down Expand Up @@ -680,7 +680,7 @@
"id": "22425c69",
"metadata": {},
"source": [
"# Creating Polyline from Points, assigning values and creating Tube\n",
"## Creating Polyline from Points, assigning values and creating Tube\n",
"\n",
"Once we have extracted the points, we again create a PolyLine from it. We then assign the measured well log values as data array to the newly created PolyLine and create a tube from it using the `values` to define the radius of the tube. The `radius_factor` is a scaling factor that needs to changed according to the length of the well. "
]
Expand Down Expand Up @@ -743,7 +743,7 @@
"id": "45f3f992",
"metadata": {},
"source": [
"# Combined Function"
"## Combined Function"
]
},
{
Expand Down Expand Up @@ -802,7 +802,7 @@
"id": "51451276",
"metadata": {},
"source": [
"# Plotting the result"
"## Plotting the result"
]
},
{
Expand Down Expand Up @@ -867,7 +867,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.15"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 64ead99

Please sign in to comment.