NCAS-CMS / NCAS-CMS/cf-python

Image comparison testing for any recipes with plots

Open
#917 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation recipes testing
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

At present we test that the recipes run without error, but output validity checking is left to eyeballing the rendered recipes. To provide a more robust test that the outputs, which are often plots of some form, are as expected and notably haven't changed from a previous output unless that is expected (so as a form of regression testing), we should provide image comparison tests.

I have implemented these in cf-plot based on helper utilities provided in matplotlib for such testing (see NCAS-CMS/cf-plot#13 and NCAS-CMS/cf-plot#14), so a solution can be added fairly easily (I anticipate, at least) based on that.

This work is best left until the recipes have been assigned a separate build i.e. after #916 is closed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the matplotlib image-testing helper utilities and the related cf-plot issues, NCAS-CMS/cf-plot#13 and #14. Check the separate recipe build planned in #916 before starting; done means recipes have image comparisons that detect unexpected plot-output changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.