-
Notifications
You must be signed in to change notification settings - Fork 301
Support test data in benchmark workflows #4402
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
Merged
trexfeathers
merged 33 commits into
SciTools:main
from
wjbenfold:wjbenfold-ci-benchmarks-test-data
Nov 11, 2021
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
2095a70
Support test data in benchmark workflows
02f59c5
Use existing test data for now to test
fb26b03
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2d1b780
Set OVERRIDE_TEST_DATA_REPOSITORY properly
760fff1
Merge branch 'wjbenfold-ci-benchmarks-test-data' of github.com:wjbenf…
1acbea7
Manually set version number to mirror cirrus.yml
90cf420
Add licence to top of file
2d9b8f9
Specify absolute path of test data
b944fa7
Changes to regridding to remove unnecessary print statements
4f7462e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 30bd14a
Can't refer to environment variables in env block
b78ab47
Merge branch 'wjbenfold-ci-benchmarks-test-data' of github.com:wjbenf…
8bb1b46
Precommit checks benchmarks too
b0c856f
Set the env var for data location
a40a88c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 62b03f2
Add some logging to noxfile for now
c0a5a57
Merge branch 'wjbenfold-ci-benchmarks-test-data' of github.com:wjbenf…
0ab3125
Do we have the test data path set right?
0bd99af
Rearrange imports and fix logging
6e76a92
More logging because iris.config.TEST_DATA_DIR was None
4f55a5f
More logging and changed mv
f28cdd0
Revert logging changes
8f7032f
Enable caching
25f7d76
Update to use new test data
04ec65c
Trim out last bit of logging
dc666e6
Update cache test data directory
15521eb
Reprompt ci
c3ba131
Fix cache location
568bdff
Bit of logging to reprompt CI
f57768c
Remove that logging
43000d9
Added type hinting
abfd06a
Review changes
fdfba71
Prevent piping hiding benchmark failures
wjbenfold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Copyright Iris contributors | ||
| # | ||
| # This file is part of Iris and is released under the LGPL license. | ||
| # See COPYING and COPYING.LESSER in the root of the repository for full | ||
| # licensing details. | ||
| """ | ||
| Regridding benchmark test | ||
|
|
||
| """ | ||
|
|
||
| # import iris tests first so that some things can be initialised before | ||
| # importing anything else | ||
| from iris import tests # isort:skip | ||
|
|
||
| import iris | ||
| from iris.analysis import AreaWeighted | ||
|
|
||
|
|
||
| class HorizontalChunkedRegridding: | ||
| def setup(self) -> None: | ||
| # Prepare a cube and a template | ||
|
|
||
| cube_file_path = tests.get_data_path( | ||
| ["NetCDF", "regrid", "regrid_xyt.nc"] | ||
| ) | ||
| self.cube = iris.load_cube(cube_file_path) | ||
|
|
||
| template_file_path = tests.get_data_path( | ||
| ["NetCDF", "regrid", "regrid_template_global_latlon.nc"] | ||
| ) | ||
| self.template_cube = iris.load_cube(template_file_path) | ||
|
|
||
| # Chunked data makes the regridder run repeatedly | ||
| self.cube.data = self.cube.lazy_data().rechunk((1, -1, -1)) | ||
|
|
||
| def time_regrid_area_w(self) -> None: | ||
| # Regrid the cube onto the template. | ||
| out = self.cube.regrid(self.template_cube, AreaWeighted()) | ||
| # Realise the data | ||
| out.data |
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
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.
Uh oh!
There was an error while loading. Please reload this page.