Skip to content

r.watershed: Add comprehensive tests for map reuse functionality#6992

Open
sumitchintanwar wants to merge 4 commits intoOSGeo:mainfrom
sumitchintanwar:fix/add-test-r-watershed
Open

r.watershed: Add comprehensive tests for map reuse functionality#6992
sumitchintanwar wants to merge 4 commits intoOSGeo:mainfrom
sumitchintanwar:fix/add-test-r-watershed

Conversation

@sumitchintanwar
Copy link
Contributor

This PR adds comprehensive tests for the map reuse functionality. As asked in PR #6953.

The reuse functionality reuses the calculated maps instead of recalculating them again, which saves time and a lot of computational power.

The PR adds three classes of tests:

  1. Basic reuse workflow
  2. Input validation
  3. Performance testing (Skipped in CI)

Tests use @unittest.expectedFailure decorator since accumulation_input and drainage_input parameters are not yet implemented. This allows tests to run in CI without failing the build. Once that feature is merged, The @unittest.expectedFailure will be removed in a follow up commit.

Verification: All tests run successfully locally with the implemented changes, passing with 0 errors

Also, Tests for TCI/SPI calculation and basin delineation with reused maps are not included in this PR, as these features require significant algorithm changes and will be addressed in separate follow-up work once the core map reuse functionality is stable.

@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 Jan 28, 2026
Deactivate CI for TestWatershedReuseLarge until parameters
@sumitchintanwar sumitchintanwar force-pushed the fix/add-test-r-watershed branch from 508330b to 61dd278 Compare January 29, 2026 12:59
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.

1 participant