Skip to content

Added acceptable pixel tolerances feature for testing.#777

Closed
manugv wants to merge 11 commits into
masterfrom
allowablepixels
Closed

Added acceptable pixel tolerances feature for testing.#777
manugv wants to merge 11 commits into
masterfrom
allowablepixels

Conversation

@manugv

@manugv manugv commented May 20, 2025

Copy link
Copy Markdown
Contributor

Added a feature mentioned in this issue #776

Feature behavior

  • The test should either assert pixels tolerance or (atol, rtol).
  • For now it cannot assert both of them at the same time.

@manugv manugv requested a review from soxofaan May 20, 2025 12:31

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some quick notes

I'm also not sure we have to use such a cryptic parameter "pxtol". Note that "rtol" and "atol" are just directly adaptations from numpy/array.
This pixel fraction tolerance is however a completely new parameter, so we can be less cryptic, e.g. "pixel_tolerance"

Comment thread openeo/testing/results.py
Comment thread openeo/testing/results.py Outdated
@soxofaan

Copy link
Copy Markdown
Member

I think it's also important that this feature is covered with unit tests. Are you familiar with pytest and writing tests?

@manugv

manugv commented May 21, 2025

Copy link
Copy Markdown
Contributor Author

I think it's also important that this feature is covered with unit tests. Are you familiar with pytest and writing tests?

Yes. I have done it a few times. I will try finding a way to add one. Or will ping you if I need help.

@manugv

manugv commented May 21, 2025

Copy link
Copy Markdown
Contributor Author

I think it's also important that this feature is covered with unit tests. Are you familiar with pytest and writing tests?

I have added a simple test to capture all possibilities. Please let me know if I have to add more tests.

@manugv manugv requested a review from soxofaan May 22, 2025 12:50
Comment thread openeo/testing/results.py Outdated
Comment thread openeo/testing/results.py Outdated
Comment thread openeo/testing/results.py Outdated
Comment thread openeo/testing/results.py Outdated
Comment thread tests/testing/test_results.py Outdated
@manugv manugv requested a review from soxofaan May 23, 2025 15:58
@soxofaan

Copy link
Copy Markdown
Member

FYI: I merged master in your feature branch, which hopefully fixes the unit test failure

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you also add a changelog entry?

Comment thread openeo/testing/results.py Outdated
Comment thread openeo/testing/results.py Outdated
@manugv

manugv commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

I will do it.

@manugv manugv requested a review from soxofaan May 26, 2025 07:20
soxofaan added a commit that referenced this pull request May 26, 2025
@soxofaan

Copy link
Copy Markdown
Member

thanks,
merged in a554067

@soxofaan soxofaan closed this May 26, 2025
@soxofaan soxofaan deleted the allowablepixels branch May 26, 2025 10:49
soxofaan added a commit that referenced this pull request Sep 9, 2025
soxofaan added a commit that referenced this pull request Sep 9, 2025
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.

2 participants