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

[DOCS] Cleanup docs before rebuild #5127

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@ DIRECTORY_GRAPH = YES
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_IMAGE_FORMAT = png
DOT_IMAGE_FORMAT = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
Expand Down
23 changes: 0 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
'autodocsumm'
]

breathe_projects = {'tvm' : 'doxygen/xml/'}
breathe_default_project = 'tvm'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -208,10 +205,6 @@
'../vta/tutorials/optimize',
'../vta/tutorials/autotvm'])

def generate_doxygen_xml(app):
"""Run the doxygen make commands if we're on the ReadTheDocs server"""
run_doxygen('..')

sphinx_gallery_conf = {
'backreferences_dir': 'gen_modules/backreferences',
'doc_module': ('tvm', 'numpy'),
Expand All @@ -232,19 +225,6 @@ def generate_doxygen_xml(app):
'member-order': 'bysource',
}

# hook for doxygen
def run_doxygen(folder):
"""Run the doxygen make command in the designated folder."""
try:
#retcode = subprocess.call("cd %s; make doc" % folder, shell=True)
retcode = subprocess.call("rm -rf _build/html/doxygen", shell=True)
retcode = subprocess.call("mkdir -p _build/html", shell=True)
retcode = subprocess.call("cp -rf doxygen/html _build/html/doxygen", shell=True)
if retcode < 0:
sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
except OSError as e:
sys.stderr.write("doxygen execution failed: %s" % e)

# Maps the original namespace to list of potential modules
# that we can import alias from.
tvm_alias_check_map = {
Expand Down Expand Up @@ -300,9 +280,6 @@ def process_docstring(app, what, name, obj, options, lines):


def setup(app):
# Add hook for building doxygen xml when needed
# no c++ API for now
app.connect("builder-inited", generate_doxygen_xml)
app.connect('autodoc-process-docstring', process_docstring)
app.add_stylesheet('css/tvm_theme.css')
app.add_config_value('recommonmark_config', {
Expand Down
7 changes: 5 additions & 2 deletions tests/scripts/task_python_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
set -e
set -u

# cleanup old states
mkdir -p docs/_build/html
rm -rf docs/_build/html/jsdoc
rm -rf docs/_build/html/javadoc
rm -rf docs/_build/html/*
rm -rf docs/gen_modules
rm -rf docs/doxygen

# remove stale tutorials and always build from scratch.
rm -rf docs/tutorials
Expand All @@ -32,6 +34,7 @@ find . -type f -path "*.log" | xargs rm -f

# C++ doc
make doc
mv docs/doxygen docs/_build/html/doxygen

# JS doc
jsdoc web/tvm_runtime.js web/README.md
Expand Down