Skip to content

Commit 23827f1

Browse files
authored
Merge pull request #118 from mbakker7/dev
Release 6.5.0
2 parents 975a074 + 4e98e9c commit 23827f1

60 files changed

Lines changed: 1383 additions & 725 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Migrate code style to black
2-
998b86fc128e35f1506e3d4facb169c558679bde
2+
998b86fc128e35f1506e3d4facb169c558679bde
3+
4+
# Migrate code style to ruff
5+
202b5b65bdfd8fa741f8cff0377469d9cd2797ff

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: [3.8, 3.9, '3.10', '3.11']
19+
python-version: ['3.10', '3.11', '3.12']
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

@@ -30,13 +30,14 @@ jobs:
3030
python -m pip install --upgrade pip
3131
pip install -e .[ci]
3232
33-
- name: Lint with flake8
34-
run: |
35-
# stop the build if there are Python syntax errors or undefined names
36-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=80 --statistics
33+
- name: ruff-lint
34+
uses: chartboost/ruff-action@v1
3935

36+
- name: ruff-format
37+
uses: chartboost/ruff-action@v1
38+
with:
39+
args: "format --check"
40+
4041
- name: Run tests
4142
run: |
4243
py.test ./tests

docs/00tutorials/tutorial0_well_single_layer_aquifer.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"outputs": [],
3131
"source": [
3232
"import numpy as np # import numpy package\n",
33+
"\n",
3334
"import timml as tml # import timml package"
3435
]
3536
},

docs/00tutorials/tutorial1_well_multi_layer_aquifer.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"outputs": [],
4646
"source": [
4747
"import numpy as np\n",
48-
"import matplotlib.pyplot as plt\n",
48+
"\n",
4949
"import timml as tml"
5050
]
5151
},

