Skip to content

Commit 3e67c4d

Browse files
authored
Merge pull request #13 from GeoStat-Framework/add_integral_model
Add integral model solutions
2 parents f13e5ce + 42a49a6 commit 3e67c4d

39 files changed

+1443
-250
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,33 @@ on:
1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
1414

15-
env:
16-
# needed by coveralls
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
1915
jobs:
2016
source_check:
2117
name: source check
2218
runs-on: ubuntu-latest
23-
strategy:
24-
fail-fast: false
2519

2620
steps:
27-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2822

29-
- name: Set up Python 3.9
30-
uses: actions/setup-python@v2
23+
- name: Set up Python 3.11
24+
uses: actions/setup-python@v5
3125
with:
32-
python-version: 3.9
26+
python-version: 3.11
3327

3428
- name: Install dependencies
3529
run: |
3630
python -m pip install --upgrade pip
37-
pip install --editable .[check]
31+
pip install --editable .[check,test]
32+
pip install "coveralls>=3.0.0"
3833
3934
- name: black check
4035
run: |
4136
python -m black --check --diff --color .
4237
38+
- name: black preview
39+
run: |
40+
python -m black --preview --diff --color .
41+
4342
- name: isort check
4443
run: |
4544
python -m isort --check --diff --color .
@@ -48,53 +47,60 @@ jobs:
4847
run: |
4948
python -m pylint src/anaflow/
5049
50+
- name: coveralls check
51+
run: |
52+
python -m pytest --cov anaflow --cov-report term-missing -v tests/
53+
python -m coveralls --service=github
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
5157
build_sdist:
5258
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
5359
runs-on: ${{ matrix.os }}
5460
strategy:
5561
fail-fast: false
5662
matrix:
57-
os: [ubuntu-latest, windows-latest, macos-latest]
58-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
63+
os: [ubuntu-latest, windows-latest, macos-13]
64+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
5965

6066
steps:
61-
- uses: actions/checkout@v2
67+
- uses: actions/checkout@v4
6268
with:
6369
fetch-depth: '0'
6470

6571
- name: Set up Python ${{ matrix.python-version }}
66-
uses: actions/setup-python@v2
72+
uses: actions/setup-python@v5
6773
with:
6874
python-version: ${{ matrix.python-version }}
6975

