matplotlib/pytest-mpl

Generate result filenames that are easier to bulk update

pllim opened this issue · 0 comments

pllim commented

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

test_image = (result_dir / "result.png").absolute()

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