diff --git a/.gitignore b/.gitignore index 2c96cc1c..8ea75eec 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ venv/ .pixi *.egg-info temp/ +.coverage diff --git a/.vscode/settings.json b/.vscode/settings.json index 9910f3a3..2db2b475 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,7 +12,8 @@ "source.fixAll": "explicit" } }, - "mypy-type-checker.importStrategy": "fromEnvironment", + "python.analysis.typeCheckingMode": "off", + "debugpy.debugJustMyCode": false, "files.exclude": { "**/.git": true, "**/.svn": true, diff --git a/flopy4/mf6/constants.py b/flopy4/mf6/constants.py index bcd2aaaf..a1b3b89e 100644 --- a/flopy4/mf6/constants.py +++ b/flopy4/mf6/constants.py @@ -3,3 +3,4 @@ MF6 = "mf6" FILL_DEFAULT = np.nan FILL_DNODATA = 1e30 +LENBOUNDNAME = 40 diff --git a/flopy4/mf6/converter.py b/flopy4/mf6/converter.py index 20036281..d0bb79a4 100644 --- a/flopy4/mf6/converter.py +++ b/flopy4/mf6/converter.py @@ -156,6 +156,7 @@ def unstructure_component(value: Component) -> dict[str, Any]: for kper in range(field_value.sizes["nper"]) } else: + # TODO why not putting in block here but doing below? how does this even work if np.issubdtype(field_value.dtype, np.str_): period_data[field_name] = { kper: field_value[kper] for kper in range(field_value.sizes["nper"]) @@ -187,11 +188,6 @@ def unstructure_component(value: Component) -> dict[str, Any]: dataset = xr.Dataset(block) blocks[f"{block_name} {kper + 1}"] = {block_name: dataset} - # make sure options block always comes first - if "options" in blocks: - options_block = blocks.pop("options") - blocks = {"options": options_block, **blocks} - # total temporary hack! manually set solutiongroup 1. still need to support multiple.. if "solutiongroup" in blocks: sg = blocks["solutiongroup"] diff --git a/flopy4/mf6/gwf/chd.py b/flopy4/mf6/gwf/chd.py index c0e82727..2bc1b33a 100644 --- a/flopy4/mf6/gwf/chd.py +++ b/flopy4/mf6/gwf/chd.py @@ -7,6 +7,7 @@ from xattree import xattree from flopy4.mf6.component import update_maxbound +from flopy4.mf6.constants import LENBOUNDNAME from flopy4.mf6.converter import dict_to_array from flopy4.mf6.package import Package from flopy4.mf6.spec import array, field, path @@ -51,6 +52,7 @@ class Chd(Package): on_setattr=update_maxbound, ) boundname: Optional[NDArray[np.str_]] = array( + dtype=f"=3.11,<3.14' @@ -5002,10 +5015,10 @@ packages: - pytest-timeout ; extra == 'test' - pytest>=7.0 ; extra == 'test' requires_python: '>=3.8' -- pypi: https://files.pythonhosted.org/packages/1f/fd/ac0979ebd1b1975c266c99b96930b0a66609c3f6e5d76979ca6eb3073896/jupyterlab-4.4.9-py3-none-any.whl +- pypi: https://files.pythonhosted.org/packages/f7/46/1eaa5db8d54a594bdade67afbcae42e9a2da676628be3eb39f36dcff6390/jupyterlab-4.4.10-py3-none-any.whl name: jupyterlab - version: 4.4.9 - sha256: 394c902827350c017430a8370b9f40c03c098773084bc53930145c146d3d2cb2 + version: 4.4.10 + sha256: 65939ab4c8dcd0c42185c2d0d1a9d60b254dc8c46fc4fdb286b63c51e9358e07 requires_dist: - async-lru>=1.0.0 - httpx>=0.25.0,<1 @@ -5069,10 +5082,10 @@ packages: version: 0.3.0 sha256: 841a89020971da1d8693f1a99997aefc5dc424bb1b251fd6322462a1b8842780 requires_python: '>=3.8' -- pypi: https://files.pythonhosted.org/packages/54/09/2032e7d15c544a0e3cd831c51d77a8ca57f7555b2e1b2922142eddb02a84/jupyterlab_server-2.27.3-py3-none-any.whl +- pypi: https://files.pythonhosted.org/packages/e0/07/a000fe835f76b7e1143242ab1122e6362ef1c03f23f83a045c38859c2ae0/jupyterlab_server-2.28.0-py3-none-any.whl name: jupyterlab-server - version: 2.27.3 - sha256: e697488f66c3db49df675158a77b3b017520d772c6e1548c7d9bcc5df7944ee4 + version: 2.28.0 + sha256: e4355b148fdcf34d312bbbc80f22467d6d20460e8b8736bf235577dd18506968 requires_dist: - babel>=2.10 - importlib-metadata>=4.8.3 ; python_full_version < '3.10' @@ -5330,39 +5343,39 @@ packages: purls: [] size: 141322 timestamp: 1752719767870 -- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.4.6-h2dba641_1.conda - sha256: 764432d32db45466e87f10621db5b74363a9f847d2b8b1f9743746cd160f06ab - md5: ede4673863426c0883c0063d853bbd85 +- conda: https://conda.anaconda.org/conda-forge/linux-64/libffi-3.5.2-h9ec8514_0.conda + sha256: 25cbdfa65580cfab1b8d15ee90b4c9f1e0d72128f1661449c9a999d341377d54 + md5: 35f29eec58405aaf55e01cb470d8c26a depends: - __glibc >=2.17,<3.0.a0 - - libgcc >=13 + - libgcc >=14 license: MIT license_family: MIT purls: [] - size: 57433 - timestamp: 1743434498161 -- conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.4.6-h281671d_1.conda - sha256: 6394b1bc67c64a21a5cc73d1736d1d4193a64515152e861785c44d2cfc49edf3 - md5: 4ca9ea59839a9ca8df84170fab4ceb41 + size: 57821 + timestamp: 1760295480630 +- conda: https://conda.anaconda.org/conda-forge/osx-64/libffi-3.5.2-h750e83c_0.conda + sha256: 277dc89950f5d97f1683f26e362d6dca3c2efa16cb2f6fdb73d109effa1cd3d0 + md5: d214916b24c625bcc459b245d509f22e depends: - __osx >=10.13 license: MIT license_family: MIT purls: [] - size: 51216 - timestamp: 1743434595269 -- conda: https://conda.anaconda.org/conda-forge/win-64/libffi-3.4.6-h537db12_1.conda - sha256: d3b0b8812eab553d3464bbd68204f007f1ebadf96ce30eb0cbc5159f72e353f5 - md5: 85d8fa5e55ed8f93f874b3b23ed54ec6 + size: 52573 + timestamp: 1760295626449 +- conda: https://conda.anaconda.org/conda-forge/win-64/libffi-3.5.2-h52bdfb6_0.conda + sha256: ddff25aaa4f0aa535413f5d831b04073789522890a4d8626366e43ecde1534a3 + md5: ba4ad812d2afc22b9a34ce8327a0930f depends: - ucrt >=10.0.20348.0 - - vc >=14.2,<15 - - vc14_runtime >=14.29.30139 + - vc >=14.3,<15 + - vc14_runtime >=14.44.35208 license: MIT license_family: MIT purls: [] - size: 44978 - timestamp: 1743435053850 + size: 44866 + timestamp: 1760295760649 - conda: https://conda.anaconda.org/conda-forge/linux-64/libgcc-15.2.0-h767d61c_7.conda sha256: 08f9b87578ab981c7713e4e6a7d935e40766e10691732bba376d4964562bcb45 md5: c0374badb3a5d4b1372db28d19462c53 @@ -6065,13 +6078,18 @@ packages: - setuptools-scm>=7 ; extra == 'dev' - setuptools>=64 ; extra == 'dev' requires_python: '>=3.10' -- pypi: https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl +- pypi: https://files.pythonhosted.org/packages/af/33/ee4519fa02ed11a94aef9559552f3b17bb863f2ecfe1a35dc7f548cde231/matplotlib_inline-0.2.1-py3-none-any.whl name: matplotlib-inline - version: 0.1.7 - sha256: df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca + version: 0.2.1 + sha256: d56ce5156ba6085e00a9d54fead6ed29a9c47e215cd1bba2e976ef39f5710a76 requires_dist: - traitlets - requires_python: '>=3.8' + - flake8 ; extra == 'test' + - nbdime ; extra == 'test' + - nbval ; extra == 'test' + - notebook ; extra == 'test' + - pytest ; extra == 'test' + requires_python: '>=3.9' - pypi: https://files.pythonhosted.org/packages/fb/86/dd6e5db36df29e76c7a7699123569a4a18c1623ce68d826ed96c62643cae/mdit_py_plugins-0.5.0-py3-none-any.whl name: mdit-py-plugins version: 0.5.0 @@ -8513,6 +8531,18 @@ packages: - pygaljs ; extra == 'histogram' - setuptools ; extra == 'histogram' requires_python: '>=3.9' +- pypi: https://files.pythonhosted.org/packages/ee/49/1377b49de7d0c1ce41292161ea0f721913fa8722c19fb9c1e3aa0367eecb/pytest_cov-7.0.0-py3-none-any.whl + name: pytest-cov + version: 7.0.0 + sha256: 3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861 + requires_dist: + - coverage[toml]>=7.10.6 + - pluggy>=1.2 + - pytest>=7 + - process-tests ; extra == 'testing' + - pytest-xdist ; extra == 'testing' + - virtualenv ; extra == 'testing' + requires_python: '>=3.9' - pypi: https://files.pythonhosted.org/packages/d0/da/9da67c67b3d0963160e3d2cbc7c38b6fae342670cc8e6d5936644b2cf944/pytest_dotenv-0.5.2-py3-none-any.whl name: pytest-dotenv version: 0.5.2 @@ -8531,16 +8561,16 @@ packages: - psutil>=3.0 ; extra == 'psutil' - setproctitle ; extra == 'setproctitle' requires_python: '>=3.9' -- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.11.14-hfe2f287_1_cpython.conda - build_number: 1 - sha256: 6515ef4018fda2826570f6f5c068e26dbd3e41a8b642f052c346812b3af28789 - md5: e87c753e04bffcda4cbfde7d052c1f7a +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.11.14-hd63d673_2_cpython.conda + build_number: 2 + sha256: 5b872f7747891e50e990a96d2b235236a5c66cc9f8c9dcb7149aee674ea8145a + md5: c4202a55b4486314fbb8c11bc43a29a0 depends: - __glibc >=2.17,<3.0.a0 - bzip2 >=1.0.8,<2.0a0 - ld_impl_linux-64 >=2.36.1 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - libgcc >=14 - liblzma >=5.8.1,<6.0a0 - libnsl >=2.0.1,<2.1.0a0 @@ -8557,17 +8587,18 @@ packages: - python_abi 3.11.* *_cp311 license: Python-2.0 purls: [] - size: 30812188 - timestamp: 1760365816536 -- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.12-hfe2f287_0_cpython.conda - sha256: 5386d8c8230b6478ae165ff34f57d498891ac160e871629cbb4d4256e69cc542 - md5: ceada987beec823b3c702710ee073fba + size: 30874708 + timestamp: 1761174520369 +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.12.12-hd63d673_1_cpython.conda + build_number: 1 + sha256: 39898d24769a848c057ab861052e50bdc266310a7509efa3514b840e85a2ae98 + md5: 5c00c8cea14ee8d02941cab9121dce41 depends: - __glibc >=2.17,<3.0.a0 - bzip2 >=1.0.8,<2.0a0 - ld_impl_linux-64 >=2.36.1 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - libgcc >=14 - liblzma >=5.8.1,<6.0a0 - libnsl >=2.0.1,<2.1.0a0 @@ -8584,18 +8615,18 @@ packages: - python_abi 3.12.* *_cp312 license: Python-2.0 purls: [] - size: 31547362 - timestamp: 1760367376467 -- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.9-h2b335a9_100_cp313.conda - build_number: 100 - sha256: 317ee7a38f4cc97336a2aedf9c79e445adf11daa0d082422afa63babcd5117e4 - md5: 78ba5c3a7aecc68ab3a9f396d3b69d06 + size: 31537229 + timestamp: 1761176876216 +- conda: https://conda.anaconda.org/conda-forge/linux-64/python-3.13.9-hc97d973_101_cp313.conda + build_number: 101 + sha256: e89da062abd0d3e76c8d3b35d3cafc5f0d05914339dcb238f9e3675f2a58d883 + md5: 4780fe896e961722d0623fa91d0d3378 depends: - __glibc >=2.17,<3.0.a0 - bzip2 >=1.0.8,<2.0a0 - ld_impl_linux-64 >=2.36.1 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - libgcc >=14 - liblzma >=5.8.1,<6.0a0 - libmpdec >=4.0.0,<5.0a0 @@ -8610,18 +8641,18 @@ packages: - tzdata license: Python-2.0 purls: [] - size: 37323303 - timestamp: 1760612239629 + size: 37174029 + timestamp: 1761178179147 python_site_packages_path: lib/python3.13/site-packages -- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.11.14-h3999593_1_cpython.conda - build_number: 1 - sha256: 42a5106ae9f2a745f258ca187f811da1736e5d2f39ce33df200b00a34cfb47e6 - md5: 30383eebcafb2bdb3f1f039f7d79fb6e +- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.11.14-h74c2667_2_cpython.conda + build_number: 2 + sha256: 0a17479efb8df514c3777c015ffe430d38a3a59c01dc46358e87d7ff459c9aeb + md5: 37ac5f13a245f08746e0d658b245d670 depends: - __osx >=10.13 - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libsqlite >=3.50.4,<4.0a0 - libzlib >=1.3.1,<2.0a0 @@ -8634,16 +8665,17 @@ packages: - python_abi 3.11.* *_cp311 license: Python-2.0 purls: [] - size: 15565919 - timestamp: 1760366149530 -- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.12.12-h3999593_0_cpython.conda - sha256: dfeee761021f0a84ade2c38d60fe8506771e49f992063377094fba11002d15ef - md5: 50be3ddc448ca63b24d145ebf9954877 + size: 15697126 + timestamp: 1761174493171 +- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.12.12-h74c2667_1_cpython.conda + build_number: 1 + sha256: 7d711e7a5085c05d186e1dbc86b8f10fb3d88fb3ce3034944ededef39173ff32 + md5: 902046b662c35d8d644514df0d9c7109 depends: - __osx >=10.13 - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libsqlite >=3.50.4,<4.0a0 - libzlib >=1.3.1,<2.0a0 @@ -8656,17 +8688,17 @@ packages: - python_abi 3.12.* *_cp312 license: Python-2.0 purls: [] - size: 13685943 - timestamp: 1760368419157 -- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.13.9-h2bd861f_100_cp313.conda - build_number: 100 - sha256: c5ae352b7ac8412ed0e9ca8cac2f36d767e96d8e3efb014f47fd103be7447f22 - md5: 9f7e2b7871a35025f30a890492a36578 + size: 13779792 + timestamp: 1761176993883 +- conda: https://conda.anaconda.org/conda-forge/osx-64/python-3.13.9-h17c18a5_101_cp313.conda + build_number: 101 + sha256: b56484229cf83f6c84e8b138dc53f7f2fa9ee850f42bf1f6d6fa1c03c044c2d3 + md5: fb1e51574ce30d2a4d5e4facb9b2cbd5 depends: - __osx >=10.13 - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libmpdec >=4.0.0,<5.0a0 - libsqlite >=3.50.4,<4.0a0 @@ -8679,17 +8711,17 @@ packages: - tzdata license: Python-2.0 purls: [] - size: 17336745 - timestamp: 1760613619143 + size: 17521522 + timestamp: 1761177097697 python_site_packages_path: lib/python3.13/site-packages -- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.11.14-h30ce641_1_cpython.conda - build_number: 1 - sha256: a2e3daeccf06a6271d32d99e851a56fd938d913d2bc7a21eaa8f8219f20cd5a6 - md5: 0213e004a0cddcdc9618fa141294db39 +- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.11.14-h0159041_2_cpython.conda + build_number: 2 + sha256: d5f455472597aefcdde1bc39bca313fcb40bf084f3ad987da0441f2a2ec242e4 + md5: 02a9ba5950d8b78e6c9862d6ba7a5045 depends: - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libsqlite >=3.50.4,<4.0a0 - libzlib >=1.3.1,<2.0a0 @@ -8703,15 +8735,16 @@ packages: - python_abi 3.11.* *_cp311 license: Python-2.0 purls: [] - size: 18568514 - timestamp: 1760364337404 -- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.12.12-h30ce641_0_cpython.conda - sha256: 9e9d6fa3b4ef231fcabf00364319f4ffacb1fb683e6c61c2438bafe3c61a7e2e - md5: e672c6dc92e6f1fcac0f9fed61b2b922 + size: 18514691 + timestamp: 1761172844103 +- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.12.12-h0159041_1_cpython.conda + build_number: 1 + sha256: 9b163b0426c92eee1881d5c838e230a750a3fa372092db494772886ab91c2548 + md5: 42ae551e4c15837a582bea63412dc0b4 depends: - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libsqlite >=3.50.4,<4.0a0 - libzlib >=1.3.1,<2.0a0 @@ -8725,16 +8758,16 @@ packages: - python_abi 3.12.* *_cp312 license: Python-2.0 purls: [] - size: 15741664 - timestamp: 1760365715600 -- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.13.9-hdf00ec1_100_cp313.conda - build_number: 100 - sha256: 2d6d9d5c641d4a11b5bef148813b83eef4e2dffd68e1033362bad85924837f29 - md5: 89c006f6748c7e0fc7950ae0c80df0d5 + size: 15883484 + timestamp: 1761175152489 +- conda: https://conda.anaconda.org/conda-forge/win-64/python-3.13.9-h09917c8_101_cp313.conda + build_number: 101 + sha256: bc855b513197637c2083988d5cbdcc407a23151cdecff381bd677df33d516a01 + md5: 89d992b9d4b9e88ed54346c9c4a24c1c depends: - bzip2 >=1.0.8,<2.0a0 - libexpat >=2.7.1,<3.0a0 - - libffi >=3.4.6,<3.5.0a0 + - libffi >=3.5.2,<3.6.0a0 - liblzma >=5.8.1,<6.0a0 - libmpdec >=4.0.0,<5.0a0 - libsqlite >=3.50.4,<4.0a0 @@ -8748,8 +8781,8 @@ packages: - vc14_runtime >=14.44.35208 license: Python-2.0 purls: [] - size: 16503717 - timestamp: 1760610876821 + size: 16613183 + timestamp: 1761175050438 python_site_packages_path: Lib/site-packages - pypi: https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl name: python-dateutil @@ -9039,51 +9072,51 @@ packages: - markdown-it-py>=2.2.0 - pygments>=2.13.0,<3.0.0 requires_python: '>=3.8.0' -- pypi: https://files.pythonhosted.org/packages/03/36/0a14aebbaa26fe7fab4780c76f2239e76cc95a0090bdb25e31d95c492fcd/rpds_py-0.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl +- pypi: https://files.pythonhosted.org/packages/12/fd/b0f48c4c320ee24c8c20df8b44acffb7353991ddf688af01eef5f93d7018/rpds_py-0.28.0-cp311-cp311-win_amd64.whl name: rpds-py - version: 0.27.1 - sha256: 2efe4eb1d01b7f5f1939f4ef30ecea6c6b3521eec451fb93191bf84b2a522418 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/24/75/3b7ffe0d50dc86a6a964af0d1cc3a4a2cdf437cb7b099a4747bbb96d1819/rpds_py-0.27.1-cp311-cp311-win_amd64.whl + version: 0.28.0 + sha256: dd8d86b5d29d1b74100982424ba53e56033dc47720a6de9ba0259cf81d7cecaa + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/1f/53/14e37ce83202c632c89b0691185dca9532288ff9d390eacae3d2ff771bae/rpds_py-0.28.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: b4938466c6b257b2f5c4ff98acd8128ec36b5059e5c8f8372d79316b1c36bb15 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/67/b6/c82f0faa9af1c6a64669f73a17ee0eeef25aff30bb9a1c318509efe45d84/rpds_py-0.27.1-cp312-cp312-win_amd64.whl + version: 0.28.0 + sha256: ac9f83e7b326a3f9ec3ef84cda98fb0a74c7159f33e692032233046e7fd15da2 + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/3c/1c/f25a3f3752ad7601476e3eff395fe075e0f7813fbb9862bd67c82440e880/rpds_py-0.28.0-cp313-cp313-win_amd64.whl name: rpds-py - version: 0.27.1 - sha256: d9199717881f13c32c4046a15f024971a3b78ad4ea029e8da6b86e5aa9cf4594 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/b5/c1/7907329fbef97cbd49db6f7303893bd1dd5a4a3eae415839ffdfb0762cae/rpds_py-0.27.1-cp311-cp311-macosx_10_12_x86_64.whl + version: 0.28.0 + sha256: e0a0311caedc8069d68fc2bf4c9019b58a2d5ce3cd7cb656c845f1615b577e1e + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/3e/cd/49ce51767b879cde77e7ad9fae164ea15dce3616fe591d9ea1df51152706/rpds_py-0.28.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: be898f271f851f68b318872ce6ebebbc62f303b654e43bf72683dbdc25b7c881 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/bd/fe/38de28dee5df58b8198c743fe2bea0c785c6d40941b9950bac4cdb71a014/rpds_py-0.27.1-cp312-cp312-macosx_10_12_x86_64.whl + version: 0.28.0 + sha256: 8455933b4bcd6e83fde3fefc987a023389c4b13f9a58c8d23e4b3f6d13f78c84 + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/a6/34/058d0db5471c6be7bef82487ad5021ff8d1d1d27794be8730aad938649cf/rpds_py-0.28.0-cp311-cp311-macosx_10_12_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: ae2775c1973e3c30316892737b91f9283f9908e3cc7625b9331271eaaed7dc90 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/cc/77/610aeee8d41e39080c7e14afa5387138e3c9fa9756ab893d09d99e7d8e98/rpds_py-0.27.1-cp313-cp313-macosx_10_12_x86_64.whl + version: 0.28.0 + sha256: 03065002fd2e287725d95fbc69688e0c6daf6c6314ba38bdbaa3895418e09296 + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/af/36/45f6ebb3210887e8ee6dbf1bc710ae8400bb417ce165aaf3024b8360d999/rpds_py-0.28.0-cp312-cp312-win_amd64.whl name: rpds-py - version: 0.27.1 - sha256: e4b9fcfbc021633863a37e92571d6f91851fa656f0180246e84cbd8b3f6b329b - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/ce/2c/5867b14a81dc217b56d95a9f2a40fdbc56a1ab0181b80132beeecbd4b2d6/rpds_py-0.27.1-cp313-cp313-win_amd64.whl + version: 0.28.0 + sha256: a410542d61fc54710f750d3764380b53bf09e8c4edbf2f9141a82aa774a04f7c + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/b8/5c/6c3936495003875fe7b14f90ea812841a08fca50ab26bd840e924097d9c8/rpds_py-0.28.0-cp312-cp312-macosx_10_12_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: f9025faafc62ed0b75a53e541895ca272815bec18abe2249ff6501c8f2e12b83 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/ed/7b/8f4fee9ba1fb5ec856eb22d725a4efa3deb47f769597c809e03578b0f9d9/rpds_py-0.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + version: 0.28.0 + sha256: 6b4f28583a4f247ff60cd7bdda83db8c3f5b05a7a82ff20dd4b078571747708f + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/ca/ee/a324d3198da151820a326c1f988caaa4f37fc27955148a76fff7a2d787a9/rpds_py-0.28.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: 466bfe65bd932da36ff279ddd92de56b042f2266d752719beb97b08526268ec5 - requires_python: '>=3.9' -- pypi: https://files.pythonhosted.org/packages/f5/48/64cabb7daced2968dd08e8a1b7988bf358d7bd5bcd5dc89a652f4668543c/rpds_py-0.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + version: 0.28.0 + sha256: b8e1e9be4fa6305a16be628959188e4fd5cd6f1b0e724d63c6d8b2a8adf74ea6 + requires_python: '>=3.10' +- pypi: https://files.pythonhosted.org/packages/d3/03/ce566d92611dfac0085c2f4b048cd53ed7c274a5c05974b882a908d540a2/rpds_py-0.28.0-cp313-cp313-macosx_10_12_x86_64.whl name: rpds-py - version: 0.27.1 - sha256: cb56c6210ef77caa58e16e8c17d35c63fe3f5b60fd9ba9d424470c3400bcf9ed - requires_python: '>=3.9' + version: 0.28.0 + sha256: e9e184408a0297086f880556b6168fa927d677716f83d3472ea333b42171ee3b + requires_python: '>=3.10' - pypi: https://files.pythonhosted.org/packages/02/88/0ee4ca507d4aa05f67e292d2e5eb0b3e358fbcfe527554a2eda9ac422d6b/ruff-0.14.1-py3-none-win_amd64.whl name: ruff version: 0.14.1 @@ -10053,7 +10086,7 @@ packages: - types-requests ; extra == 'types' - types-setuptools ; extra == 'types' requires_python: '>=3.11' -- pypi: git+https://github.com/wpbonelli/xattree.git#5d5076318ea2278c38abbca5f499ef462f355bce +- pypi: git+https://github.com/wpbonelli/xattree.git#775f910c07ed8426d6a7cc704177cd4c59ecb397 name: xattree version: 0.1.0.dev0 requires_dist: @@ -10093,7 +10126,7 @@ packages: - pytest-cov ; extra == 'test' - pytest-xdist ; extra == 'test' - ruff ; extra == 'test' - requires_python: '>=3.11' + requires_python: '>=3.11,<3.14' - pypi: https://files.pythonhosted.org/packages/d6/7d/b77455d7c7c51255b2992b429107fab811b2e36ceaf76da1e55a045dc568/xyzservices-2025.4.0-py3-none-any.whl name: xyzservices version: 2025.4.0 diff --git a/pyproject.toml b/pyproject.toml index 600826e0..8d933ca4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,7 @@ test = [ "pytest-dotenv", "pytest-xdist", "pytest-benchmark", + "pytest-cov", ] build = ["build", "twine"] diff --git a/test/conftest.py b/test/conftest.py index 294565eb..b302391e 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,4 +1,8 @@ from pathlib import Path +from platform import system + +import pytest +from modflow_devtools.misc import is_in_ci pytest_plugins = ["modflow_devtools.fixtures"] @@ -8,6 +12,15 @@ EXCLUDED_EXAMPLES = [] +@pytest.fixture(scope="session", autouse=True) +def patch_macos_ci_matplotlib(): + # use noninteractive matplotlib backend if in Mac OS CI to avoid pytest-xdist node failure + if is_in_ci() and system().lower() == "darwin": + import matplotlib + + matplotlib.use("agg") + + def pytest_generate_tests(metafunc): if "example_script" in metafunc.fixturenames: scripts = { diff --git a/test/test_codec.py b/test/test_codec.py index cc670e48..8cc8d07f 100644 --- a/test/test_codec.py +++ b/test/test_codec.py @@ -1,5 +1,7 @@ from pprint import pprint +import pytest + from flopy4.mf6.codec import dumps, loads from flopy4.mf6.converter import COMPONENT_CONVERTER @@ -53,6 +55,7 @@ def test_dumps_ic(): pprint(loaded) +@pytest.mark.xfail(reason="TODO") def test_dumps_oc(): from flopy4.mf6.gwf import Oc @@ -67,6 +70,13 @@ def test_dumps_oc(): dumped = dumps(COMPONENT_CONVERTER.unstructure(oc)) print("OC dump:") print(dumped) + # TODO these are getting truncated, need to specify string length like