Skip to content

Added acceptable pixel tolerances feature for testing. #777

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

Closed
wants to merge 11 commits into from

Conversation

manugv
Copy link
Contributor

@manugv manugv commented May 20, 2025

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
Copy link
Member

@soxofaan soxofaan left a comment

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"

@soxofaan
Copy link
Member

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

@manugv
Copy link
Contributor Author

manugv commented May 21, 2025

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
Copy link
Contributor Author

manugv commented May 21, 2025

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
@manugv manugv requested a review from soxofaan May 23, 2025 15:58
@soxofaan
Copy link
Member

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

Copy link
Member

@soxofaan soxofaan left a comment

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?

@manugv
Copy link
Contributor Author

manugv commented May 23, 2025

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
Member

thanks,
merged in a554067

@soxofaan soxofaan closed this May 26, 2025
@soxofaan soxofaan deleted the allowablepixels branch May 26, 2025 10:49
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