-
Notifications
You must be signed in to change notification settings - Fork 89
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
MOBT-430: Synthetic data utilities for creating spot-cubes #1993
Conversation
Adds the ability to generate spot-data cubes for use in unit tests. Fixes up calls to the existing gridded synthetic data functions that did not use the keyword arguments explicitly. Adds unit tests for the new spot-data utilities. One unit test partially modified as an example.
@@ -443,7 +446,7 @@ def test_error_unmatched_realizations(self): | |||
"""Test error is raised if the realizations provided do not match the | |||
data dimensions""" | |||
realizations_len = 4 | |||
data_len = len(self.data_3d[0]) | |||
data_len = self.data_3d.shape[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug in original test.
@@ -456,7 +459,7 @@ def test_error_unmatched_height_levels(self): | |||
"""Test error is raised if the heights provided do not match the | |||
data dimensions""" | |||
height_levels_len = 4 | |||
data_len = len(self.data_3d[0]) | |||
data_len = self.data_3d.shape[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug in original test.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1993 +/- ##
==========================================
+ Coverage 98.39% 98.40% +0.01%
==========================================
Files 124 124
Lines 12212 12322 +110
==========================================
+ Hits 12016 12126 +110
Misses 196 196 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bayliffe 👍
I think that this PR is largely fine. I've only added some very minor comments.
improver_tests/calibration/dz_rescaling/test_apply_dz_rescaling.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bayliffe 👍
This looks fine. I've suggested one minor docstring edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bayliffe, the functionality added here should be really useful.
I've added 2 extremely minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bayliffe, I'm happy to approve this now.
) * Synthetic spot data creation utilities added. Adds the ability to generate spot-data cubes for use in unit tests. Fixes up calls to the existing gridded synthetic data functions that did not use the keyword arguments explicitly. Adds unit tests for the new spot-data utilities. One unit test partially modified as an example. * Centralise the datetime format definition that corresponds to our typical format. * Some unit tests that use spot-cubes adapted as a demonstration. * Fix doc-string indentation issue for sphinx. * Review response. Improved doc-strings and use of global variables. * Typo correction. * Corrects typos highlighted in review.
Addresses https://github.com/metoppv/mo-blue-team/issues/430
The commits are broken up as follows:
Testing: