Skip to content

Commit b80d8bb

Browse files
authored
Merge pull request #350 from GeoStat-Framework/prepare_1.5.2
perpare v1.5.2
2 parents fd05229 + 8ad73c7 commit b80d8bb

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,21 @@ jobs:
5353
cython-lint src/gstools/
5454
5555
build_wheels:
56-
name: wheels for ${{ matrix.cfg.os }} / ${{ matrix.cfg.arch }}
57-
runs-on: ${{ matrix.cfg.os }}
56+
name: wheels for ${{ matrix.os }}
57+
runs-on: ${{ matrix.os }}
5858
strategy:
5959
fail-fast: false
6060
matrix:
61-
cfg:
62-
- { os: ubuntu-latest, arch: x86_64 }
63-
- { os: windows-latest, arch: AMD64 }
64-
- { os: macos-latest, arch: x86_64 }
65-
- { os: macos-latest, arch: arm64 }
66-
- { os: macos-latest, arch: universal2 }
61+
# macos-13 is an intel runner, macos-14 is apple silicon
62+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
6763

6864
steps:
6965
- uses: actions/checkout@v4
7066
with:
7167
fetch-depth: '0'
7268

7369
- name: Build wheels
74-
uses: pypa/[email protected]
75-
env:
76-
CIBW_ARCHS: ${{ matrix.cfg.arch }}
70+
uses: pypa/[email protected]
7771
with:
7872
output-dir: dist
7973

