spylt#
spylt is a simple utility to back up the data necessary to reproduce a matplotlib
figure. Ever came back after weeks, months (years?) to a figure that you need to
slightly adjust, only to find out that you have no idea where you buried that piece of
code or that dataset that you need to generate this plot? That’s a typical situation in
which spylt would have helped. It provides a decorator for your plotting functions
that adds the functionality that upon saving the figure, a copy of all the following
metadata can be saved:
The function or even the function’s module code, as a
.pyfile.The values of all of the function’s arguments, as
picklefiles.The virtual environment definition, that is
pip’srequirements.txtorconda’senvironment.yml.A
matplotlibrcfile, which can be useful in case you’ve modifiedrcParamsat runtime.Other things? Please make your suggestions in the issue tracker!
Please bear in mind that spylt should only be seen as a failsafe, it does not replace
good practices such as version control, saving intermediary results and figure metadata.