EnergySystemsModellingLab / EnergySystemsModellingLab/MUSE_OS
New(?) `xarray` warnings found in tests
- Langage dominant
- Python
- Étoiles
- 29
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Exécutez la suite de tests et inspectez src/muse/filters.py:482, ainsi que tests/test_filters.py, tests/test_trade.py et tests/test_subsector.py. Analysez les deux avertissements xarray pour en déterminer les causes et mettez à jour le code ou les tests concernés afin de résoudre les avertissements et de faire passer les tests pertinents sans erreur.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- testing-qa
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100