I have a set of jupyter notebooks that I would like to execute in a test so as to ensure that they all run:
for file in readdir(NOTEBOOK_DIR)
if splitext(file) == ".ipynb"
println("Running ", file)
Unfortunately, imported notebooks will be affected by the code imported by notebooks before them. In Julia 0.7 or 1.0 is it still possible to clear the workspace? Is there an alternative trick I can use?
Include them in separate modules.
Thanks fredrikekre, could you please elaborate. Including them as separate modules makes me think my code would be:
While that may work, it isn’t amenable to automatically testing any notebook I put in the directory.
for x in mynotebooks
m = Module()
@eval m begin
Even works in Julia 0.6. Thanks!