Skip to content

Commit 47924c7

Browse files
committed
Merge branch 'rel-0.3.0'
2 parents 0a39e59 + c6d16be commit 47924c7

Some content is hidden

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

70 files changed

+17404
-128080
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build wheels
22

33
on:
4+
schedule:
5+
- cron: '42 8 2-30/2 * *' # At 08:42 UTC on every 2nd day-of-month
46
pull_request:
57
paths: # only run this with PRs that touch these files
68
- ".github/workflows/release.yml"
@@ -31,9 +33,9 @@ jobs:
3133
arch: aarch64
3234
- os: windows-2022
3335
arch: AMD64
34-
- os: macos-11
36+
- os: macos-13
3537
arch: x86_64
36-
macosx_deployment_target: "11.0"
38+
macosx_deployment_target: "13.0"
3739
cmake_osx_architectures: x86_64
3840
- os: macos-14
3941
arch: arm64
@@ -66,14 +68,11 @@ jobs:
6668
shell: msys2 {0}
6769
env:
6870
LDFLAGS: -static-libgcc -static-libgfortran -static-libquadmath -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive
69-
run: |
70-
bash scripts/build_lib.sh
71+
run: bash scripts/build_lib.sh
7172

7273
- name: Build wheels
73-
uses: pypa/cibuildwheel@v2.18.0
74+
uses: pypa/cibuildwheel@v2.22.0
7475
env:
75-
CIBW_BUILD: "cp39-*" # pick one version
76-
CIBW_SKIP: "*-musllinux*"
7776
CIBW_ARCHS: ${{ matrix.arch }}
7877
CIBW_ENVIRONMENT_MACOS:
7978
FC=gfortran-13

.github/workflows/tests.yml

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
name: Tests
22

3-
on:
3+
on:
44
schedule:
55
- cron: '42 8 2-30/2 * *' # At 08:42 UTC on every 2nd day-of-month
66
push:
77
pull_request:
8+
workflow_dispatch:
89

910
jobs:
1011
tests:
11-
name: Run tests on ${{ matrix.os }} Py${{ matrix.python }}
12+
name: Tests on ${{ matrix.os }} Python-${{ matrix.python-version }}
1213
runs-on: ${{ matrix.os }}
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
os: [ubuntu-latest, macos-12, windows-latest]
17-
python-version: ["3.8", "3.11"] # run lower and upper versions
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
python-version: ["3.9", "3.13"] # run lower and upper versions
1819

1920
steps:
2021
- uses: actions/checkout@v4
2122

2223
- name: Setup Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v5
24+
uses: astral-sh/setup-uv@v5
2425
with:
2526
python-version: ${{ matrix.python-version }}
2627

27-
- name: Update pip
28-
run: |
29-
python -m pip install --upgrade pip
30-
3128
- name: Install MinGW-w64 tools (Windows)
3229
if: runner.os == 'Windows'
3330
uses: msys2/setup-msys2@v2
@@ -42,48 +39,29 @@ jobs:
4239
4340
- name: Install GCC Fortran (macOS)
4441
if: runner.os == 'macOS'
45-
uses: awvwgk/setup-fortran@main
42+
uses: fortran-lang/setup-fortran@v1
4643
with:
4744
compiler: gcc
48-
version: 11
49-
50-
- name: Install build dependencies (macOS)
51-
if: runner.os == 'macOS'
52-
run: |
53-
pip install meson ninja pandas numpy matplotlib pyemu flopy jupyter notebook nbconvert
54-
55-
- name: Install build dependencies (macOS)
56-
if: runner.os == 'Windows'
57-
run: |
58-
pip install meson ninja pandas numpy matplotlib pyemu flopy jupyter notebook nbconvert
59-
45+
version: 13
6046

61-
- name: Install build dependencies (Linux)
62-
if: runner.os == 'Linux'
63-
run: |
64-
sudo apt-get update
65-
sudo apt-get install -y gfortran
66-
pip install meson ninja pandas numpy matplotlib pyemu flopy jupyter notebook nbconvert
47+
- name: Install build requirements
48+
run: uv pip install meson ninja
6749

6850
- name: Build pestutils (Windows)
6951
if: runner.os == 'Windows'
7052
shell: msys2 {0}
7153
env:
7254
LDFLAGS: -static-libgcc -static-libgfortran -static-libquadmath -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive
73-
run: |
74-
bash scripts/build_lib.sh
55+
run: bash scripts/build_lib.sh
7556

7657
- name: Build pestutils (non-Windows)
7758
if: runner.os != 'Windows'
78-
run: |
79-
bash scripts/build_lib.sh
59+
run: bash scripts/build_lib.sh
8060

81-
- name: Install package
82-
run: |
83-
pip install .[test,optional]
61+
- name: Install package and all extras
62+
run: uv sync --all-extras
8463

8564
- name: Run tests
86-
run: |
87-
pytest -v
65+
run: uv run pytest -v
8866
env:
8967
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# General
2+
.DS_Store
3+
*.swp
4+
*.*~
5+
~$*
6+
7+
# Modflow outputs
8+
*.lst
9+
*.list
10+
*.grb
11+
*.cbc
12+
*.cbb
13+
*.bud
14+
*.hds
15+
*.hed
16+
*.ucn
17+
*.out
18+
*.out.csv
19+
120
# Byte-compiled / optimized
221
__pycache__/
322
*.py[cod]
@@ -9,6 +28,7 @@ __pycache__/
928
*.o
1029
*.obj
1130
*.so
31+
*.lib
1232