7076
- name: Install dependencies
7177
run: |
7278
python -m pip install --upgrade pip
73-
pip install build coveralls>=3.0.0
79+
pip install build
7480
pip install --editable .[test]
7581
7682
- name: Run tests
7783
run: |
7884
python -m pytest --cov anaflow --cov-report term-missing -v tests/
79-
python -m coveralls --service=github
8085
8186
- name: Build sdist
8287
run: |
8388
python -m build
8489
85-
- uses: actions/upload-artifact@v2
86-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
90+
- uses: actions/upload-artifact@v4
91+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
8792
with:
88-
path: dist
93+
name: dist
94+
path: dist/*
8995

9096
upload_to_pypi:
9197
needs: [build_sdist]
9298
runs-on: ubuntu-latest
9399

94100
steps:
95-
- uses: actions/download-artifact@v2
101+
- uses: actions/download-artifact@v4
96102
with:
97-
name: artifact
103+
name: dist
98104
path: dist
99105

100106
- name: Publish to Test PyPI

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ instance/
6363

6464
# Sphinx documentation
6565
docs/_build/
66+
docs/source/sg_execution_times.rst
6667

6768
# PyBuilder
6869
target/

.readthedocs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
version: 2
22

3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
38
sphinx:
49
configuration: docs/source/conf.py
510

6-
formats: all
11+
formats: [pdf]
712

813
python:
9-
version: 3.7
1014
install:
1115
- method: pip
1216
path: .

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All notable changes to **AnaFlow** will be documented in this file.
44

5+
## [1.2.0] - 2025-05
6+
7+
See [#12](https://github.com/GeoStat-Framework/AnaFlow/pull/12)
8+
9+
### Enhancements
10+
- added solutions based on the effective transmissivity for the ["Integral" variogram model](https://geostat-framework.readthedocs.io/projects/gstools/en/v1.7.0/api/gstools.covmodel.Integral.html):
11+
- `ext_thiem_int`: steady state solution
12+
- `ext_thiem_int_3d`: steady state solution incorporating vertical anisotropy
13+
- `ext_theis_int`: transient solution
14+
- `ext_theis_int_3d`: transient solution incorporating vertical anisotropy
15+
- added `fix_T_well` and `fix_K_well` bool flag to transient heterogeneous solutions to be able to set if the well value for the effective transmissivity/conductivity should be determined from the limit (`True`) or from the upscaled value in the first ring segment (`False`, default)
16+
- **breaking**: the previous behavior was effectively this set to `True`, which for steep effective curves resulted in an increasing error in the effective head near the well
17+
18+
### Changes
19+
- updated docs (use myst parser for markdown files, only generate html and pdf)
20+
- updated CI (fixed artifacts up-/download action, see #14)
21+
- use hatchling as build backend
22+
523

624
## [1.1.0] - 2023-04
725

@@ -88,6 +106,7 @@ Containing:
88106
- lap_transgwflow_cyl - Solution for a diskmodel in laplace inversion
89107

90108

109+
[1.2.0]: https://github.com/GeoStat-Framework/AnaFlow/compare/v1.1.0...v1.2.0
91110
[1.1.0]: https://github.com/GeoStat-Framework/AnaFlow/compare/v1.0.1...v1.1.0
92111
[1.0.1]: https://github.com/GeoStat-Framework/AnaFlow/compare/v1.0.0...v1.0.1
93112
[1.0.0]: https://github.com/GeoStat-Framework/AnaFlow/compare/v0.4.0...v1.0.0

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/source/changelog.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../../CHANGELOG.md
1+
.. include:: ../../CHANGELOG.md
2+
:parser: myst_parser.docutils_

docs/source/conf.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setup(app):
5555
"sphinx.ext.napoleon", # parameters look better than with numpydoc only
5656
"numpydoc",
5757
"sphinx_gallery.gen_gallery",
58-
"m2r2",
58+
"myst_parser",
5959
]
6060

6161
# autosummaries from source-files
@@ -87,8 +87,12 @@ def setup(app):
8787

8888
# The suffix(es) of source filenames.
8989
# You can specify multiple suffix as a list of string:
90+
source_suffix = {
91+
".rst": "restructuredtext",
92+
".md": "markdown",
93+
}
9094
# source_suffix = ['.rst', '.md']
91-
source_suffix = ".rst"
95+
# source_suffix = ".rst"
9296

9397
# The master toctree document.
9498
# --> this is the sitemap (or content-list in latex -> needs a heading)
@@ -141,7 +145,7 @@ def setup(app):
141145
# 'canonical_url': '',
142146
# 'analytics_id': '',
143147
"logo_only": False,
144-
"display_version": True,
148+
"version_selector": True,
145149
"prev_next_buttons_location": "top",
146150
# 'style_external_links': False,
147151
# 'vcs_pageview_mode': '',
@@ -267,7 +271,7 @@ def setup(app):
267271
# Remove the "Download all examples" button from the top level gallery
268272
"download_all_examples": False,
269273
# Sort gallery example by file name instead of number of lines (default)
270-
"within_subsection_order": FileNameSortKey,
274+
"within_subsection_order": "FileNameSortKey",
271275
# directory where function granular galleries are stored
272276
"backreferences_dir": None,
273277
# Modules for which function level galleries are created. In

examples/01_call_theis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
88
Reference: `Theis 1935 <https://doi.org/10.1029/TR016i002p00519>`__
99
"""
10+
1011
import numpy as np
1112
from matplotlib import pyplot as plt
1213

examples/02_call_ext_theis2d.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
Reference: `Zech et. al. 2016 <http://dx.doi.org/10.1002/2015WR018509>`__
1414
"""
15+
1516
import numpy as np
1617
from matplotlib import pyplot as plt
1718

@@ -51,12 +52,8 @@
5152
label_TG = "Theis($T_G$)" if i == 0 else None
5253
label_TH = "Theis($T_H$)" if i == 0 else None
5354
label_ef = "extended Theis" if i == 0 else None
54-
plt.plot(
55-
rad, head_TG[i], label=label_TG, color="C" + str(i), linestyle="--"
56-
)
57-
plt.plot(
58-
rad, head_TH[i], label=label_TH, color="C" + str(i), linestyle=":"
59-
)
55+
plt.plot(rad, head_TG[i], label=label_TG, color="C" + str(i), linestyle="--")
56+
plt.plot(rad, head_TH[i], label=label_TH, color="C" + str(i), linestyle=":")
6057
plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i))
6158
time_ticks.append(head_ef[i][-1])
6259

examples/03_call_ext_theis3d.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
1515
Reference: `Müller 2015 <http://dx.doi.org/10.13140/RG.2.2.34074.24002>`__
1616
"""
17+
1718
import numpy as np
1819
from matplotlib import pyplot as plt
1920

@@ -59,12 +60,8 @@
5960
label_TG = "Theis($K_{efu}$)" if i == 0 else None
6061
label_TH = "Theis($K_H$)" if i == 0 else None
6162
label_ef = "extended Theis 3D" if i == 0 else None
62-
plt.plot(
63-
rad, head_Kefu[i], label=label_TG, color="C" + str(i), linestyle="--"
64-
)
65-
plt.plot(
66-
rad, head_KH[i], label=label_TH, color="C" + str(i), linestyle=":"
67-
)
63+
plt.plot(rad, head_Kefu[i], label=label_TG, color="C" + str(i), linestyle="--")
64+
plt.plot(rad, head_KH[i], label=label_TH, color="C" + str(i), linestyle=":")
6865
plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i))
6966
time_ticks.append(head_ef[i][-1])
7067

0 commit comments

Comments
 (0)