From af8954b45903680a2931573453228b03ea7beb6b Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 13 Nov 2023 17:24:46 -0500 Subject: [PATCH] refactor: support python3.12, simplify tests and dependencies (#1999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use µmamba in CI tests to avoid pyzmq issue * remove pytest-virtualenv as test dependency * rewrite generate_classes tests with virtualenv * minor simplifications to autotest/conftest.py * add python 3.12 classifier to pyproject.toml * add code generation test marker to pytest.ini * add IPRN value where missing in some example input files * add pip and replace bmipy with xmipy in etc/environment.yml * deduplicate in CI workflows (consolidate windows/non-windows) --- .docs/md/generate_classes.md | 2 +- .github/workflows/benchmark.yml | 44 ++---------- .github/workflows/commit.yml | 67 ++++-------------- .github/workflows/examples.yml | 54 +++------------ .github/workflows/regression.yml | 48 ++----------- CONTRIBUTING.md | 8 ++- DEVELOPER.md | 14 ++-- autotest/conftest.py | 20 ++---- autotest/pytest.ini | 11 +-- autotest/test_generate_classes.py | 68 ++++++++++++------- etc/environment.yml | 12 ++-- .../data/mf6/test006_2models_mvr/model1.dis | 2 +- .../data/mf6/test006_2models_mvr/model1.ic | 2 +- examples/data/mf6/test006_gwf3/flow.ic | 2 +- pyproject.toml | 4 +- 15 files changed, 111 insertions(+), 247 deletions(-) diff --git a/.docs/md/generate_classes.md b/.docs/md/generate_classes.md index 705691817..05c2300d4 100644 --- a/.docs/md/generate_classes.md +++ b/.docs/md/generate_classes.md @@ -100,4 +100,4 @@ By default, a backup is made of FloPy's package classes before rewriting them. T ## Testing class generation -Tests for the `generate_classes()` utility are located in `test_generate_classes.py`. The tests depend on [`pytest-virtualenv`](https://pypi.org/project/pytest-virtualenv/) and will be skipped if run in parallel without the `--dist loadfile` option for `pytest-xdist`. +Tests for the `generate_classes()` utility are located in `test_generate_classes.py`. The tests depend on [`virtualenv`](https://pypi.org/project/virtualenv/) and will be skipped if run in parallel without the `--dist loadfile` option for `pytest-xdist`. \ No newline at end of file diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e72415c42..645b1d930 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -12,37 +12,21 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 3.8, 3.9, "3.10", "3.11" ] + 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 + shell: bash -l {0} timeout-minutes: 90 steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python - if: runner.os != 'Windows' - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: pyproject.toml - - - name: Install Python dependencies - if: runner.os != 'Windows' - run: | - pip install --upgrade pip - pip install . - pip install ".[test, optional]" - - name: Setup Micromamba - if: runner.os == 'Windows' uses: mamba-org/setup-micromamba@v1 with: environment-file: etc/environment.yml @@ -54,29 +38,14 @@ jobs: bash powershell - - name: Install extra Python dependencies - if: runner.os == 'Windows' - shell: bash -l {0} - run: | - pip install xmipy - pip install . + - name: Install FloPy + run: pip install . - name: Install Modflow executables uses: modflowpy/install-modflow-action@v1 - name: Run benchmarks - if: runner.os != 'Windows' - working-directory: ./autotest - run: | - mkdir -p .benchmarks - pytest -v --durations=0 --benchmark-only --benchmark-json .benchmarks/${{ matrix.os }}_python${{ matrix.python-version }}.json --keep-failed=.failed - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Run benchmarks - if: runner.os == 'Windows' - shell: bash -l {0} - working-directory: ./autotest + working-directory: autotest run: | mkdir -p .benchmarks pytest -v --durations=0 --benchmark-only --benchmark-json .benchmarks/${{ matrix.os }}_python${{ matrix.python-version }}.json --keep-failed=.failed @@ -115,7 +84,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.12 cache: 'pip' cache-dependency-path: pyproject.toml @@ -151,7 +120,6 @@ jobs: fi python ./scripts/process_benchmarks.py ./autotest/.benchmarks ./autotest/.benchmarks env: - ARTIFACTS: ${{steps.run_tests.outputs.artifact_ids}} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload benchmark results diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 7765c4fd6..d151a4319 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -32,11 +32,10 @@ jobs: python -c "import flopy; print(f'{flopy.__version__}')" - name: Build package - run: | - python -m build + run: python -m build + - name: Check package - run: | - twine check --strict dist/* + run: twine check --strict dist/* lint: name: Lint @@ -119,7 +118,7 @@ jobs: run: | pip install --upgrade pip pip install . - pip install ".[test,optional]" + pip install ".[test, optional]" - name: Install Modflow executables uses: modflowpy/install-modflow-action@v1 @@ -135,13 +134,13 @@ jobs: if: failure() with: name: failed-smoke-${{ runner.os }}-${{ env.PYTHON_VERSION }} - path: ./autotest/.failed/** + path: autotest/.failed/** - name: Upload coverage if: github.repository_owner == 'modflowpy' && (github.event_name == 'push' || github.event_name == 'pull_request') uses: codecov/codecov-action@v3 with: - files: ./autotest/coverage.xml + files: autotest/coverage.xml test: name: Test @@ -151,37 +150,21 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 3.8, 3.9, "3.10", "3.11" ] + 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 + shell: bash -l {0} timeout-minutes: 45 steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python - if: runner.os != 'Windows' - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: pyproject.toml - - - name: Install Python dependencies - if: runner.os != 'Windows' - run: | - pip install --upgrade pip - pip install . - pip install ".[test, optional]" - - name: Setup Micromamba - if: runner.os == 'Windows' uses: mamba-org/setup-micromamba@v1 with: environment-file: etc/environment.yml @@ -193,12 +176,8 @@ jobs: bash powershell - - name: Install Python dependencies - shell: bash -l {0} - if: runner.os == 'Windows' - run: | - pip install xmipy - pip install . + - name: Install FloPy + run: pip install . - name: Install Modflow-related executables uses: modflowpy/install-modflow-action@v1 @@ -208,28 +187,11 @@ jobs: with: repo: modflow6-nightly-build - - name: Update FloPy packages - if: runner.os != 'Windows' - run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - - - name: Update FloPy packages - if: runner.os == 'Windows' - shell: bash -l {0} + - name: Update package classes run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - name: Run tests - if: runner.os != 'Windows' - working-directory: ./autotest - run: | - pytest -v -m="not example and not regression" -n=auto --cov=flopy --cov-append --cov-report=xml --durations=0 --keep-failed=.failed --dist loadfile - coverage report - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Run tests - if: runner.os == 'Windows' - shell: bash -l {0} - working-directory: ./autotest + working-directory: autotest run: | pytest -v -m="not example and not regression" -n=auto --cov=flopy --cov-append --cov-report=xml --durations=0 --keep-failed=.failed --dist loadfile coverage report @@ -241,11 +203,10 @@ jobs: if: failure() with: name: failed-${{ matrix.os }}-${{ matrix.python-version }} - path: | - ./autotest/.failed/** + path: autotest/.failed/** - name: Upload coverage if: github.repository_owner == 'modflowpy' && (github.event_name == 'push' || github.event_name == 'pull_request') uses: codecov/codecov-action@v3 with: - files: ./autotest/coverage.xml + files: autotest/coverage.xml diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index fe9b014b3..5540c9f0c 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -12,36 +12,20 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 3.8, 3.9, "3.10", "3.11" ] + 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 + shell: bash -l {0} timeout-minutes: 90 steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python - if: runner.os != 'Windows' - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: pyproject.toml - - - name: Install Python dependencies - if: runner.os != 'Windows' - run: | - pip install --upgrade pip - pip install . - pip install ".[test, optional]" - - name: Setup Micromamba - if: runner.os == 'Windows' uses: mamba-org/setup-micromamba@v1 with: environment-file: etc/environment.yml @@ -53,14 +37,10 @@ jobs: bash powershell - - name: Install extra Python dependencies - if: runner.os == 'Windows' - shell: bash -l {0} - run: | - pip install xmipy - pip install . + - name: Install FloPy + run: pip install . - - name: Workaround OpenGL issue on Linux + - name: OpenGL workaround on Linux if: runner.os == 'Linux' run: | # referenced from https://github.com/pyvista/pyvista/blob/main/.github/workflows/vtk-pre-test.yml#L53 @@ -85,28 +65,11 @@ jobs: repo: modflow6-nightly-build - name: Update FloPy packages - if: runner.os != 'Windows' - run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - - - name: Update FloPy packages - if: runner.os == 'Windows' - shell: bash -l {0} run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - name: Run example tests - if: runner.os != 'Windows' - working-directory: ./autotest - run: | - pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Run example tests - if: runner.os == 'Windows' - shell: bash -l {0} - working-directory: ./autotest - run: | - pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed + working-directory: autotest + run: pytest -v -m="example" -n=auto -s --durations=0 --keep-failed=.failed env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -115,5 +78,4 @@ jobs: if: failure() with: name: failed-example-${{ matrix.os }}-${{ matrix.python-version }} - path: | - ./autotest/.failed/** + path: autotest/.failed/** diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 972f1e165..b11c9d9d5 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -12,36 +12,20 @@ jobs: fail-fast: false matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] - python-version: [ 3.8, 3.9, "3.10", "3.11" ] + 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 + shell: bash -l {0} timeout-minutes: 90 steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Python - if: runner.os != 'Windows' - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: pyproject.toml - - - name: Install Python dependencies - if: runner.os != 'Windows' - run: | - pip install --upgrade pip - pip install . - pip install ".[test, optional]" - - name: Setup Micromamba - if: runner.os == 'Windows' uses: mamba-org/setup-micromamba@v1 with: environment-file: etc/environment.yml @@ -53,12 +37,8 @@ jobs: bash powershell - - name: Install extra Python dependencies - if: runner.os == 'Windows' - shell: bash -l {0} - run: | - pip install xmipy - pip install . + - name: Install FloPy + run: pip install . - name: Install Modflow-related executables uses: modflowpy/install-modflow-action@v1 @@ -69,25 +49,10 @@ jobs: repo: modflow6-nightly-build - name: Update FloPy packages - if: runner.os != 'Windows' - run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - - - name: Update FloPy packages - if: runner.os == 'Windows' - shell: bash -l {0} run: python -m flopy.mf6.utils.generate_classes --ref develop --no-backup - name: Run regression tests - if: runner.os != 'Windows' - working-directory: ./autotest - run: pytest -v -m="regression" -n=auto --durations=0 --keep-failed=.failed - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Run regression tests - if: runner.os == 'Windows' - shell: bash -l {0} - working-directory: ./autotest + working-directory: autotest run: pytest -v -m="regression" -n=auto --durations=0 --keep-failed=.failed env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -97,5 +62,4 @@ jobs: if: failure() with: name: failed-regression-${{ matrix.os }}-${{ matrix.python-version }} - path: | - ./autotest/.failed/** + path: autotest/.failed/** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a604641b6..1abb137f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,12 +55,14 @@ Before you submit your Pull Request (PR) consider the following guidelines: ``` 4. Create your patch, **including appropriate test cases**. See [DEVELOPER,md](DEVELOPER.md#running-tests) for guidelines for constructing autotests. -5. Run the [isort import sorter](https://github.com/PyCQA/isort) and [black formatter](https://github.com/psf/black). There is a utility script to do this in the `scripts` directory: +5. Run the formatting tools from the project root: ```shell - python ./scripts/pull_request_prepare.py + black -v flopy + isort -v flopy ``` - Note: Pull Requests must pass isort import and black format checks run on the [GitHub actions](https://github.com/modflowpy/flopy/actions) (*linting*) before they will be accepted. isort can be installed using [`pip`](https://pypi.org/project/isort/) and [`conda`](https://anaconda.org/conda-forge/isort). The black formatter can also be installed using [`pip`](https://pypi.org/project/black/) and [`conda`](https://anaconda.org/conda-forge/black). If the Pull Request fails the *linting* job in the [flopy continuous integration](https://github.com/modflowpy/flopy/actions/workflows/commit.yml) workflow, make sure the latest versions of isort and black are installed. + + Note: Pull Requests must pass format checks run on the [GitHub actions](https://github.com/modflowpy/flopy/actions) before they will be accepted. If the Pull Request fails the `lint` job in the [continuous integration](https://github.com/modflowpy/flopy/actions/workflows/commit.yml) workflow, make sure the latest versions of `black` and `isort` are installed (this may require clearing CI caches). 6. Run the full FloPy test suite and ensure that all tests pass: diff --git a/DEVELOPER.md b/DEVELOPER.md index cda40aa71..195f4a9d3 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -63,15 +63,15 @@ Then install `flopy` and core dependencies from the project root: pip install . +The `flopy` package has a number of [optional dependencies](.docs/optional_dependencies.md), as well as extra dependencies required for linting, testing, and building documentation. Extra dependencies are listed in the `test`, `lint`, `optional`, and `doc` groups under the `[project.optional-dependencies]` section in `pyproject.toml`. Core, linting, testing and optional dependencies are included in the Conda environment in `etc/environment.yml`. Only core dependencies are included in the PyPI package — to install extra dependency groups with pip, use `pip install ".[]"`. For instance, to install all extra dependency groups: + + pip install ".[test, lint, optional, doc]" + Alternatively, with Anaconda or Miniconda: conda env create -f etc/environment.yml conda activate flopy -The `flopy` package has a number of [optional dependencies](.docs/optional_dependencies.md), as well as extra dependencies required for linting, testing, and building documentation. Extra dependencies are listed in the `test`, `lint`, `optional`, and `doc` groups under the `[project.optional-dependencies]` section in `pyproject.toml`. Core, linting, testing and optional dependencies are included in the Conda environment in `etc/environment.yml`. Only core dependencies are included in the PyPI package — to install extra dependency groups with pip, use `pip install ".[]"`. For instance, to install all extra dependency groups: - - pip install ".[test, lint, optional, doc]" - #### Python IDEs ##### Visual Studio Code @@ -80,7 +80,7 @@ VSCode users on Windows may need to run `conda init`, then open a fresh terminal ```json { - "python.defaultInterpreterPath": "/path/to/your/virtual/environment", + "python.defaultInterpreterPath": "/path/to/environment", "python.terminal.activateEnvironment": true } ``` @@ -110,9 +110,9 @@ wget https://github.com/MODFLOW-USGS/executables/releases/download/8.0/linux.zip unzip linux.zip -d /path/to/your/install/location ``` -Then add the install location to your `PATH` +Then add the install location to the `PATH` - export PATH="/path/to/your/install/location:$PATH" + export PATH="/path/to/install/location:$PATH" ##### Mac diff --git a/autotest/conftest.py b/autotest/conftest.py index b85458c04..0db0d3ec0 100644 --- a/autotest/conftest.py +++ b/autotest/conftest.py @@ -1,18 +1,8 @@ -import importlib -import os import re -import socket -import sys from importlib import metadata -from os import environ -from os.path import basename, normpath from pathlib import Path from platform import system -from shutil import copytree, which -from subprocess import PIPE, Popen -from typing import List, Optional -from urllib import request -from warnings import warn +from typing import List import matplotlib.pyplot as plt import pytest @@ -28,7 +18,7 @@ SHAPEFILE_EXTENSIONS = ["prj", "shx", "dbf"] -# misc utilities +# path utilities def get_project_root_path() -> Path: @@ -43,7 +33,7 @@ def get_flopy_data_path() -> Path: return get_project_root_path() / "flopy" / "data" -# path fixtures +# fixtures @pytest.fixture(scope="session") @@ -66,11 +56,9 @@ def example_shapefiles(example_data_path) -> List[Path]: return [f.resolve() for f in (example_data_path / "prj_test").glob("*")] -# fixture to automatically close any plots (or optionally show them) - - @pytest.fixture(autouse=True) def close_plot(request): + # fixture to automatically close any plots (or optionally show them) yield # plots only shown if requested via CLI flag, diff --git a/autotest/pytest.ini b/autotest/pytest.ini index 8f4616fd3..c94efd1f3 100644 --- a/autotest/pytest.ini +++ b/autotest/pytest.ini @@ -10,8 +10,9 @@ python_files = env_files = .env markers = - slow: tests that don't complete in a few seconds - example: exercise scripts, tutorials and notebooks - regression: tests that compare multiple results - meta: run by other tests (e.g. testing fixtures) - mf6: tests for the mf6 module \ No newline at end of file + example: exercise scripts, tutorials, notebooks + generation: tests for code generation utilities + meta: tests run by other tests + mf6: tests for MODFLOW 6 support + regression: tests comparing multiple versions + slow: tests not completing in a few seconds \ No newline at end of file diff --git a/autotest/test_generate_classes.py b/autotest/test_generate_classes.py index cff9a37f3..db812aa40 100644 --- a/autotest/test_generate_classes.py +++ b/autotest/test_generate_classes.py @@ -1,5 +1,4 @@ import sys -from datetime import datetime from os import environ from pathlib import Path from pprint import pprint @@ -7,7 +6,8 @@ from warnings import warn import pytest -from modflow_devtools.misc import get_current_branch +from modflow_devtools.misc import get_current_branch, run_cmd +from virtualenv import cli_run branch = get_current_branch() @@ -19,7 +19,20 @@ def nonempty(itr: Iterable): def pytest_generate_tests(metafunc): - # defaults + """ + Test mf6 module code generation on a small, hopefully + fairly representative set of MODFLOW 6 input & output + specification versions, including the develop branch, + the latest official release, and a few older releases + and commits. + + TODO: May make sense to run the full battery of tests + against all of the versions of mf6io flopy guarantees + support for- maybe develop and latest release? Though + some backwards compatibility seems ideal if possible. + This would need changes in GH Actions CI test matrix. + """ + owner = "MODFLOW-USGS" repo = "modflow6" ref = [ @@ -56,16 +69,13 @@ def pytest_generate_tests(metafunc): metafunc.parametrize(key, ref, scope="session") +@pytest.mark.generation @pytest.mark.mf6 @pytest.mark.slow -@pytest.mark.regression -@pytest.mark.skipif( - branch == "master" or branch.startswith("v"), - reason="skip on master and release branches", -) def test_generate_classes_from_github_refs( - request, virtualenv, project_root_path, ref, worker_id + request, project_root_path, ref, worker_id, function_tmpdir ): + # skip if run in parallel with pytest-xdist without --dist loadfile argv = ( request.config.workerinput["mainargv"] if hasattr(request.config, "workerinput") @@ -74,20 +84,22 @@ def test_generate_classes_from_github_refs( if worker_id != "master" and "loadfile" not in argv: pytest.skip("can't run in parallel") - python = virtualenv.python - venv = Path(python).parent - print( - f"Using temp venv at {venv} with python {python} to test class generation from {ref}" - ) + # create virtual environment + venv = function_tmpdir / "venv" + python = venv / "bin" / "python" + pip = venv / "bin" / "pip" + cli_run([str(venv)]) + print(f"Using temp venv at {venv} to test class generation from {ref}") - # install flopy/dependencies - pprint(virtualenv.run(f"pip install {project_root_path}")) - for dependency in ["modflow-devtools"]: - pprint(virtualenv.run(f"pip install {dependency}")) + # install flopy and dependencies + deps = [str(project_root_path), "modflow-devtools"] + for dep in deps: + out, err, ret = run_cmd(str(pip), "install", dep, verbose=True) + assert not ret, out + err # get creation time of files flopy_path = ( - venv.parent + venv / "lib" / f"python{sys.version_info.major}.{sys.version_info.minor}" / "site-packages" @@ -107,12 +119,20 @@ def test_generate_classes_from_github_refs( ref = spl[2] # generate classes - pprint( - virtualenv.run( - "python -m flopy.mf6.utils.generate_classes " - f"--owner {owner} --repo {repo} --ref {ref} --no-backup" - ) + out, err, ret = run_cmd( + str(python), + "-m", + "flopy.mf6.utils.generate_classes", + "--owner", + owner, + "--repo", + repo, + "--ref", + ref, + "--no-backup", + verbose=True, ) + assert not ret, out + err def get_mtime(f): try: diff --git a/etc/environment.yml b/etc/environment.yml index d4a6b62a5..a5a8b3cdc 100644 --- a/etc/environment.yml +++ b/etc/environment.yml @@ -2,6 +2,8 @@ name: flopy channels: - conda-forge dependencies: + - pip + # required - python>=3.8 - numpy>=1.15.0 @@ -9,6 +11,7 @@ dependencies: # lint - black + - cffconvert - flake8 - isort - pylint @@ -19,15 +22,12 @@ dependencies: - filelock - jupyter - jupytext - - pip - - pip: - - modflow-devtools + - modflow-devtools - pytest - pytest-benchmark - pytest-cases - pytest-cov - pytest-dotenv - - pytest-virtualenv - pytest-xdist - virtualenv @@ -50,6 +50,4 @@ dependencies: - pyvista - imageio - pymetis - - # MODFLOW API dependencies - - bmipy + - xmipy diff --git a/examples/data/mf6/test006_2models_mvr/model1.dis b/examples/data/mf6/test006_2models_mvr/model1.dis index 3e5c3eaa5..07637f87e 100644 --- a/examples/data/mf6/test006_2models_mvr/model1.dis +++ b/examples/data/mf6/test006_2models_mvr/model1.dis @@ -11,7 +11,7 @@ end dimensions BEGIN GRIDDATA IDOMAIN - INTERNAL FACTOR 1 IPRN + INTERNAL FACTOR 1 IPRN 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 diff --git a/examples/data/mf6/test006_2models_mvr/model1.ic b/examples/data/mf6/test006_2models_mvr/model1.ic index 841d89fc7..b1069687b 100644 --- a/examples/data/mf6/test006_2models_mvr/model1.ic +++ b/examples/data/mf6/test006_2models_mvr/model1.ic @@ -4,7 +4,7 @@ end options BEGIN GRIDDATA strt -INTERNAL FACTOR 1.0 IPRN +INTERNAL FACTOR 1.0 IPRN 0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 diff --git a/examples/data/mf6/test006_gwf3/flow.ic b/examples/data/mf6/test006_gwf3/flow.ic index 3d1b93d93..ce4024e3f 100644 --- a/examples/data/mf6/test006_gwf3/flow.ic +++ b/examples/data/mf6/test006_gwf3/flow.ic @@ -4,7 +4,7 @@ end options BEGIN GRIDDATA strt -INTERNAL FACTOR 1 IPRN +INTERNAL FACTOR 1 IPRN 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 diff --git a/pyproject.toml b/pyproject.toml index 95ecd5ac7..bb5ebb487 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Hydrology", ] requires-python = ">=3.8" @@ -55,7 +56,6 @@ test = [ "pytest-cases", "pytest-cov", "pytest-dotenv", - "pytest-virtualenv", "pytest-xdist", "virtualenv" ] @@ -121,4 +121,4 @@ target_version = ["py38"] [tool.isort] profile = "black" src_paths = ["flopy"] -line_length = 79 +line_length = 79 \ No newline at end of file