From 29daac86a04c95dc1100a425df6e47fd9f55f6a5 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Thu, 6 Jul 2023 18:01:38 +0200 Subject: [PATCH 1/3] updated xugrid and meshkernel requirements --- requirements.txt | 8 ++++---- setup.cfg | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index d0b9ae382..97b560917 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ scipy<1.10.0 numpy matplotlib -pandas<2.0.0 +pandas shapely>=1.7.0 geopandas contextily -xarray<2023.3.0 +xarray dask netcdf4>=1.5.3 bottleneck -xugrid>=0.4.0 +xugrid>=0.6.0 cdsapi pydap>=3.3.0 hydrolib-core>=0.5.1 -meshkernel>=2.0.2 +meshkernel>=2.1.0 diff --git a/setup.cfg b/setup.cfg index 6e8118772..870da947a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,21 +29,19 @@ install_requires = scipy<1.10.0 numpy matplotlib - #install pandas<2.0.0 to avoid conflict with xarray<2023.3.0: https://github.com/Deltares/xugrid/issues/78#issuecomment-1597723955 - pandas<2.0.0 + pandas shapely>=1.7.0 geopandas contextily - #install xarray<2023.3.0 to avoid issue: https://github.com/Deltares/xugrid/issues/78 - xarray<2023.3.0 + xarray dask netcdf4>=1.5.3 bottleneck - xugrid>=0.4.0 + xugrid>=0.6.0 cdsapi pydap>=3.3.0 hydrolib-core>=0.5.1 - meshkernel>=2.0.2 + meshkernel>=2.1.0 packages = find: include_package_data = True zip_safe = False From c4a439cbdbe4009f0fe3533f15c43c9bbc47d159 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Thu, 6 Jul 2023 18:47:35 +0200 Subject: [PATCH 2/3] excluded xugrid 0.6.0 because of a bug https://github.com/Deltares/xugrid/issues/113 --- requirements.txt | 6 +++--- setup.cfg | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 97b560917..c379c28cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ scipy<1.10.0 numpy matplotlib -pandas +pandas<2.0.0 shapely>=1.7.0 geopandas contextily -xarray +xarray<2023.3.0 dask netcdf4>=1.5.3 bottleneck -xugrid>=0.6.0 +xugrid<0.6.0 cdsapi pydap>=3.3.0 hydrolib-core>=0.5.1 diff --git a/setup.cfg b/setup.cfg index 870da947a..a2520d277 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,15 +29,18 @@ install_requires = scipy<1.10.0 numpy matplotlib - pandas + #install pandas<2.0.0 to avoid conflict with xarray<2023.3.0: https://github.com/Deltares/xugrid/issues/78#issuecomment-1597723955 (solved from xugrid 0.6.0, but has another bug) + pandas<2.0.0 shapely>=1.7.0 geopandas contextily - xarray + #install xarray<2023.3.0 to avoid issue: https://github.com/Deltares/xugrid/issues/78 (solved from xugrid 0.6.0, but has another bug) + xarray<2023.3.0 dask netcdf4>=1.5.3 bottleneck - xugrid>=0.6.0 + #install xugrid<0.6.0 to avoid issue: https://github.com/Deltares/xugrid/issues/113 + xugrid<0.6.0 cdsapi pydap>=3.3.0 hydrolib-core>=0.5.1 From f6db935ca291fc3fda8f767925222d036bbf95b0 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Thu, 6 Jul 2023 18:58:14 +0200 Subject: [PATCH 3/3] improved formatting --- tests/test_external_packages.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/test_external_packages.py b/tests/test_external_packages.py index df0d2950b..1cc458e1d 100644 --- a/tests/test_external_packages.py +++ b/tests/test_external_packages.py @@ -27,7 +27,10 @@ def test_import_shapely(): @pytest.mark.systemtest -def test_xugrid_opendataset_ugridplot(): #this one fails with xarray>=2023.3.0: https://github.com/Deltares/xugrid/issues/78 +def test_xugrid_opendataset_ugridplot(): + """ + this one fails with xarray>=2023.3.0: https://github.com/Deltares/xugrid/issues/78 + """ file_nc = os.path.join(dir_testinput,'DFM_curvedbend_3D/cb_3d_map.nc') uds = xu.open_dataset(file_nc,chunks={'time':1}) @@ -36,8 +39,9 @@ def test_xugrid_opendataset_ugridplot(): #this one fails with xarray>=2023.3.0: @pytest.mark.unittest -def test_xarray_pandas_resample(): #this one fails with xarray<2023.3.0 (required for test_opendataset_ugridplot()) and pandas>1.5.3: https://github.com/Deltares/xugrid/issues/78#issuecomment-1597723955 +def test_xarray_pandas_resample(): """ + this one fails with xarray<2023.3.0 (required for test_opendataset_ugridplot()) and pandas>1.5.3: https://github.com/Deltares/xugrid/issues/78#issuecomment-1597723955 pandas 1.5.3 works with xarray<2023.3.0 pandas 2.0.* fails with xarray<2023.3.0 pandas 2.0.* works with xarray==2023.5.0 @@ -47,7 +51,10 @@ def test_xarray_pandas_resample(): #this one fails with xarray<2023.3.0 (require @pytest.mark.unittest -def test_xarray_interp_to_newdim(): #this one fails with scipy>=1.10.0: https://github.com/pydata/xarray/issues/7701 +def test_xarray_interp_to_newdim(): + """ + this one fails with scipy>=1.10.0: https://github.com/pydata/xarray/issues/7701 + """ ds = xr.Dataset() so_np = np.array([[[35.819576, 35.82568 , 35.82873 ], [35.819576, 35.824154, 35.831783],