generated from openclimatefix/ocf-template
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
contributions-welcomeGood issues for open-source contributionGood issues for open-source contributiongood first issueGood for newcomersGood for newcomers
Description
Detailed Description
There's currently a lot of warnings in the CI.
Context
- got to get ride of warnings, as they can cause code to break in the future
Possible Implementation
Current warnings in CI
.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:323
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pydantic/_internal/_config.py:323: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/
warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
tests/torch_datasets/sample/test_base.py:17
/__w/ocf-data-sampler/ocf-data-sampler/tests/torch_datasets/sample/test_base.py:17: PytestCollectionWarning: cannot collect test class 'TestSample' because it has a __init__ constructor (from: tests/torch_datasets/sample/test_base.py)
class TestSample(SampleBase):
tests/config/test_config.py::test_extra_field_error
tests/config/test_config.py::test_incorrect_interval_start_minutes
tests/config/test_config.py::test_incorrect_interval_end_minutes
tests/config/test_config.py::test_incorrect_nwp_provider
tests/config/test_config.py::test_incorrect_dropout
tests/config/test_config.py::test_incorrect_dropout_fraction
tests/config/test_config.py::test_accum_channels_validation
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pydantic/main.py:463: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Expected `list[float]` - serialized value may not be as expected [input_value=0, input_type=int])
return self.__pydantic_serializer__.to_python(
tests/config/test_save.py::test_save_yaml_configuration_basic
tests/config/test_save.py::test_save_load_yaml_configuration
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pydantic/main.py:519: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Expected `list[float]` - serialized value may not be as expected [input_value=0, input_type=int])
return self.__pydantic_serializer__.to_json(
tests/load/test_load_gsp.py: 2 warnings
tests/load/test_load_nwp.py: 9 warnings
tests/load/test_load_satellite.py: 2 warnings
tests/load/test_open_xarray_tensorstore.py: 2 warnings
tests/test_utils.py: 1 warning
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/zarr/api/asynchronous.py:233: ZarrUserWarning: Consolidated metadata is currently not part in the Zarr format 3 specification. It may not be supported by other zarr implementations and may change in the future.
warnings.warn(
tests/load/test_load_gsp.py::test_open_gsp_bad_dtype
/__w/ocf-data-sampler/ocf-data-sampler/tests/load/test_load_gsp.py:51: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
"datetime_gmt": pd.to_datetime(pd.date_range("2023-01-01", periods=10, freq="30T")),
tests/load/test_load_nwp.py::test_load_ukv
tests/load/test_load_nwp.py::test_load_ecmwf
tests/load/test_open_xarray_tensorstore.py::test_open_zarr
tests/load/test_open_xarray_tensorstore.py::test_open_zarr
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/zarr/core/dtype/npy/string.py:248: UnstableSpecificationWarning: The data type (FixedLengthUTF32(length=5, endianness='little')) does not have a Zarr V3 specification. That means that the representation of arrays saved with this data type may change without warning in a future version of Zarr Python. Arrays stored with this data type may be unreadable by other Zarr libraries. Use this data type at your own risk! Check https://github.com/zarr-developers/zarr-extensions/tree/main/data-types for the status of data type specifications for Zarr V3.
v3_unstable_dtype_warning(self)
tests/load/test_load_nwp.py::test_load_icon_eu
tests/load/test_load_nwp.py::test_load_icon_eu
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/zarr/core/dtype/npy/string.py:248: UnstableSpecificationWarning: The data type (FixedLengthUTF32(length=9, endianness='little')) does not have a Zarr V3 specification. That means that the representation of arrays saved with this data type may change without warning in a future version of Zarr Python. Arrays stored with this data type may be unreadable by other Zarr libraries. Use this data type at your own risk! Check https://github.com/zarr-developers/zarr-extensions/tree/main/data-types for the status of data type specifications for Zarr V3.
v3_unstable_dtype_warning(self)
tests/load/test_load_nwp.py::test_load_icon_eu
/__w/ocf-data-sampler/ocf-data-sampler/ocf_data_sampler/load/nwp/providers/utils.py:56: FutureWarning: In a future version of xarray the default value for coords will change from coords='different' to coords='minimal'. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set coords explicitly.
ds = xr.open_mfdataset(
tests/load/test_load_nwp.py::test_load_cloudcasting
tests/load/test_load_satellite.py::test_open_satellite
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/zarr/core/dtype/npy/string.py:248: UnstableSpecificationWarning: The data type (FixedLengthUTF32(length=6, endianness='little')) does not have a Zarr V3 specification. That means that the representation of arrays saved with this data type may change without warning in a future version of Zarr Python. Arrays stored with this data type may be unreadable by other Zarr libraries. Use this data type at your own risk! Check https://github.com/zarr-developers/zarr-extensions/tree/main/data-types for the status of data type specifications for Zarr V3.
v3_unstable_dtype_warning(self)
tests/load/test_load_nwp.py::test_load_ecmwf_bad_dtype_latitude
tests/load/test_load_nwp.py::test_load_ecmwf_bad_dtype_init_time
tests/load/test_load_nwp.py::test_load_ecmwf_bad_dtype_step
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/zarr/core/dtype/npy/string.py:248: UnstableSpecificationWarning: The data type (FixedLengthUTF32(length=1, endianness='little')) does not have a Zarr V3 specification. That means that the representation of arrays saved with this data type may change without warning in a future version of Zarr Python. Arrays stored with this data type may be unreadable by other Zarr libraries. Use this data type at your own risk! Check https://github.com/zarr-developers/zarr-extensions/tree/main/data-types for the status of data type specifications for Zarr V3.
v3_unstable_dtype_warning(self)
tests/load/test_load_satellite.py::test_open_satellite_bad_dtype
/__w/ocf-data-sampler/ocf-data-sampler/tests/load/test_load_satellite.py:38: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
"time": pd.to_datetime(pd.date_range("2023-01-01", periods=10, freq="5T")),
tests/load/test_load_sites.py::test_open_site_bad_dtype
/__w/ocf-data-sampler/ocf-data-sampler/tests/load/test_load_sites.py:35: FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
"time_utc": pd.to_datetime(pd.date_range("2023-01-01", periods=10, freq="30T")),
tests/numpy_sample/test_collate.py: 1 warning
tests/torch_datasets/sample/test_uk_regional_sample.py: 7 warnings
tests/torch_datasets/test_pvnet_uk.py: 7 warnings
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pydantic/main.py:519: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Expected `str` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...-0/data0/test_sat.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `tuple[str]` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...-0/data0/test_sat.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `list[str]` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...-0/data0/test_sat.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `str` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...t-0/data0/ukv_nwp.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `tuple[str]` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...t-0/data0/ukv_nwp.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `list[str]` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...t-0/data0/ukv_nwp.zarr'), input_type=PosixPath])
PydanticSerializationUnexpectedValue(Expected `str` - serialized value may not be as expected [input_value=PosixPath('/tmp/pytest-of...st-0/data0/uk_gsp.zarr'), input_type=PosixPath])
return self.__pydantic_serializer__.to_json(
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
tests/torch_datasets/test_pvnet_uk.py::test_solar_position_decoupling
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pyproj/transformer.py:816: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
return self._transformer._transform_point(
tests/torch_datasets/test_site.py::test_site
tests/torch_datasets/test_site.py::test_site_time_filter_start
tests/torch_datasets/test_site.py::test_site_time_filter_end
tests/torch_datasets/test_site.py::test_site_dataset_with_dataloader
tests/torch_datasets/test_site.py::test_solar_position_decoupling_site
tests/torch_datasets/test_time_slice_for_dataset.py::test_time_slice_for_dataset_site_dropout
/__w/ocf-data-sampler/ocf-data-sampler/.venv/lib/python3.11/site-packages/pydantic/main.py:519: UserWarning: Pydantic serializer warnings:
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Expected `list[float]` - serialized value may not be as expected [input_value=0, input_type=int])
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Expected `list[float]` - serialized value may not be as expected [input_value=0, input_type=int])
PydanticSerializationUnexpectedValue(Unexpected Value)
PydanticSerializationUnexpectedValue(Expected `list[float]` - serialized value may not be as expected [input_value=0, input_type=int])
return self.__pydantic_serializer__.to_json(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Metadata
Metadata
Assignees
Labels
contributions-welcomeGood issues for open-source contributionGood issues for open-source contributiongood first issueGood for newcomersGood for newcomers