Skip to content

i.evapo.mh: add test file #5519

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

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

Conversation

jayneel-shah18
Copy link
Contributor

@jayneel-shah18 jayneel-shah18 commented Apr 8, 2025

This PR introduces a comprehensive regression test suite for the i.evapo.mh module in GRASS GIS. These tests are designed to detect unintended changes in computational results and ensure consistent evapotranspiration output under various input scenarios and module flag settings.

Changes Made

Implemented tests for:

  • Output clamping with -z flag (test_z_flag_negative_values)
    Ensures that negative ET values are set to zero as expected.

  • Precipitation exclusion with -h flag (test_h_flag_precipitation_ignored)
    Confirms that results remain unchanged when precipitation is omitted under the -h flag.

  • Alternative scaling behavior with -s flag (test_s_flag_different_output)
    Verifies that the -s flag produces different output from the default mode.

  • Hargreaves formula consistency (test_hargreaves_formula)
    Cross-validates module output against the original Hargreaves reference implementation using known inputs.

Performance

Platform Runtime
Windows 1.712s
Ubuntu 1.633s
macOS 1.028s

This PR significantly improves the test coverage for i.evapo.mh. Looking forward to feedback or suggestions for further refinement!

I have found a bug in the module implementation. The attached issue is #5520

@github-actions github-actions bot added Python Related code is in Python module imagery tests Related to Test Suite labels Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant