HyukjinKwon commented on a change in pull request #29188:
URL: https://github.com/apache/spark/pull/29188#discussion_r458688852
##########
File path: python/docs/source/conf.py
##########
@@ -14,12 +14,23 @@
import sys
import os
+import shutil
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('.'))
+# Remove previously generated rst files. Ignore errors just in case it stops
+# generating whole docs.
+shutil.rmtree(
+ "%s/reference/api" % os.path.dirname(os.path.abspath(__file__)),
ignore_errors=True)
Review comment:
`autosummary` generates RST files but don't remove it back. Here we
always remove the generated RST files so the leftover doesn't cause any side
effect.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]