Mobt 1138 ignore git hash cli#2388
Conversation
| suppress_warnings: bool = False, | ||
| realization_collapse: bool = False, | ||
| subset_coord: str = None, | ||
| ignore_grid_match: bool = False, |
There was a problem hiding this comment.
| ignore_grid_match: bool = False, | |
| ignore_grid_match_check: bool = False, |
Just one option, this could also be called something like ignore_grid_mismatch. The current variable name could be misleading. Should be changed throughout CLI and plugins.
| suppress_warnings=suppress_warnings, | ||
| realization_collapse=realization_collapse, | ||
| subset_coord=subset_coord, | ||
| ignore_grid_match=ignore_grid_match, |
There was a problem hiding this comment.
| ignore_grid_match=ignore_grid_match, | |
| ignore_grid_match_check=ignore_grid_match_check, |
| self, | ||
| neighbour_selection_method: str = "nearest", | ||
| fixed_lapse_rate: float = None, | ||
| ignore_grid_match: bool = False, |
There was a problem hiding this comment.
| ignore_grid_match: bool = False, | |
| ignore_grid_match_check: bool = False, |
| plugin = SpotLapseRateAdjust( | ||
| neighbour_selection_method=self.neighbour_selection_method | ||
| neighbour_selection_method=self.neighbour_selection_method, | ||
| ignore_grid_match=self.ignore_grid_match, |
There was a problem hiding this comment.
| ignore_grid_match=self.ignore_grid_match, | |
| ignore_grid_match_check=self.ignore_grid_match_check, |
| plugin = SpotLapseRateAdjust( | ||
| neighbour_selection_method=self.neighbour_selection_method, | ||
| fixed_lapse_rate=self.fixed_lapse_rate, | ||
| ignore_grid_match=self.ignore_grid_match, |
There was a problem hiding this comment.
| ignore_grid_match=self.ignore_grid_match, | |
| ignore_grid_match_check=self.ignore_grid_match_check, |
| "neighbour_data", [np.array([[[0, 1, 2], [0, 1, 2], [0, 1, 2]]])] | ||
| ) | ||
| def test_ignore_grid_match_argument(neighbour_cube, apply_lapse_rate_correction): | ||
| """Test that when the ignore_grid_match argument is set to True, that the function |
There was a problem hiding this comment.
| """Test that when the ignore_grid_match argument is set to True, that the function | |
| """Test that when the ignore_grid_match_check argument is set to True, that the function |
|
The newest commit updates the docstrings and comments made during the review. |
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-jbeaver, I've just added a couple of comments suggesting some additional tests of the new option.
Kat-90
left a comment
There was a problem hiding this comment.
Ran the tests and checked the code. Happy to approve
brhooper
left a comment
There was a problem hiding this comment.
Thanks @mo-jbeaver, the additional tests are helpful.
Related to https://github.com/metoppv/mo-blue-team/issues/1138, #2360
Acceptance test data: metoppv/improver_test_data#137
Builds on the work from PR: #2387
That PR exposes the option to ignore the grid hash within the spot extract CLI. The option to ignore the grid hash within the SpotExtract plugin was added in #2360.
This PR, adds a unit test covering the new variable added.
Testing: