EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
New(?) `xarray` warnings found in tests
- 主要言語
- Python
- スター
- 29
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
テストスイートを実行し、src/muse/filters.py:482 と、tests/test_filters.py、tests/test_trade.py、tests/test_subsector.py を調査してください。2 つの xarray 警告を追跡して原因を特定し、警告が解消され、関連するテストが警告なしで成功するように、影響を受けるコードまたはテストを更新してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100