Skip to content
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

Add tests #53

Merged
merged 5 commits into from
Apr 18, 2023
Merged

Add tests #53

merged 5 commits into from
Apr 18, 2023

Conversation

seedlit
Copy link
Contributor

@seedlit seedlit commented Apr 17, 2023

Scope: Added unit tests.

Todo: Remove dependency on rasterio as it depends on gdal bindings, which is a dependency hell


def test_rmse(test_array1, test_array2):
rmse = quality_metrics.rmse(test_array1, test_array2)
assert float(rmse) == 0.0636659786105156
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we might encounter precision issues (lots of number after decimal point), I would recommend using sth like assert_almost_equal

Copy link
Contributor

@nekhtiari nekhtiari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@seedlit seedlit merged commit 8f95ebe into master Apr 18, 2023
12 checks passed
@seedlit seedlit deleted the add_tests branch April 18, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants