Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(dependencies): support numpy 2 #2241

Merged
merged 8 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
exclude:
# avoid shutil.copytree infinite recursion bug
# https://github.com/python/cpython/pull/17098
- python-version: '3.8.0'
defaults:
run:
shell: bash -l {0}
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
shell: bash
timeout-minutes: 10
env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9

steps:
- name: Checkout repo
Expand Down Expand Up @@ -134,10 +134,6 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
exclude:
# avoid shutil.copytree infinite recursion bug
# https://github.com/python/cpython/pull/17098
- python-version: '3.8.0'
defaults:
run:
shell: bash -l {0}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ 3.8, 3.9, "3.10", "3.11", "3.12" ]
exclude:
# avoid shutil.copytree infinite recursion bug
# https://github.com/python/cpython/pull/17098
- python-version: '3.8.0'
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
shell: bash
timeout-minutes: 10
env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
cache: 'pip'
cache-dependency-path: pyproject.toml

Expand Down
4 changes: 2 additions & 2 deletions autotest/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def test_export_shapefile_polygon_closed(function_tmpdir):


@excludes_platform("Windows")
@requires_pkg("rasterio", "shapefile", "scipy")
@requires_pkg("rasterio", "pyshp", "scipy", name_map={"pyshp": "shapefile"})
def test_export_array(function_tmpdir, example_data_path):
import rasterio
from scipy.ndimage import rotate
Expand Down Expand Up @@ -1992,7 +1992,7 @@ def test_vtk_export_disu2_grid(function_tmpdir, example_data_path):

@pytest.mark.mf6
@requires_exe("mf6", "gridgen")
@requires_pkg("vtk", "shapefile", "shapely")
@requires_pkg("vtk", "pyshp", "shapely", name_map={"pyshp": "shapefile"})
def test_vtk_export_disu_model(function_tmpdir):
from vtkmodules.util.numpy_support import vtk_to_numpy

Expand Down
2 changes: 1 addition & 1 deletion etc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:

# required
- python>=3.8
- numpy>=1.20.3,<2.0.0
- numpy>=1.20.3
- matplotlib>=1.4.0
- pandas>=2.0.0

Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/data/mfdatastorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ def _fill_dimensions(self, data_iter, dimensions):
data_array = np.ndarray(shape=dimensions, dtype=np_dtype)
# fill array
for index in ArrayIndexIter(dimensions):
data_array.itemset(index, next(data_iter))
data_array[index] = next(data_iter)
return data_array
elif self.data_structure_type == DataStructureType.scalar:
return next(data_iter)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
]
requires-python = ">=3.8"
dependencies = [
"numpy >=1.20.3,<2.0.0",
"numpy>=1.20.3",
"matplotlib >=1.4.0",
"pandas >=2.0.0"
]
Expand Down
Loading