Skip to content

Commit

Permalink
Clean jupyter_execute temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Oct 31, 2024
1 parent 1b3f398 commit 5e56b7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sage_docbuild/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,11 @@ class will be properly documented inside its surrounding class.

return skip

def clean_jupyter_execute(app, exception):
jupyter_execute_path = os.path.join(app.outdir, 'jupyter_execute')
if os.path.exists(jupyter_execute_path):
shutil.rmtree(jupyter_execute_path)


class SagecodeTransform(SphinxTransform):
"""
Expand Down Expand Up @@ -1092,6 +1097,7 @@ def setup(app):
# app.connect('missing-reference', missing_reference)
app.connect('missing-reference', find_sage_dangling_links)
app.connect('html-page-context', add_page_context)
app.connect('build-finished', clean_jupyter_execute)


# Conditional content
Expand Down

0 comments on commit 5e56b7a

Please sign in to comment.