From 78de0591c0d318df4598073c4c79d34f239eb466 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Mon, 16 Aug 2021 10:43:57 -0500 Subject: [PATCH 1/4] update(python): set python 3.7 as minimum supported version Also set minimum NumPy version to >= 1.15. Add python 3.9 to GitHub action workflows and remove python 3.6. Closes #1176 Closes #1177 --- .github/workflows/ci.yml | 20 ++++++++++---------- .github/workflows/rtd.yml | 2 +- etc/environment.yml | 5 +++-- setup.py | 8 +++++--- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c76c50f86..ae14e26121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: - name: Checkout flopy repo uses: actions/checkout@v2.3.4 - - name: Setup Python 3.8 - uses: actions/setup-python@v2 + - name: Setup Python 3.9 + uses: actions/setup-python@v2.2.2 with: - python-version: 3.8 + python-version: 3.9 - name: Upgrade pip run: | @@ -66,15 +66,15 @@ jobs: # standard python here since only linting on linux. # Use standard bash shell with standard python - name: Setup Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v2.2.2 with: - python-version: 3.8 + python-version: 3.9 - name: Print python version run: | python --version - - name: Install Python 3.8 packages + - name: Install Python 3.9 packages run: | python -m pip install --upgrade pip pip install -r etc/requirements.pip.txt @@ -102,16 +102,16 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.8, 3.7, 3.6] + python-version: [3.9, 3.8, 3.7] run-type: [std] test-pth: [""] include: - os: ubuntu-latest - python-version: 3.8 + python-version: 3.9 run-type: nb test-path: autotest_notebooks.py - os: ubuntu-latest - python-version: 3.8 + python-version: 3.9 run-type: script test-path: autotest_scripts.py defaults: @@ -130,7 +130,7 @@ jobs: uses: actions/cache@v2.1.0 env: # Increase this value to reset cache if environment.yml has changed - CACHE_NUMBER: 0 + CACHE_NUMBER: 1 with: path: ~/conda_pkgs_dir key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.run-type }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('etc/environment.yml') }} diff --git a/.github/workflows/rtd.yml b/.github/workflows/rtd.yml index eaa9550494..8733acfd63 100644 --- a/.github/workflows/rtd.yml +++ b/.github/workflows/rtd.yml @@ -37,7 +37,7 @@ jobs: - name: Setup Miniconda uses: conda-incubator/setup-miniconda@v2.1.1 with: - python-version: 3.8 + python-version: 3.9 mamba-version: "*" channels: conda-forge auto-update-conda: true diff --git a/etc/environment.yml b/etc/environment.yml index 688324b951..a005752a70 100644 --- a/etc/environment.yml +++ b/etc/environment.yml @@ -2,6 +2,7 @@ name: flopy channels: - conda-forge dependencies: + - python>=3.7 - pylint - flake8 - black @@ -10,7 +11,7 @@ dependencies: - coverage - appdirs - requests - - numpy + - numpy>=1.15 - matplotlib - bmipy - affine @@ -23,5 +24,5 @@ dependencies: - descartes - pyproj - shapely - - geos=3.8.1 # required until 3.9.2 is available + - geos>3.9.1, <3.9.1 # required until 3.9.2 is available - geojson diff --git a/setup.py b/setup.py index 6283194693..22b3ff139e 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ from setuptools import setup # ensure minimum version of Python is running -if sys.version_info[0:2] < (3, 5): - raise RuntimeError("Flopy requires Python >= 3.5") +if sys.version_info[0:2] < (3, 7): + raise RuntimeError("Flopy requires Python >= 3.7") # local import of package variables in flopy/version.py # imports __version__, __pakname__, __author__, __author_email__ @@ -28,7 +28,9 @@ url="https://github.com/modflowpy/flopy/", license="CC0", platforms="Windows, Mac OS-X, Linux", - install_requires=["numpy"], + install_requires=[ + "numpy >=1.15", + ], packages=[ "flopy", "flopy.modflow", From fc34034a848e4968eb2ca965403834b53a538351 Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Mon, 16 Aug 2021 10:52:48 -0500 Subject: [PATCH 2/4] update(python): set python 3.7 as minimum supported version Also set minimum NumPy version to >= 1.15. Add python 3.9 to GitHub action workflows and remove python 3.6. Closes #1176 Closes #1177 --- etc/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/environment.yml b/etc/environment.yml index a005752a70..bd12226fcd 100644 --- a/etc/environment.yml +++ b/etc/environment.yml @@ -24,5 +24,5 @@ dependencies: - descartes - pyproj - shapely - - geos>3.9.1, <3.9.1 # required until 3.9.2 is available + - geos>=3.9.2,<3.9.0 # required until 3.9.2 is available - geojson From b2d774fe90700c69a8de396b0190b3daa0c19aca Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Mon, 16 Aug 2021 11:04:01 -0500 Subject: [PATCH 3/4] update(python): set python 3.7 as minimum supported version Also set minimum NumPy version to >= 1.15. Add python 3.9 to GitHub action workflows and remove python 3.6. Closes #1176 Closes #1177 --- .github/workflows/ci.yml | 2 +- etc/environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae14e26121..55a58da332 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: Base flopy installation run: | - pip install . + pip install . --use-feature=in-tree-build - name: Print flopy version run: | diff --git a/etc/environment.yml b/etc/environment.yml index bd12226fcd..9e7b494c6b 100644 --- a/etc/environment.yml +++ b/etc/environment.yml @@ -24,5 +24,5 @@ dependencies: - descartes - pyproj - shapely - - geos>=3.9.2,<3.9.0 # required until 3.9.2 is available + - geos - geojson From 03a9c902e1221a91a7b6419087609ae3a34f172e Mon Sep 17 00:00:00 2001 From: Joseph D Hughes Date: Mon, 16 Aug 2021 11:17:04 -0500 Subject: [PATCH 4/4] update(python): set python 3.7 as minimum supported version Also set minimum NumPy version to >= 1.15. Add python 3.9 to GitHub action workflows and remove python 3.6. Closes #1176 Closes #1177 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55a58da332..7c86e45b91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,7 +164,7 @@ jobs: run: | pip install https://github.com/modflowpy/pymake/zipball/master pip install xmipy - pip install . + pip install . --use-feature=in-tree-build - name: Setup symbolic link to gfortran on Linux if: runner.os == 'Linux'