issues: 819937730
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
819937730 | MDU6SXNzdWU4MTk5Mzc3MzA= | 4985 | Tests fail when installing h5netcdf without netcdf4 | 31376402 | closed | 0 | 4 | 2021-03-02T11:42:13Z | 2021-07-17T21:04:59Z | 2021-07-17T21:04:59Z | CONTRIBUTOR | What happened: Created a new conda env for xarray as described in the contribution guide.
Then I installed the What you expected to happen: Tests should not fail if a package is not a requirement and the backends can operate independently. Minimal Complete Verifiable Example:
```python ======================================================================== FAILURES ========================================================================= ________ TestH5NetCDFAlreadyOpen.test_deepcopy ________ [gw0] darwin -- Python 3.8.8 /usr/local/anaconda3/envs/xarray/bin/python3.8 self = <xarray.tests.test_backends.TestH5NetCDFAlreadyOpen object at 0x11ce5d5e0>
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/tests/test_backends.py:2717: NameError ________ TestH5NetCDFAlreadyOpen.testopen_dataset_group _________ [gw1] darwin -- Python 3.8.8 /usr/local/anaconda3/envs/xarray/bin/python3.8 self = <xarray.tests.test_backends.TestH5NetCDFAlreadyOpen object at 0x11cfe6bb0>
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/tests/test_backends.py:2690: NameError _________ test_load_single_value_h5netcdf ___________ [gw0] darwin -- Python 3.8.8 /usr/local/anaconda3/envs/xarray/bin/python3.8
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/backends/api.py:105: ModuleNotFoundError During handling of the above exception, another exception occurred:
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/backends/api.py:110: ModuleNotFoundError During handling of the above exception, another exception occurred: tmp_path = PosixPath('/private/var/folders/9k/k5388g_s44b_97319sslv9c40000gn/T/pytest-of-Victor/pytest-3/popen-gw0/test_load_single_value_h5netcd0')
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/tests/test_backends.py:4993: /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/core/dataset.py:1689: in to_netcdf return to_netcdf( /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/backends/api.py:1052: in to_netcdf engine = _get_default_engine(path_or_file) /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/backends/api.py:145: in _get_default_engine engine = _get_default_engine_netcdf()
/Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/backends/api.py:114: ValueError ==================================================================== warnings summary ===================================================================== xarray/tests/test_accessor_str.py: 18 warnings /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/core/duck_array_ops.py:248: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison flag_array = (arr1 == arr2) | (isnull(arr1) & isnull(arr2)) xarray/tests/test_dataset.py::TestDataset::test_resample_loffset /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/tests/test_dataset.py:3904: FutureWarning: 'loffset' in .resample() and in Grouper() is deprecated.
becomes:
xarray/tests/test_dataarray.py::TestDataArray::test_resample /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/tests/test_dataarray.py:2994: FutureWarning: 'loffset' in .resample() and in Grouper() is deprecated.
becomes:
xarray/tests/test_dataarray.py::TestDataArray::test_polyfit[True-False] xarray/tests/test_dataarray.py::TestDataArray::test_polyfit[False-False] /Users/Victor/Documents/ProjectsDev/Qblox/xarray/xarray/core/dataset.py:6396: RuntimeWarning: overflow encountered in multiply scale = np.sqrt((lhs * lhs).sum(axis=0)) -- Docs: https://docs.pytest.org/en/stable/warnings.html ================================================================= short test summary info ================================================================= FAILED xarray/tests/test_backends.py::TestH5NetCDFAlreadyOpen::test_deepcopy - NameError: name 'nc4' is not defined FAILED xarray/tests/test_backends.py::TestH5NetCDFAlreadyOpen::test_open_dataset_group - NameError: name 'nc4' is not defined FAILED xarray/tests/test_backends.py::test_load_single_value_h5netcdf - ValueError: cannot read or write netCDF files without netCDF4-python or scipy in... ============================== 3 failed, 3474 passed, 4472 skipped, 65 xfailed, 17 xpassed, 22 warnings in 66.86s (0:01:06) =============================== ``` Anything else we need to know?: Tests still fail when installing They only pass after installing both Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: 48378c4b11c5c2672ff91396d4284743165b4fbe python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:12:38) [Clang 11.0.1 ] python-bits: 64 OS: Darwin OS-release: 18.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.12.0 libnetcdf: None xarray: 0.17.1.dev3+g48378c4b pandas: 1.2.2 numpy: 1.20.1 scipy: None netCDF4: None pydap: None h5netcdf: 0.10.0 h5py: 3.1.0 Nio: None zarr: None cftime: 1.4.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: None cartopy: None seaborn: None numbagg: None pint: None setuptools: 49.6.0.post20210108 pip: 21.0.1 conda: None pytest: 6.2.2 IPython: None sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4985/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |