matplotlib / matplotlib/pytest-mpl

FEATURE: generate which doesn't overwrite existing

Open
#238 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
272
Forks
53
PR merge metrics
No merged PRs in 30d

Description

I have a minor hassle when adding new tests and running
```
--mpl-generate-path=tests/baseline
```
I overwrite all existing baseline images in my repo. I then have to sort through which are added, because usually the regenerated old tests are still the same visually, but are not identical hash-wise.

I would propose adding a
```
--mpl-generate-missing=tests/baseline
```
Which would only generate new figures if the baseline is mising.

Contributor guide

No contributing guide indexed for this repository

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 tracing how --mpl-generate-path=tests/baseline is handled and where baseline figures are generated. Compare that flow with the proposed missing-only behavior; done means existing baseline images remain unchanged while missing figures are generated in the specified path.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.