docs/03examples/BuildingPit.ipynb

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"metadata": {},
1515
"outputs": [],
1616
"source": [
17-
"import numpy as np\n",
1817
"import matplotlib.pyplot as plt\n",
18+
"import numpy as np\n",
19+
"\n",
1920
"import timml as tml"
2021
]
2122
},
@@ -59,8 +60,8 @@
5960
"metadata": {},
6061
"outputs": [],
6162
"source": [
62-
"l = 40.0 # length building pit in m\n",
63-
"b = 30.0 # width building pit in m\n",
63+
"length = 40.0 # length building pit in m\n",
64+
"width = 30.0 # width building pit in m\n",
6465
"\n",
6566
"h_bem = -6.21 # m\n",
6667
"offset = 5.0 # distance groundwater extraction element from sheetpiles in m"
@@ -73,11 +74,11 @@
7374
"outputs": [],
7475
"source": [
7576
"xy = [\n",
76-
" (-l / 2, -b / 2),\n",
77-
" (l / 2, -b / 2),\n",
78-
" (l / 2, b / 2),\n",
79-
" (-l / 2, b / 2),\n",
80-
" (-l / 2, -b / 2),\n",
77+
" (-length / 2, -width / 2),\n",
78+
" (length / 2, -width / 2),\n",
79+
" (length / 2, width / 2),\n",
80+
" (-length / 2, width / 2),\n",
81+
" (-length / 2, -width / 2),\n",
8182
"]"
8283
]
8384
},
@@ -211,28 +212,28 @@
211212
"\n",
212213
"tml.HeadLineSink(\n",
213214
" ml,\n",
214-
" x1=-l / 2 + offset,\n",
215-
" y1=b / 2 - offset,\n",
216-
" x2=l / 2 - offset,\n",
217-
" y2=b / 2 - offset,\n",
215+
" x1=-length / 2 + offset,\n",
216+
" y1=width / 2 - offset,\n",
217+
" x2=length / 2 - offset,\n",
218+
" y2=width / 2 - offset,\n",
218219
" hls=h_bem,\n",
219220
" layers=np.arange(last_lay_dw + 1),\n",
220221
")\n",
221222
"tml.HeadLineSink(\n",
222223
" ml,\n",
223-
" x1=-l / 2 + offset,\n",
224+
" x1=-length / 2 + offset,\n",
224225
" y1=0,\n",
225-
" x2=l / 2 - offset,\n",
226+
" x2=length / 2 - offset,\n",
226227
" y2=0,\n",
227228
" hls=h_bem,\n",
228229
" layers=np.arange(last_lay_dw + 1),\n",
229230
")\n",
230231
"tml.HeadLineSink(\n",
231232
" ml,\n",
232-
" x1=-l / 2 + offset,\n",
233-
" y1=-b / 2 + offset,\n",
234-
" x2=l / 2 - offset,\n",
235-
" y2=-b / 2 + offset,\n",
233+
" x1=-length / 2 + offset,\n",
234+
" y1=-width / 2 + offset,\n",
235+
" x2=length / 2 - offset,\n",
236+
" y2=-width / 2 + offset,\n",
236237
" hls=h_bem,\n",
237238
" layers=np.arange(last_lay_dw + 1),\n",
238239
")\n",
@@ -248,7 +249,7 @@
248249
"\n",
249250
"print(\"\\nDischarge =\", np.round(Qtot.sum(), 2), \"m^3/dag\")\n",
250251
"\n",
251-
"y = np.linspace(-b / 2 - 25, b / 2 + 1100, 201)\n",
252+
"y = np.linspace(-width / 2 - 25, width / 2 + 1100, 201)\n",
252253
"hl = ml.headalongline(np.zeros(201), y, layers=[0])\n",
253254
"y_5cm = np.interp(\n",
254255
" -0.05, ml.headalongline(np.zeros(201), y, layers=0).squeeze(), y, right=np.nan\n",
@@ -298,7 +299,7 @@
298299
"metadata": {},
299300
"outputs": [],
300301
"source": [
301-
"x = np.linspace(0.0, l / 2 + 1100, 201)\n",
302+
"x = np.linspace(0.0, length / 2 + 1100, 201)\n",
302303
"hl = ml.headalongline(x, np.zeros(201), layers=[last_lay_dw, last_lay_dw + 1])"
303304
]
304305
},
@@ -337,7 +338,7 @@
337338
"metadata": {},
338339
"outputs": [],
339340
"source": [
340-
"x = np.linspace(-l / 2 - 25, 0.0, 201)\n",
341+
"x = np.linspace(-length / 2 - 25, 0.0, 201)\n",
341342
"hl = ml.headalongline(x, np.zeros(201), layers=[last_lay_dw, last_lay_dw + 1])"
342343
]
343344
},
@@ -378,7 +379,7 @@
378379
"source": [
379380
"xoffset = 50\n",
380381
"zoffset = 15\n",
381-
"x1, x2, y1, y2 = [-l / 2 - xoffset, 0.0, 0, 0]\n",
382+
"x1, x2, y1, y2 = [-length / 2 - xoffset, 0.0, 0, 0]\n",
382383
"nudge = 1e-6\n",
383384
"n = 301"
384385
]
@@ -581,29 +582,29 @@
581582
"\n",
582583
"tml.HeadLineSink(\n",
583584
" ml,\n",
584-
" x1=-l / 2 + offset,\n",
585-
" y1=b / 2 - offset,\n",
586-
" x2=l / 2 - offset,\n",
587-
" y2=b / 2 - offset,\n",
585+
" x1=-length / 2 + offset,\n",
586+
" y1=width / 2 - offset,\n",
587+
" x2=length / 2 - offset,\n",
588+
" y2=width / 2 - offset,\n",
588589
" hls=h_bem,\n",
589590
" layers=wlayers,\n",
590591
")\n",
591592
"tml.HeadLineSink(\n",
592593
" ml,\n",
593-
" x1=-l / 2 + offset,\n",
594+
" x1=-length / 2 + offset,\n",
594595
" y1=0,\n",
595-
" x2=l / 2 - offset,\n",
596+
" x2=length / 2 - offset,\n",
596597
" y2=0,\n",
597598
" hls=h_bem,\n",
598599
" layers=wlayers,\n",
599600
" order=5,\n",
600601
")\n",
601602
"tml.HeadLineSink(\n",
602603
" ml,\n",
603-
" x1=-l / 2 + offset,\n",
604-
" y1=-b / 2 + offset,\n",
605-
" x2=l / 2 - offset,\n",
606-
" y2=-b / 2 + offset,\n",
604+
" x1=-length / 2 + offset,\n",
605+
" y1=-width / 2 + offset,\n",
606+
" x2=length / 2 - offset,\n",
607+
" y2=-width / 2 + offset,\n",
607608
" hls=h_bem,\n",
608609
" layers=wlayers,\n",
609610
")\n",
@@ -619,7 +620,7 @@
619620
"\n",
620621
"print(\"\\nDischarge =\", np.round(Qtot.sum(), 2), \"m^3/dag\")\n",
621622
"\n",
622-
"y = np.linspace(-b / 2 - 25, b / 2 + 1100, 201)\n",
623+
"y = np.linspace(-width / 2 - 25, width / 2 + 1100, 201)\n",
623624
"hl = ml.headalongline(np.zeros(201), y, layers=[0])\n",
624625
"y_5cm = np.interp(\n",
625626
" -0.05, ml.headalongline(np.zeros(201), y, layers=0).squeeze(), y, right=np.nan\n",
@@ -642,7 +643,7 @@
642643
"metadata": {},
643644
"outputs": [],
644645
"source": [
645-
"x = np.linspace(0.0, l / 2 + 1100, 201)\n",
646+
"x = np.linspace(0.0, length / 2 + 1100, 201)\n",
646647
"hl = ml.headalongline(x, np.zeros(201), layers=[0, last_lay_dw, last_lay_dw + 1])"
647648
]
648649
},
@@ -682,7 +683,7 @@
682683
"metadata": {},
683684
"outputs": [],
684685
"source": [
685-
"x = np.linspace(-l / 2 - 25, 0.0, 201)\n",
686+
"x = np.linspace(-length / 2 - 25, 0.0, 201)\n",
686687
"hl = ml.headalongline(x, np.zeros(201), layers=[0, last_lay_dw, last_lay_dw + 1])"
687688
]
688689
},
@@ -724,7 +725,7 @@
724725
"source": [
725726
"xoffset = 50\n",
726727
"zoffset = 15\n",
727-
"x1, x2, y1, y2 = [-l / 2 - xoffset, 0.0, 0, 0]\n",
728+
"x1, x2, y1, y2 = [-length / 2 - xoffset, 0.0, 0, 0]\n",
728729
"nudge = 1e-6\n",
729730
"n = 301"
730731
]

