Skip to content

Mvgarcia/solar historical tests - #162

Merged
atteggiani merged 16 commits into
new_mainfrom
mvgarcia/solar-historical-tests
Sep 30, 2026
Merged

atteggiani merged 16 commits into
new_mainfrom
mvgarcia/solar-historical-tests

Conversation

@mvgarcia

@mvgarcia mvgarcia commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

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

@mvgarcia
mvgarcia requested a review from atteggiani September 29, 2026 03:36
@atteggiani
atteggiani changed the base branch from main to new_main September 29, 2026 03:43
@atteggiani
atteggiani requested a balanced review from Copilot September 29, 2026 05:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity · 1 Low severity

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.

Comment thread tests/conftest.py Outdated
Comment thread tests/models/generators/solar/test_access_esm1p6_solar.py Outdated
Comment thread tests/models/generators/solar/test_common.py Outdated
@atteggiani

Copy link
Copy Markdown
Collaborator

@mvgarcia
I asked copilot to review since I had credit and they're resetting soon.

The review added very minor points but still relevant, so please address them.

I am reviewing it as well.

@atteggiani atteggiani left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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
  1. 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

  2. General reordering of functions/tests

@atteggiani
atteggiani merged commit e7090c4 into new_main Sep 30, 2026
1 of 2 checks passed
@atteggiani
atteggiani deleted the mvgarcia/solar-historical-tests branch September 30, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants