Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less repetition in schemes testing #269

Closed
wants to merge 3 commits into from

Conversation

trexfeathers
Copy link
Contributor

@trexfeathers trexfeathers commented May 17, 2023

A follow on from #266, implementing improved test abstraction.

We have made a good start at reducing duplication in iris-esmf-regrid, but the remaining duplication still makes reviews very difficult. So I felt it important to demonstrate how improvements could be made where similar testing is desired against different elements of the code.

@trexfeathers
Copy link
Contributor Author

Line count in esmf_regrid/tests/unit/schemes:

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #269 (f4d6c20) into main (bad51a3) will decrease coverage by 0.13%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
- Coverage   98.79%   98.67%   -0.13%     
==========================================
  Files          33       34       +1     
  Lines        3563     3236     -327     
==========================================
- Hits         3520     3193     -327     
  Misses         43       43              
Impacted Files Coverage Δ
...smf_regrid/tests/unit/schemes/_common_regridder.py 100.00% <100.00%> (ø)
esmf_regrid/tests/unit/schemes/_common_scheme.py 100.00% <100.00%> (ø)
...regrid/tests/unit/schemes/test_ESMFAreaWeighted.py 100.00% <100.00%> (ø)
...sts/unit/schemes/test_ESMFAreaWeightedRegridder.py 100.00% <100.00%> (ø)
...smf_regrid/tests/unit/schemes/test_ESMFBilinear.py 100.00% <100.00%> (ø)
...d/tests/unit/schemes/test_ESMFBilinearRegridder.py 100.00% <100.00%> (ø)
esmf_regrid/tests/unit/schemes/test_ESMFNearest.py 100.00% <100.00%> (ø)
...id/tests/unit/schemes/test_ESMFNearestRegridder.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bjlittle bjlittle assigned bjlittle and pp-mo and unassigned bjlittle May 18, 2023
extract_weights(grid_to_grid), extract_weights(regridder)
)

def test_curvilinear_and_rectilinear(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that this test diverges in behaviour with #276 due to differing behavour of regridders with respect to bounds.

with pytest.raises(ValueError, match=match):
_ = self.REGRIDDER(src, tgt, mdtol=-1)

def test_curvilinear_equivalence(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that this test diverges in behaviour with #276 due to differing behavour of regridders with respect to bounds.

@github-actions
Copy link
Contributor

@SciTools-incubator/esmf-regrid-devs This pull-request is stale due to a lack of activity in the last 90 days. Remove stale label or comment, otherwise this pull-request will close automatically in 7 days time.

@github-actions github-actions bot added the Stale: Closure warning This stale issue or pull-request has been marked for closure label Aug 29, 2023
@trexfeathers trexfeathers removed the Stale: Closure warning This stale issue or pull-request has been marked for closure label Sep 5, 2023
@trexfeathers
Copy link
Contributor Author

Closing due to lack of interest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

4 participants