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

r.fillnulls: Modified tests for r.fillnulls module #5026

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Shreshth-Malik
Copy link
Contributor

Modifications:

  • Added tests for bicubic interpolation.
  • Implemented flags like lambda.
  • Included tests for r.fillnulls with raster masks.

@github-actions github-actions bot added raster Related to raster data processing Python Related code is in Python module tests Related to Test Suite labels Feb 2, 2025
overwrite=True,
)
self.assertModule(module)
self.assertRasterFitsUnivar(raster=self.mapComplete, reference=self.values)
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of just checking there are no null cells, please also include other stats like mean, min, max

self.assertModule(module)
self.assertRasterMinMax(self.mapComplete, refmin=57, refmax=100)

self.runModule("r.mask", flags="r")
Copy link
Contributor

Choose a reason for hiding this comment

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

Move removing mask right after the computation, before the asserts. In this case it doesn't matter but computing the stats should not be done when mask is active.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If i remove the mask before the asserts the test fails because i think it analyses all the cells instead of just the masked regions. Is there any other way to go around this?

Copy link
Contributor

Choose a reason for hiding this comment

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

It shouldn't fail. That's the whole point, you want to test the mask was properly applied and for that you need to turn it off for the asserts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants