Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add pytest-mpl image comparison tests and update CI workflow #413

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

lukelbd
Copy link
Collaborator

@lukelbd lukelbd commented Mar 27, 2023

This will finally add robust image comparison testing to proplot using matplotlib/pytest-mpl.

Inside tests, I declare several functions developed from my own ad hoc jupyter notebook tests. These will be automatically detected + run by pytest, with image comparisons carried out by pytest-mpl. Further, inside tests/test_docs.py, I dynamically create testing functions from the rst-style python files in docs using jupytext, so that pytest-mpl can perform image comparisons on the documentation examples alongside the other testing files. So, the travis CI no longer compiles the documentation with make html -- instead, the existing readthedocs workflow does this, and it should also now be enabled for new pull requests (if not, will try to figure out soon). I also use a fork of pytest-mpl to support comparing arbitrary figures created by each testing function (i.e., without explicitly returning figure objects; see this branch).

This work was done quite a while ago -- has just been sitting on my machine. Would like to merge it this spring.

lukelbd

This comment was marked as duplicate.

.travis.yml Outdated Show resolved Hide resolved
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant