matplotlib / matplotlib/pytest-mpl
Support check_figures_equal style comparison without any baseline_image
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 272
- Fork
- 53
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando l’implementazione esistente del confronto delle immagini in pytest-mpl e confronta i suoi punti di ingresso con i decorator check_figures_equal e image_comparison di Matplotlib. Definisci come un marker genererebbe fig_ref e fig_test senza immagini baseline, quindi verifica che le due figure vengano confrontate e che i fixture di immagini del repository non siano necessari.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100