Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly build is failing #3473

Open
github-actions bot opened this issue Apr 10, 2024 · 3 comments
Open

Nightly build is failing #3473

github-actions bot opened this issue Apr 10, 2024 · 3 comments
Labels
Type: Maintenance Updates and clean ups (but not wrong)

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2024

The Nightly workflow is failing.
The tests failed.
Log:

============================= test session starts ==============================
platform linux -- Python 3.12.4, pytest-8.3.2, pluggy-1.5.0
Matplotlib: 3.9.1.post1
Freetype: 2.6.1
Dep Versions: Cartopy: 0.23.0, Dask: 2024.7.1, Matplotlib: 3.9.1.post1, Numpy: 2.0.1,
	Pandas: 2.2.2, Pint: 0.24.3.dev3+g0b0ae61, Pooch: v1.8.2, Pyproj: 3.6.1,
	Scipy: 1.14.0, Shapely: 2.0.5, Traitlets: 5.14.3, Xarray: 2024.7.1.dev12+gb22c4296
rootdir: /home/runner/work/MetPy/MetPy
configfile: pyproject.toml
plugins: mpl-0.17.0
collected 1534 items

tests/calc/test_basic.py ............................................... [ 3%]
........................................................................ [ 7%]
....................... [ 9%]
tests/calc/test_calc_tools.py .......................................... [ 11%]
........................................................................ [ 16%]
........................................... [ 19%]
tests/calc/test_cross_sections.py ............. [ 20%]
tests/calc/test_indices.py ............................ [ 22%]
tests/calc/test_kinematics.py .......................................... [ 24%]
...................................... [ 27%]
tests/calc/test_thermo.py .............................................. [ 30%]
........................................................................ [ 35%]
........................................................................ [ 39%]
........................... [ 41%]
tests/calc/test_turbulence.py ........................... [ 43%]
tests/interpolate/test_geometry.py ............. [ 44%]
tests/interpolate/test_grid.py ...................................... [ 46%]
tests/interpolate/test_interpolate_tools.py ....... [ 47%]
tests/interpolate/test_one_dimension.py ................... [ 48%]
tests/interpolate/test_points.py ........................ [ 49%]
tests/interpolate/test_slices.py ........ [ 50%]
tests/io/test_gempak.py ................................. [ 52%]
tests/io/test_gini.py .................. [ 53%]
tests/io/test_metar.py ........................................ [ 56%]
tests/io/test_nexrad.py ................................................ [ 59%]
........................................................................ [ 64%]
....................................................... [ 67%]
tests/io/test_station_data.py ...... [ 68%]
tests/io/test_text.py .... [ 68%]
tests/io/test_tools.py .. [ 68%]
tests/plots/test_cartopy_utils.py ....... [ 68%]
tests/plots/test_ctables.py .......... [ 69%]
tests/plots/test_declarative.py .........F.....F.............F.......... [ 72%]
........................................ [ 74%]
tests/plots/test_mapping.py ...........xx........... [ 76%]
tests/plots/test_mpl.py . [ 76%]
tests/plots/test_patheffects.py ........ [ 76%]
tests/plots/test_plot_areas.py ..... [ 77%]
tests/plots/test_skewt.py .................................... [ 79%]
tests/plots/test_station_plot.py .......................... [ 81%]
tests/plots/test_util.py .............. [ 82%]
tests/plots/test_wx_symbols.py .... [ 82%]
tests/test_cbook.py .. [ 82%]
tests/test_deprecation.py . [ 82%]
tests/test_packaging.py . [ 82%]
tests/test_testing.py ........ [ 83%]
tests/test_xarray.py ................................................... [ 86%]
........................................................................ [ 91%]
........................................................................ [ 96%]
..................... [ 97%]
tests/units/test_units.py .....................................x.. [100%]

=================================== FAILURES ===================================
________________________ test_declarative_smooth_field _________________________
Error: Image files did not match.
RMS Value: 0.03295017884191656
Expected:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/baseline.png
Actual:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/result.png
Difference:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/result-failed-diff.png
Tolerance:
0.031
___________________________ test_declarative_events ____________________________

args = (), kwargs = {}

def wrapper(*args, **kwargs):
  store.return_value[test_name] = obj(*args, **kwargs)

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/pytest_mpl/plugin.py:125:


/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/testing.py:127: in wrapped
return test_func(*args, **kwargs)
tests/plots/test_declarative.py:505: in test_declarative_events
pc.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:187: in draw
panel.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:511: in draw
p.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:891: in draw
self._build()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:1020: in _build
self.handle = self.parent.ax.imshow(imdata, **kwargs)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/mpl/geoaxes.py:307: in wrapper
return func(self, *args, **kwargs)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/mpl/geoaxes.py:1314: in imshow
img, extent = warp_array(img,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/img_transform.py:182: in warp_array
source_native_xy = mesh_projection(source_proj, nx, ny,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/img_transform.py:77: in mesh_projection
x, xstep = np.linspace(x_lower, x_upper, nx, retstep=True,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/numpy/_core/function_base.py:189: in linspace
y = conv.wrap(y.astype(dtype, copy=False))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/dataarray.py:4704: in array_wrap
new_var = self.variable.array_wrap(obj, context)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/variable.py:2295: in array_wrap
return Variable(self.dims, obj)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/variable.py:398: in init
super().init(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/namedarray/core.py:264: in init
self._dims = self._parse_dimensions(dims)


self = <[AttributeError("'Variable' object has no attribute '_dims'") raised in repr()] Variable object at 0x7efc30b2a3e0>
dims = ()

def _parse_dimensions(self, dims: _DimsLike) -> _Dims:
    dims = (dims,) if isinstance(dims, str) else tuple(dims)
    if len(dims) != self.ndim:
      raise ValueError(
            f"dimensions {dims} must have the same length as the "
            f"number of data dimensions, ndim={self.ndim}"
        )

E ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/namedarray/core.py:508: ValueError
_________________________________ test_latlon __________________________________

args = (), kwargs = {}

def wrapper(*args, **kwargs):
  store.return_value[test_name] = obj(*args, **kwargs)

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/pytest_mpl/plugin.py:125:


/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/testing.py:127: in wrapped
return test_func(*args, **kwargs)
tests/plots/test_declarative.py:852: in test_latlon
pc.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:187: in draw
panel.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:511: in draw
p.draw()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:891: in draw
self._build()
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/metpy/plots/declarative.py:1020: in _build
self.handle = self.parent.ax.imshow(imdata, **kwargs)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/mpl/geoaxes.py:307: in wrapper
return func(self, *args, **kwargs)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/mpl/geoaxes.py:1314: in imshow
img, extent = warp_array(img,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/img_transform.py:182: in warp_array
source_native_xy = mesh_projection(source_proj, nx, ny,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/img_transform.py:79: in mesh_projection
y, ystep = np.linspace(y_lower, y_upper, ny, retstep=True,
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/numpy/_core/function_base.py:189: in linspace
y = conv.wrap(y.astype(dtype, copy=False))
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/dataarray.py:4704: in array_wrap
new_var = self.variable.array_wrap(obj, context)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/variable.py:2295: in array_wrap
return Variable(self.dims, obj)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/core/variable.py:398: in init
super().init(
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/namedarray/core.py:264: in init
self._dims = self._parse_dimensions(dims)


self = <[AttributeError("'Variable' object has no attribute '_dims'") raised in repr()] Variable object at 0x7efc2f151f00>
dims = ()

def _parse_dimensions(self, dims: _DimsLike) -> _Dims:
    dims = (dims,) if isinstance(dims, str) else tuple(dims)
    if len(dims) != self.ndim:
      raise ValueError(
            f"dimensions {dims} must have the same length as the "
            f"number of data dimensions, ndim={self.ndim}"
        )

E ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1

/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/xarray/namedarray/core.py:508: ValueError
=========================== short test summary info ============================
FAILED tests/plots/test_declarative.py::test_declarative_smooth_field - Failed: Error: Image files did not match.
RMS Value: 0.03295017884191656
Expected:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/baseline.png
Actual:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/result.png
Difference:
/home/runner/work/MetPy/MetPy/test_output/test_declarative.test_declarative_smooth_field/result-failed-diff.png
Tolerance:
0.031
FAILED tests/plots/test_declarative.py::test_declarative_events - ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1
FAILED tests/plots/test_declarative.py::test_latlon - ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1
============ 3 failed, 1528 passed, 3 xfailed in 523.97s (0:08:43) =============

The documentation build failed.
Log:

python override_check.py
Override check successful.
Running Sphinx v7.3.7
making output directory... done
Using Sphinx-Gallery to convert rst text blocks to markdown for .ipynb files.
[autosummary] generating autosummary for: api/index.rst, api/references.rst, devel/CONTRIBUTING.md, devel/index.rst, devel/infrastructureguide.rst, devel/roadmap.rst, index.rst, userguide/SUPPORT.md, userguide/apichange.rst, userguide/citing.rst, userguide/gempak.rst, userguide/index.rst, userguide/installguide.rst, userguide/media.rst, userguide/startingguide.rst, userguide/upgradeguide.rst
[autosummary] generating autosummary for: /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.constants.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.interpolate.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.io.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.ctables.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.units.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.xarray.rst
[autosummary] generating autosummary for: /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.absolute_momentum.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.absolute_vorticity.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.add_height_to_pressure.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.add_pressure_to_height.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.advection.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.ageostrophic_wind.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.altimeter_to_sea_level_pressure.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.altimeter_to_station_pressure.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.angle_to_direction.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.calc.apparent_temperature.rst, ..., /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.convert_gempak_color.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.ctables.ColortableRegistry.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.ctables.colortables.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.ctables.convert_gempak_table.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.ctables.read_colortable.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.read_colortable.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.plots.wx_code_to_numeric.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.units.pandas_dataframe_to_unit_arrays.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.units.setup_registry.rst, /home/runner/work/MetPy/MetPy/docs/api/generated/metpy.xarray.grid_deltas_from_dataarray.rst
loading intersphinx inventory from https://scitools.org.uk/cartopy/docs/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/stable/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/docs/objects.inv...
loading intersphinx inventory from https://pint.readthedocs.io/en/stable/objects.inv...
loading intersphinx inventory from https://pyproj4.github.io/pyproj/stable/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/objects.inv...
loading intersphinx inventory from https://docs.xarray.dev/en/stable/objects.inv...
generating gallery...
generating gallery for examples... [ 12%] XArray_Projections.py
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_coastline.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_lakes.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/10m_physical/ne_10m_rivers_lake_centerlines.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
generating gallery for examples... [ 25%] sigma_to_pressure_interpolation.py
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_physical/ne_50m_coastline.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/10m_cultural/ne_10m_admin_1_states_provinces_lakes.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
generating gallery for examples... [ 38%] Advanced_Sounding.py
generating gallery for examples... [ 50%] cross_section.py
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_cultural/ne_50m_admin_1_states_provinces_lakes.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
generating gallery for examples... [ 62%] Four_Panel_Map.py
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/cartopy/io/__init__.py:241: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_cultural/ne_50m_admin_0_boundary_lines_land.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
generating gallery for examples... [ 75%] isentropic_example.py
generating gallery for examples... [ 88%] meteogram_metpy.py

Warning, treated as error:

../examples/meteogram_metpy.py unexpectedly failed to execute correctly:

Traceback (most recent call last):
  File "/home/runner/work/MetPy/MetPy/examples/meteogram_metpy.py", line 187, in <module>
    testdata = np.genfromtxt(get_test_data('timeseries.csv', False), names=True, dtype=None,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/numpy/lib/_npyio_impl.py", line 2243, in genfromtxt
    converters[i].update(user_conv, locked=True,
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/numpy/lib/_iotools.py", line 804, in update
    tester = func(testing_value or '1')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/MetPy/MetPy/examples/meteogram_metpy.py", line 184, in parse_date
    return dt.datetime.strptime(date.decode('ascii'), '%Y-%m-%d %H:%M:%S')
                                ^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

make: *** [Makefile:34: html] Error 2


Linkchecker output:

@github-actions github-actions bot added the Type: Maintenance Updates and clean ups (but not wrong) label Apr 10, 2024
@dopplershift
Copy link
Member

Just minor differences in the underlying image edges in test_declarative_events with Matplotlib 3.9.0rc2. Diff:

result-failed-diff

Probably should just regenerate for Matplotlib 3.9, set a higher threshold for older versions. Unfortunately, Matplotlib 3.9 is requiring Numpy >=2.0.0rc1 to build, so we're not getting conda-forge packages any time soon.

@winash12
Copy link

https://github.com/winash12/MetPy/actions/runs/10019131680/job/27695339552 I am getting a nightly build failing again.

@dopplershift
Copy link
Member

Looks like this is due to numpy 2, as this is showing up on the doc builds in #3578. We'll fix it over there in getting numpy 2 included in our CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Updates and clean ups (but not wrong)
Projects
None yet
Development

No branches or pull requests

2 participants