docs/03examples/circareasink_example.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
16-
"import timml as tml\n",
16+
"import matplotlib.pyplot as plt\n",
1717
"import numpy as np\n",
18-
"import matplotlib.pyplot as plt"
18+
"\n",
19+
"import timml as tml"
1920
]
2021
},
2122
{

docs/03examples/circular_buildingpit.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
" zip(\n",
125125
" shapely.get_coordinates(circle)[:, 0],\n",
126126
" shapely.get_coordinates(circle)[:, 1],\n",
127+
" strict=False,\n",
127128
" )\n",
128129
")[::-1]"
129130
]

docs/03examples/lake_horizontal_well.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
16-
"import timml as tml\n",
17-
"import numpy as np\n",
18-
"import matplotlib.pyplot as plt"
16+
"import timml as tml"
1917
]
2018
},
2119
{

docs/03examples/normal_flux.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
"outputs": [],
2222
"source": [
2323
"# import packages\n",
24+
"import matplotlib.pyplot as plt\n",
2425
"import numpy as np\n",
25-
"import timml as tml\n",
26-
"import matplotlib.pyplot as plt"
26+
"\n",
27+
"import timml as tml"
2728
]
2829
},
2930
{

docs/03examples/test_linesink_discharge.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
16-
"import timml as tml\n",
16+
"import matplotlib.pyplot as plt\n",
1717
"import numpy as np\n",
18-
"import matplotlib.pyplot as plt"
18+
"\n",
19+
"import timml as tml"
1920
]
2021
},
2122
{
@@ -969,7 +970,7 @@
969970
" topthick=2,\n",
970971
" hstar=7,\n",
971972
")\n",
972-
"xy = list(zip(np.linspace(-10, 10, 21), np.zeros(21)))\n",
973+
"xy = list(zip(np.linspace(-10, 10, 21), np.zeros(21), strict=False))\n",
973974
"ls = tml.LineSinkDitchString(\n",
974975
" ml, xy=xy, Qls=100, wh=2, res=5, order=2, layers=np.arange(10, 30, 1)\n",
975976
")\n",

0 commit comments

Comments
 (0)