matplotlib / matplotlib/pytest-mpl
Support check_figures_equal style comparison without any baseline_image
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 272
- Forks
- 53
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie damit, die bestehende Implementierung des Bildvergleichs in pytest-mpl zu finden, und vergleichen Sie ihre Einstiegspunkte mit den Decorators check_figures_equal und image_comparison von Matplotlib. Legen Sie fest, wie ein Marker fig_ref und fig_test ohne Baseline-Bilder erzeugen würde, und überprüfen Sie anschließend, dass die beiden Figuren verglichen werden und dass Bild-Fixtures im Repository nicht erforderlich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100