@@ -87,7 +81,7 @@ jobs:
8781
strategy:
8882
fail-fast: false
8983
matrix:
90-
os: [ubuntu-latest, windows-latest, macos-latest]
84+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
9185
# https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg
9286
ver:
9387
- {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
@@ -96,6 +90,13 @@ jobs:
9690
- {py: '3.11', np: '==1.23.2', sp: '==1.9.2'}
9791
- {py: '3.12', np: '==1.26.2', sp: '==1.11.2'}
9892
- {py: '3.12', np: '>=2.0.0rc1', sp: '>=1.13.0'}
93+
exclude:
94+
- os: macos-14
95+
ver: {py: '3.8', np: '==1.20.0', sp: '==1.5.4'}
96+
- os: macos-14
97+
ver: {py: '3.9', np: '==1.20.0', sp: '==1.5.4'}
98+
- os: macos-14
99+
ver: {py: '3.10', np: '==1.21.6', sp: '==1.7.2'}
99100
steps:
100101
- uses: actions/checkout@v4
101102
with:

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22

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

5-
## [Unreleased] - ?
5+
## [1.5.2] - Nifty Neon - 2024-05
66

77
### Enhancements
88

99
- added global variable `config.NUM_THREADS` to select number of threads for parallel computation ([#336](https://github.com/GeoStat-Framework/GSTools/pull/336))
10+
- speed up sampling with emcee by setting `vectorize=True` in `EnsembleSampler` ([#346](https://github.com/GeoStat-Framework/GSTools/pull/346))
1011
- prepare numpy 2 support ([#340](https://github.com/GeoStat-Framework/GSTools/pull/340))
11-
- numpy 2.0.0rc1 for building extensions (for Python 3.9 and above)
12+
- at least numpy 2.0.0rc1 for building extensions (for Python 3.9 and above)
1213
- check multiple numpy and scipy versions in CI
1314
- fixed minimal versions for numpy
1415
- use `np.asarray` everywhere with `np.atleast_(n)d`
1516
- fix long/longlong integer issue in cython on windows by always using 64bit integers
1617

1718
### Bugfixes
1819
- build docs with latest sphinx version ([#340](https://github.com/GeoStat-Framework/GSTools/pull/340))
20+
- fixed zero division error in spectral density of Integral model ([#347](https://github.com/GeoStat-Framework/GSTools/pull/347))
21+
- minor pylint fixes for used-before-assignment issues ([#350](https://github.com/GeoStat-Framework/GSTools/pull/350))
1922

2023
### Changes
2124
- require pyvista 0.40 at least ([#340](https://github.com/GeoStat-Framework/GSTools/pull/340))
25+
- require matplotlib 3.7 at least ([#350](https://github.com/GeoStat-Framework/GSTools/pull/350))
26+
- remove universal2 wheels for macos (we already provide separate intel and arm64 wheels) ([#350](https://github.com/GeoStat-Framework/GSTools/pull/350))
2227

2328

2429
## [1.5.1] - Nifty Neon - 2023-11
@@ -435,7 +440,8 @@ See: [#197](https://github.com/GeoStat-Framework/GSTools/issues/197)
435440
First release of GSTools.
436441

437442

438-
[Unreleased]: https://github.com/GeoStat-Framework/gstools/compare/v1.5.1...HEAD
443+
[Unreleased]: https://github.com/GeoStat-Framework/gstools/compare/v1.5.2...HEAD
444+
[1.5.2]: https://github.com/GeoStat-Framework/gstools/compare/v1.5.1...v1.5.2
439445
[1.5.1]: https://github.com/GeoStat-Framework/gstools/compare/v1.5.0...v1.5.1
440446
[1.5.0]: https://github.com/GeoStat-Framework/gstools/compare/v1.4.1...v1.5.0
441447
[1.4.1]: https://github.com/GeoStat-Framework/gstools/compare/v1.4.0...v1.4.1

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies = [
5757
[project.optional-dependencies]
5858
doc = [
5959
"m2r2>=0.2.8",
60-
"matplotlib>=3",
60+
"matplotlib>=3.7",
6161
"meshzoo>=0.7",
6262
"numpydoc>=1.1",
6363
"pykrige>=1.5,<2",
@@ -68,7 +68,7 @@ doc = [
6868
"sphinxcontrib-youtube>=1.1",
6969
]
7070
plotting = [
71-
"matplotlib>=3",
71+
"matplotlib>=3.7",
7272
"pyvista>=0.40",
7373
]
7474
rust = ["gstools_core>=0.2.0,<1"]
@@ -166,5 +166,3 @@ skip = ["cp36-*", "cp37-*", "pp*", "*-win32", "*-manylinux_i686", "*-musllinux_*
166166
# Run the package tests using `pytest`
167167
test-extras = "test"
168168
test-command = "pytest -v {package}/tests"
169-
# Skip trying to test arm64 builds on Intel Macs
170-
test-skip = "*-macosx_arm64 *-macosx_universal2:arm64"

src/gstools/covmodel/fit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def fit_variogram(
214214
def _pre_para(model, para_select, sill, anis):
215215
"""Preprocess selected parameters."""
216216
var_last = False
217+
var_tmp = 0.0 # init value
217218
for par in para_select:
218219
if par not in model.arg_bounds:
219220
raise ValueError(f"fit: unknown parameter in selection: {par}")
@@ -464,6 +465,7 @@ def _post_fitting(model, para, popt, anis, is_dir_vario):
464465
fit_para = {}
465466
para_skip = 0
466467
opt_skip = 0
468+
var_tmp = 0.0 # init value
467469
for par in DEFAULT_PARA:
468470
if para[par]:
469471
if par == "var": # set variance last

src/gstools/field/plot.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
plot_vec_field
1111
"""
1212

13-
# pylint: disable=C0103, W0613, E1101
13+
# pylint: disable=C0103, W0613, E1101, E0606
1414
import numpy as np
1515
from scipy import interpolate as inter
1616
from scipy.spatial import ConvexHull
@@ -232,13 +232,6 @@ def plot_nd(
232232
)
233233
rax.set_title(" Plane", loc="left")
234234
radio = RadioButtons(rax, plane_names, activecolor="grey")
235-
# make radio buttons circular
236-
rpos = rax.get_position().get_points()
237-
fh, fw = fig.get_figheight(), fig.get_figwidth()
238-
rscale = (rpos[:, 1].ptp() / rpos[:, 0].ptp()) * (fh / fw)
239-
for circ in radio.circles:
240-
circ.set_radius(0.06)
241-
circ.height /= rscale
242235
elif mesh_type == "unstructured" and convex_hull:
243236
# show convex hull in 2D
244237
hull = ConvexHull(pos.T)
@@ -291,6 +284,7 @@ def update_plane(label):
291284
s.vline.set_data(2 * [s.valinit], [-0.1, 1.1])
292285
s.reset()
293286
im.set_extent(ax_extents[p])
287+
asp = 1.0 # init value
294288
if aspect == "quad":
295289
asp = ax_rngs[planes[p][0]] / ax_rngs[planes[p][1]]
296290
if aspect is not None:

src/gstools/krige/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ def _get_krige_vecs(
337337
# determine the chunk size
338338
chunk_size = len(pos[0]) if chunk_slice[1] is None else chunk_slice[1]
339339
chunk_size -= chunk_slice[0]
340+
chunk_pos = None # init value
340341
res = np.empty((self.krige_size, chunk_size), dtype=np.double)
341342
if only_mean:
342343
# set points to limit of the covariance to only get the mean

src/gstools/transform/field.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ def binary(
262262
"""
263263
if not process and divide is None:
264264
_check_for_default_normal(fld)
265-
if divide is None:
266-
mean = 0.0 if process and not keep_mean else fld.mean
265+
mean = 0.0 if process and not keep_mean else fld.mean
267266
divide = mean if divide is None else divide
268267
upper = mean + np.sqrt(fld.model.sill) if upper is None else upper
269268
lower = mean - np.sqrt(fld.model.sill) if lower is None else lower

0 commit comments

Comments
 (0)