From eb859def440299f269f38f30d3e9e465bd5cec26 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Sat, 10 Aug 2024 00:34:34 +0800 Subject: [PATCH] [SPARK-49182][DOCS][PYTHON] Stop publish site/docs/{version}/api/python/_sources dir ### What changes were proposed in this pull request? Remove dangling links like: https://spark.apache.org/docs/3.5.1/api/python/_sources/user_guide/sql/index.rst.txt ### Why are the changes needed? reduce the size of documentation publication ``` $ du -h 3.5.1/api/python/_sources 68K 3.5.1/api/python/_sources/development 148K 3.5.1/api/python/_sources/user_guide/pandas_on_spark 40K 3.5.1/api/python/_sources/user_guide/sql 208K 3.5.1/api/python/_sources/user_guide 20K 3.5.1/api/python/_sources/migration_guide 2.9M 3.5.1/api/python/_sources/reference/pyspark.sql/api 3.0M 3.5.1/api/python/_sources/reference/pyspark.sql 180K 3.5.1/api/python/_sources/reference/pyspark.ss/api 196K 3.5.1/api/python/_sources/reference/pyspark.ss 2.5M 3.5.1/api/python/_sources/reference/api 3.0M 3.5.1/api/python/_sources/reference/pyspark.pandas/api 3.1M 3.5.1/api/python/_sources/reference/pyspark.pandas 8.8M 3.5.1/api/python/_sources/reference 4.1M 3.5.1/api/python/_sources/getting_started 13M 3.5.1/api/python/_sources ``` ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? build locally ``` ls api/python _images _static getting_started migration_guide reference searchindex.js _modules development index.html objects.inv search.html user_guide ``` ### Was this patch authored or co-authored using generative AI tooling? NO Closes #47686 from yaooqinn/SPARK-49182. Authored-by: Kent Yao Signed-off-by: Kent Yao --- docs/_plugins/build_api_docs.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_plugins/build_api_docs.rb b/docs/_plugins/build_api_docs.rb index 80863b4b56b15..8afcef2c5a0d1 100644 --- a/docs/_plugins/build_api_docs.rb +++ b/docs/_plugins/build_api_docs.rb @@ -157,6 +157,7 @@ def build_python_docs mkdir_p "api/python" puts "cp -r ../python/docs/build/html/. api/python" + rm_r("../python/docs/build/html/_sources") cp_r("../python/docs/build/html/.", "api/python") end