rossant / ipycache

Defines a %%cache cell magic in the IPython notebook to cache results of long-lasting computations in a persistent pickle file
BSD 3-Clause "New" or "Revised" License
139 stars 35 forks source link

automatically re-run cell if content changed #27

Open ihrke opened 9 years ago

ihrke commented 9 years ago

I think it would be convenient to re-run cells whose content has changed. One way is to hash the cells' code and put it into the pickle file and compare it when re-running. We could enable/disable this behavior with some configuration flag, e.g., --enable-auto-rerun.

vascotenner commented 8 years ago

At this moment cache function does not store the code yet. In the function definition are some traces that this is very easy, including the line:

code = cell if cell.endswith('\n') else cell+'\n'