matplotlib / matplotlib/pytest-mpl
Support check_figures_equal style comparison without any baseline_image
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 272
- Forks
- 53
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hi there,
First off, thanks for the great plugin! Just a long time user over at [PyGMT](https://github.com/GenericMappingTools/pygmt) and we've being using `pytest-mpl` quite extensively to catch lots of bugs :smile:
Anyhow, we're just wondering if there's scope here for something like `@pytest.mark.mpl_check_equal` based on [matplotlib's check_figures_equal](https://matplotlib.org/3.3.1/api/testing_api.html#matplotlib.testing.decorators.check_figures_equal) function for "generating and comparing two figures" (fig_ref and fig_test) on the fly (without having a baseline image).
The main use case for this is to keep our repository size small, since the baseline images can take up a lot of space. Currently, `pytest-mpl` does something similar to matplotlib's [`image_comparison`](https://matplotlib.org/3.3.1/api/testing_api.html#matplotlib.testing.decorators.image_comparison) decorator function. We've been putting some thought into this at https://github.com/GenericMappingTools/pygmt/pull/555, and rather than duplicating work, we're wondering if the logic could sit here in `pytest-mpl` or somewhere in the `matplotlib` organization.
Happy to submit a PR if someone can point me in the right direction.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par localiser l’implémentation existante de la comparaison d’images de pytest-mpl et comparez ses points d’entrée avec les décorateurs check_figures_equal et image_comparison de Matplotlib. Définissez comment un marqueur générerait fig_ref et fig_test sans images de référence, puis vérifiez que les deux figures sont comparées et que les fixtures d’images du dépôt ne sont pas nécessaires.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100