SalishSeaCast / SalishSeaNowcast

Python package associated with running the SalishSeaCast NEMO and other ocean models in near-real-time to produce daily nowcasts/forecasts
https://salishsea.eos.ubc.ca/nemo/
Apache License 2.0
4 stars 3 forks source link

TypeError in get_onc_ferry worker #174

Closed douglatornell closed 6 months ago

douglatornell commented 1 year ago

Appearing in GHA pytest-with-coverage workflow. Traceback:

    tests/workers/test_get_onc_ferry.py:156: in <module>
        class TestResampleNavCoord:
    tests/workers/test_get_onc_ferry.py:171: in TestResampleNavCoord
        resampled_coord = get_onc_ferry._resample_nav_coord(
    nowcast/workers/get_onc_ferry.py:204: in _resample_nav_coord
        resampled_coord = (nav_data[coord].resample(sampleTime="1Min").mean()).rename(
    /usr/share/miniconda3/envs/salishsea-nowcast-test/lib/python3.10/site-packages/xarray/core/dataarray.py:6654: in resample
        return self._resample(
    /usr/share/miniconda3/envs/salishsea-nowcast-test/lib/python3.10/site-packages/xarray/core/common.py:975: in _resample
        grouper = pd.Grouper(
    /usr/share/miniconda3/envs/salishsea-nowcast-test/lib/python3.10/site-packages/pandas/core/resample.py:1663: in __init__
        super().__init__(freq=freq, axis=axis, **kwargs)
    E   TypeError: Grouper.__init__() got an unexpected keyword argument 'base'

Seems to have started when GHA test env started using pandas=2.0.0.

douglatornell commented 6 months ago

Fixed as part of PR #234