MUSE_OS
MUSE_OS copied to clipboard
New(?) `xarray` warnings found in tests
trafficstars
When running the test suite locally I see the following warnings which I haven't noticed before:
tests/test_filters.py: 1 warning
tests/test_trade.py: 14 warnings
tests/test_subsector.py: 1 warning
/home/alex/code/MUSE_OS/src/muse/filters.py:482: UserWarning: rename 'technology' to 'asset' does not create an index anymore. Try using swap_dims instead or use set_index after rename to create an indexed coordinate.
.rename(technology="asset")
tests/test_trade.py::test_power_sector_some_investment
tests/test_subsector.py::test_subsector_noninvesting_aggregation
/home/alex/code/MUSE_OS/.venv/lib/python3.12/site-packages/xarray/core/dataset.py:4744: UserWarning: No index created for dimension agent because variable agent is not a coordinate. To create an index for agent, please first call `.set_coords('agent')` on this object.
warnings.warn(
The first one seems to be from within the "actual" code, rather than just the test, and I'm not sure about the second.
I'm using Python 3.12 with xarray 2024.6.0.