reimplementation of pole_kind option#415
Open
raphaeldussin wants to merge 2 commits into
Open
Conversation
aulemahal
requested changes
Feb 26, 2025
aulemahal
left a comment
Collaborator
There was a problem hiding this comment.
A few suggestions.
An example in one of the notebooks could be interesting ?
| file_to_rem.unlink() | ||
| file_to_rem = pathlib.Path('xesmf_testing_OM4.tar.gz') | ||
| file_to_rem.unlink() | ||
| return None |
Collaborator
There was a problem hiding this comment.
Suggested change
| return None |
| xe.SpatialAverager(ds_in, [poly]) | ||
|
|
||
|
|
||
| def test_regrid_polekind(): |
Collaborator
There was a problem hiding this comment.
Suggested change
| def test_regrid_polekind(): | |
| def test_regrid_polekind(tmp_path): |
I suggest writing the test files in a temporary path (see https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html).
As a bonus, you don't even need to clean them up at the end.
Comment on lines
+160
to
+161
| if 'pole_kind' in ds: | ||
| pole_kind = np.asarray(ds['pole_kind']) |
Collaborator
There was a problem hiding this comment.
The possibility of passing pole_kind in the dataset should maybe be added somewhere in the documentation ? The docstring of Regridder maybe ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR replaces #236 and #223
testing uses sample data from figshare.