Support check_figures_equal style comparison without any baseline_image

未关闭
#94 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

@weiji14 已经在做这个了。

开始于 2020年9月4日。

  • #95 来自 @weiji14 —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
testing

调研方向

首先定位 pytest-mpl 现有的图像比较实现,并将其入口点与 Matplotlib 的 check_figures_equal 和 image_comparison 装饰器进行比较。定义 marker 在没有基准图像的情况下如何生成 fig_ref 和 fig_test,然后验证这两个图形会被比较,并且不需要仓库中的图像 fixture。

由索引模型根据 Issue 内容生成。

描述

Hi there,

First off, thanks for the great plugin! Just a long time user over at PyGMT and we've being using pytest-mpl quite extensively to catch lots of bugs 😄

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 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 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.

主要语言
Python
星标
274
派生
53
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

matplotlib/pytest-mpl 的其他 Issue

查看 matplotlib/pytest-mpl 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。