Skip to content

Commit

Permalink
[SPARK-49182][DOCS][PYTHON] Stop publish site/docs/{version}/api/pyth…
Browse files Browse the repository at this point in the history
…on/_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 apache#47686 from yaooqinn/SPARK-49182.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
  • Loading branch information
yaooqinn committed Aug 9, 2024
1 parent d8aff6e commit eb859de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/_plugins/build_api_docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit eb859de

Please sign in to comment.