Skip to content
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

Discussion: Addition of figure tests using pytest-mpl #717

Open
devanshshukla99 opened this issue Apr 13, 2023 · 0 comments
Open

Discussion: Addition of figure tests using pytest-mpl #717

devanshshukla99 opened this issue Apr 13, 2023 · 0 comments

Comments

@devanshshukla99
Copy link
Contributor

devanshshukla99 commented Apr 13, 2023

Stingray's test suite produces a lot of plots, however, there are no tests comparing/verifying the plots to a previous version/hash.
This is supposed to be mitigated by other tests, but there can be issues which might manifest themselves into the end product itself (figures). Hence, the idea of verifying the plots to a previous binary/hash.

This can be solved by using pytest-mpl via either comparing the figure themselves or the figure hashes (preferred), as followed by astropy, sunpy, + and it's worth discussing if we want to implement a similar one in stingray, which I'll be happy to do.

The implementation will most likely be heavily inspired by astropy's figure_test, which uses a decorator and a JSON hash file inside the package for comparison.

Secondly, sunpy has a separate repo for storing ref binary files, which we can play it by the ear and implement if and when required.

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

No branches or pull requests

1 participant