iiasa / message-ix-models

Tools for the MESSAGEix-GLOBIOM family of models
https://docs.messageix.org/models
Apache License 2.0
16 stars 31 forks source link

Miscellaneous improvements for 2024-W10 #156

Closed khaeru closed 3 months ago

khaeru commented 3 months ago

Housekeeping/CI:

How to review

Read the diff and note that the CI checks all pass.

PR checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 92.61364% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 75.6%. Comparing base (583d3e9) to head (3b7bb24). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #156 +/- ## ======================================= + Coverage 75.4% 75.6% +0.1% ======================================= Files 93 93 Lines 6211 6372 +161 ======================================= + Hits 4684 4818 +134 - Misses 1527 1554 +27 ``` | [Files](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa) | Coverage Δ | | |---|---|---| | [message\_ix\_models/\_\_init\_\_.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvX19pbml0X18ucHk=) | `100.0% <100.0%> (ø)` | | | [message\_ix\_models/model/\_\_init\_\_.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvX19pbml0X18ucHk=) | `100.0% <ø> (ø)` | | | [message\_ix\_models/model/bare.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvYmFyZS5weQ==) | `100.0% <100.0%> (ø)` | | | [message\_ix\_models/model/disutility.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvZGlzdXRpbGl0eS5weQ==) | `100.0% <100.0%> (ø)` | | | [message\_ix\_models/model/macro.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvbWFjcm8ucHk=) | `100.0% <ø> (ø)` | | | [message\_ix\_models/model/snapshot.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvc25hcHNob3QucHk=) | `100.0% <ø> (ø)` | | | [message\_ix\_models/model/structure.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvc3RydWN0dXJlLnB5) | `100.0% <100.0%> (ø)` | | | [...ssage\_ix\_models/model/water/data/infrastructure.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvbW9kZWwvd2F0ZXIvZGF0YS9pbmZyYXN0cnVjdHVyZS5weQ==) | `4.0% <ø> (ø)` | | | [message\_ix\_models/project/ssp/\_\_init\_\_.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvcHJvamVjdC9zc3AvX19pbml0X18ucHk=) | `94.7% <ø> (-0.2%)` | :arrow_down: | | [message\_ix\_models/project/ssp/structure.py](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa#diff-bWVzc2FnZV9peF9tb2RlbHMvcHJvamVjdC9zc3Avc3RydWN0dXJlLnB5) | `100.0% <ø> (ø)` | | | ... and [40 more](https://app.codecov.io/gh/iiasa/message-ix-models/pull/156?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iiasa) | |
khaeru commented 3 months ago

@glatterf42 FYI I ran into some dependency trouble here:

  1. For upstream.version <= v3.6.0 in the pytest workflow, we require pandas < 2.0.
  2. message_ix_models.tools.iea.web imports dask.dataframe.
  3. In recent versions of dask ≥ 2024.3.0, dask[dataframe] must be explicitly installed to bring in dask-expr and import dask.dataframe.
  4. dask-expr (any version) requires pandas > 2, which conflicts with (1).

This is the same root cause we ran into with iiasa/ixmp#522. Here I (think I have) resolved it by capping the dask version in upstream.extra-deps in the workflow.