-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Jupyter cleanup #86
Comments
import JSON, Deprecations
function update_notebook(infile, outfile = infile)
nb = open(JSON.parse, infile)
for cell in nb["cells"]
if cell["cell_type"] == "code"
old_source = join(cell["source"])
_, new_source = Deprecations.edit_text(old_source)
new_source = split(new_source, '\n')
@views map!(x -> x * "\n", new_source[1:end-1], new_source[1:end-1])
cell["source"] = new_source
end
end
open(io -> JSON.print(io, nb, 1), outfile, "w")
end
|
Need a while loop over FemtoCleaner.jl/src/FemtoCleaner.jl Lines 80 to 89 in f3f6a1f
|
... this is the sort of Swedish efficiency that scares me for the world cup. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would probably not be too hard for FemtoCleaner to update Jupyter notebooks.
I think educators would love the autoupgrading of their lectures.
If someone can outline a basic guideline of how to do this, I can take it on.
The text was updated successfully, but these errors were encountered: