Repository navigation
Mvgarcia/solar historical tests - #162
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new tests contain Ruff violations, and the annual-mean implementation includes misleading NaN documentation.
Review effort: Balanced
Findings: 3
Open (4)
What changed in this PR
Adds historical solar generator coverage and updates annual-mean handling to retain cube metadata.
Changes:
- Adds shared solar cube fixtures and unit/end-to-end tests.
- Returns annual means as an Iris cube.
- Removes obsolete piControl test coverage.
| File | Description |
|---|---|
tests/test_cli.py |
Limits CLI coverage to historical solar. |
tests/test_access_esm1p6_solar.py |
Removes the previous solar tests. |
tests/models/generators/solar/test_common.py |
Adds solar helper tests. |
tests/models/generators/solar/test_access_esm1p6_solar.py |
Adds historical generation coverage. |
tests/conftest.py |
Adds a reusable solar cube fixture. |
solar/_common.py |
Preserves year coordinates through aggregation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@mvgarcia The review added very minor points but still relevant, so please address them. I am reviewing it as well. |
There was a problem hiding this comment.
Thank you @mvgarcia for working on this!
The tests overall look pretty good!
I would have some suggestions, but I think it's probably easier and quicker if I add the commits directlu and then I'll comment with the changes.
For the overall suggestions that I will implement:
- iris warnings
Running pytest there are several iris warnings catched. Most of these warnings can be silenced by adding some future implementations of iris:
iris.FUTURE.save_split_attrs = True
iris.FUTURE.date_microseconds = True
-
Eclude main.py from coverage
The main.py file is not tested as it's the main entry-point for the package. However, it should be omitted from the coverage report -
General reordering of functions/tests


Added the tests for the solar historical functions. All tests pass. Pending on the Nan replacement discussion on the CMIP7 meeting