1333
# Local installation and misc. dirs
1434
inst/

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
exclude: \.grb$
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v5.0.0
7+
hooks:
8+
- id: check-yaml
9+
- repo: https://github.com/astral-sh/ruff-pre-commit
10+
rev: v0.9.3
11+
hooks:
12+
# Run the linter.
13+
- id: ruff
14+
args: [ --fix ]
15+
# Run the formatter.
16+
- id: ruff-format

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
### Added
9+
### Changed
10+
### Fixed
11+
12+
## [0.3.0] - 2025-02-12
13+
### Changed
14+
- Set minimum Python 3.9 (#36)
15+
- Updated cibuildwheel workflow, build macos arm64 wheels from GHA (#30, #32)
16+
- Fix finder.load() for conda and LD path search
17+
- Fix typos (#37)
18+
- Use ruff format, apply ruff check rules, add pre-commit (#38, #45)
19+
20+
### Fixed
21+
- Fix in `mod2obs_mf6` with different depvar names (#33)
22+
723
## [0.2.1] - 2024-01-23
824
### Fixed
925
- Fix AttributeError: 'DataFrame' object has no attribute 'site' (#21)
@@ -25,6 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2541
### Added
2642
- Initial pre-alpha release
2743

44+
[Unreleased]: https://github.com/pypest/pypestutils/compare/v0.3.0...develop
45+
[0.3.0]: https://github.com/pypest/pypestutils/compare/v0.2.1...v0.3.0
2846
[0.2.1]: https://github.com/pypest/pypestutils/compare/v0.2.0...v0.2.1
2947
[0.2.0]: https://github.com/pypest/pypestutils/compare/v0.1.0...v0.2.0
3048
[0.1.0]: https://github.com/pypest/pypestutils/releases/tag/v0.1.0

docs/helpers.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h1 class="title">Module <code>pypestutils.helpers</code></h1>
161161
return {&#34;all_results&#34;:allresults_df,&#34;interpolated_results&#34;:obsdf}
162162

163163
def get_grid_info_from_gridspec(gridspec_fname: str) -&gt; dict:
164-
&#34;&#34;&#34;Read structured grid info from a PEST-style grid specificatin file
164+
&#34;&#34;&#34;Read structured grid info from a PEST-style grid specification file
165165
Parameters
166166
----------
167167
gridspec_fname : str
@@ -728,7 +728,7 @@ <h1 class="title">Module <code>pypestutils.helpers</code></h1>
728728
the zone array
729729
varioaniso: float or numpy.ndarray
730730
the variogram anisotropy ratio. Either a scalar or array of shape nnodes.
731-
variobearing: flaot or numpy.ndarray
731+
variobearing: float or numpy.ndarray
732732
the variogram anisotropy bearing. Either a scalar or array of shape nnodes
733733
random_seed: int
734734
the random seed. Default is 12345
@@ -1225,7 +1225,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
12251225
<dt><strong><code>varioaniso</code></strong> :&ensp;<code>float</code> or <code>numpy.ndarray</code></dt>
12261226
<dd>the variogram anisotropy ratio.
12271227
Either a scalar or array of shape nnodes.</dd>
1228-
<dt><strong><code>variobearing</code></strong> :&ensp;<code>flaot</code> or <code>numpy.ndarray</code></dt>
1228+
<dt><strong><code>variobearing</code></strong> :&ensp;<code>float</code> or <code>numpy.ndarray</code></dt>
12291229
<dd>the variogram anisotropy bearing.
12301230
Either a scalar or array of shape nnodes</dd>
12311231
<dt><strong><code>random_seed</code></strong> :&ensp;<code>int</code></dt>
@@ -1283,7 +1283,7 @@ <h2 id="returns">Returns</h2>
12831283
the zone array
12841284
varioaniso: float or numpy.ndarray
12851285
the variogram anisotropy ratio. Either a scalar or array of shape nnodes.
1286-
variobearing: flaot or numpy.ndarray
1286+
variobearing: float or numpy.ndarray
12871287
the variogram anisotropy bearing. Either a scalar or array of shape nnodes
12881288
random_seed: int
12891289
the random seed. Default is 12345
@@ -1643,7 +1643,7 @@ <h2 id="returns">Returns</h2>
16431643
<span>def <span class="ident">get_grid_info_from_gridspec</span></span>(<span>gridspec_fname: str) ‑> dict</span>
16441644
</code></dt>
16451645
<dd>
1646-
<div class="desc"><p>Read structured grid info from a PEST-style grid specificatin file
1646+
<div class="desc"><p>Read structured grid info from a PEST-style grid specification file
16471647
Parameters</p>
16481648
<hr>
16491649
<dl>
@@ -1660,7 +1660,7 @@ <h2 id="returns">Returns</h2>
16601660
<span>Expand source code</span>
16611661
</summary>
16621662
<pre><code class="python">def get_grid_info_from_gridspec(gridspec_fname: str) -&gt; dict:
1663-
&#34;&#34;&#34;Read structured grid info from a PEST-style grid specificatin file
1663+
&#34;&#34;&#34;Read structured grid info from a PEST-style grid specification file
16641664
Parameters
16651665
----------
16661666
gridspec_fname : str

0 commit comments

Comments
 (0)