[test] Add unit tests for algorithms/data_utils.py#168
Open
adity1raut wants to merge 2 commits into52North:mainfrom
Open
[test] Add unit tests for algorithms/data_utils.py#168adity1raut wants to merge 2 commits into52North:mainfrom
adity1raut wants to merge 2 commits into52North:mainfrom
Conversation
[test] Add unit tests for algorithms/data_utils.py Signed-off-by: Aditya Raut <araut7798@gmail.com>
[test] Add unit tests for algorithms/data_utils.py Signed-off-by: Aditya Raut <araut7798@gmail.com>
Collaborator
|
Thank you for your PR. We appreciate the time and effort that was put into it. Please be aware that we require to follow 52 North's CLA guidelines for all PRs and, in particular, fill the 52°North Contributor License Agreement. As long as this has not been filled, I can not assign you to any issues or merge any PRs. Please don't hesitate to contact me in case of related questions. |
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.
Related Issue / Discussion:
Changes:
tests/test_data_utils.py— unit test file forWeatherRoutingTool/algorithms/data_utils.pyFurther Details:
Summary:
data_utils.pycontains 5 testable units (get_closest,distance,time_diffs,get_speed_from_arrival_time, andGridMixin) that hadzero test coverage before this PR.
This PR adds
tests/test_data_utils.pywith 44 unit tests organizedinto pytest classes with shared fixtures and
pytest.mark.parametrize.Key assertions use analytically known WGS-84 geodesic values
(1° longitude on the equator ≈ 111 319.49 m) so tests are fully
self-contained and do not depend on external data files.
TestGetClosestget_closest()TestDistancedistance()TestTimeDiffstime_diffs()TestGetSpeedFromArrivalTimeget_speed_from_arrival_time()TestGridMixinindex_to_coords,coords_to_index,get_shuffled_costBefore: no tests for
data_utils.py.After: 44 passing unit tests with full coverage of all public functions.
Dependencies:
No new dependencies. All imports (
numpy,pytest,xarray,astropy) are already listed inrequirements.test.txt.PR Checklist:
In the context of this PR, I: