matplotlib / matplotlib/pytest-mpl
Generate result filenames that are easier to bulk update
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 272
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
Currently, this plugin organizes its outputs as given in this example:
```
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/baseline.png
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/result-failed-diff.png
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/result.png
```
https://github.com/matplotlib/pytest-mpl/blob/2611bd020b523ab4fff1c9fa7db936b68dad7113/pytest_mpl/plugin.py#L425
But what `result.png` compares to is named as such:
https://github.com/astropy/astropy-data/blob/gh-pages/testing/astropy/2019-08-02T11:38:58.288466/3.1.x/test_tick_angles_non_square_axes.png
As a result, to save the new `result.png` as a new "truth," I have to manually rename the file. When I have to bulk update like 50 of these, there is a high risk of human error of renaming the wrong stuff.
Would be more dev friendly to perhaps re-organize the naming to be something like this?
```
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/baseline.png
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/result-failed-diff.png
results/astropy.visualization.wcsaxes.tests.test_images.test_tick_angles_non_square_axes/test_tick_angles_non_square_axes.png
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pytest_mpl/plugin.py around line 425, where the result filenames are organized. Compare the current result.png naming with the requested test-specific filename, then verify that generated outputs use the test name so bulk truth updates do not require manual renaming.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100