Skip to content
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

Fix release documentation github action #3844

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from docutils.parsers.rst import Directive
from docutils import nodes
from sphinx import addnodes
import shutil

# <-----------------Override the sphinx pdf builder---------------->
# Some pages do not render properly as per the expected Sphinx LaTeX PDF signature.
Expand Down Expand Up @@ -70,9 +71,16 @@ def autodoc_skip_member(app, what, name, obj, skip, options):
# return True if exclude else None


def remove_doctree(app, exception):
"""Remove the .doctree directory created during the documentation build.
"""
shutil.rmtree(app.doctreedir)


def setup(app):
app.add_directive('pprint', PrettyPrintDirective)
app.connect('autodoc-skip-member', autodoc_skip_member)
app.connect('build-finished', remove_doctree)


local_path = os.path.dirname(os.path.realpath(__file__))
Expand Down
Loading