matplotlib / matplotlib/pytest-mpl

Support check_figures_equal style comparison without any baseline_image

Đang mở
#94 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
272
Fork
53
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tìm implementation hiện có của pytest-mpl để so sánh hình ảnh và so sánh các entry point của nó với các decorator check_figures_equal và image_comparison của Matplotlib. Xác định cách một marker sẽ tạo fig_ref và fig_test mà không cần các baseline image, sau đó xác minh rằng hai figure được so sánh và các image fixture trong repository là không cần thiết.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
testing
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.