Skip to content

r.param.scale: loosen curvature test tolerance across platforms - #7584

Merged
echoix merged 1 commit into
OSGeo:mainfrom
krcoder123:rparamscale-pytest-tolerance
Jun 20, 2026
Merged

echoix merged 1 commit into
OSGeo:mainfrom
krcoder123:rparamscale-pytest-tolerance

Conversation

@krcoder123

Copy link
Copy Markdown
Contributor

My previous PR #7534 was merged into main but ended up having a "(ubuntu-24.04, 3.13) (push)" error once it was pushed, so this PR is to just fix that one little issue.

The curvature numbers were tiny, very close to zero. The last digits came out a little different depending on the compiler and CPUs, so the values match to about 7 figures but not exactly. My old tolerance of (1e-9) was too tight so planc at size 9 failed on the Linux runner by a very small amount. I'm raising the floor to be 5e-8 so it handles the platform rounding properly and it's still far below the size change a real bug would have caused if there was one.

The curvature methods (profc, planc, minic) produce values very close to zero.
Each value comes out of a least-squares fit and a small matrix solve, and the
last few digits depend on the compiler and CPU. So the same DEM matches to about
seven significant figures across platforms, but not bit for bit.

The test's absolute tolerance was 1e-9, which was tighter than that
platform-to-platform variation. On the Linux CI runner the planc max at window
size 9 came out about 2.6e-9 from the reference and failed, even though it still
agreed to seven figures.

Raising the floor to 5e-8 covers that variation with room to spare, and it is
still far smaller than the shift a real bug would cause, so the test keeps
catching real regressions.
@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 Jun 19, 2026
@krcoder123 krcoder123 changed the title r.param.scale test: loosen curvature tolerance across platforms fix(r.param.scale): loosen test tolerance across platforms Jun 19, 2026
@krcoder123 krcoder123 changed the title fix(r.param.scale): loosen test tolerance across platforms r.param.scale: loosen curvature test tolerance across platforms Jun 19, 2026
@echoix
echoix merged commit b609841 into OSGeo:main Jun 20, 2026
26 of 28 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jun 20, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
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