From 9da9e1438b55453a11a29d27f82cb38086628bba Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Wed, 10 Jan 2018 20:52:03 -0500 Subject: [PATCH 1/7] Add BOOST_ROOT Change-Id: I6e369593959ac82e56f074f0acf98a5963ea94b6 --- dev/gen_apidocs/create_documents.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 566d9cee79c..7b235a55c43 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -43,6 +43,7 @@ popd source activate pyarrow-dev export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX +export BOOST_ROOT=$CONDA_PREFIX export PARQUET_BUILD_TOOLCHAIN=$CONDA_PREFIX rm -rf arrow/cpp/build_docs From 8b2d7e43f96967002aa7462c0bc55ea5f317bd4b Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 11 Jan 2018 18:22:56 -0500 Subject: [PATCH 2/7] Fixes for glib doc build Change-Id: I612a807b38b86d614f0d012aad2a9a598e869d7a --- dev/docker-compose.yml | 4 ++-- dev/gen_apidocs/create_documents.sh | 34 +++++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml index 4b901489400..a73fd1bfbba 100644 --- a/dev/docker-compose.yml +++ b/dev/docker-compose.yml @@ -17,7 +17,7 @@ version: '3' services: gen_apidocs: - build: + build: context: gen_apidocs volumes: - ../..:/apache-arrow @@ -29,7 +29,7 @@ services: volumes: - ../..:/apache-arrow dask_integration: - build: + build: context: dask_integration volumes: - ../..:/apache-arrow diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 7b235a55c43..59c67f68582 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -46,9 +46,11 @@ export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX export BOOST_ROOT=$CONDA_PREFIX export PARQUET_BUILD_TOOLCHAIN=$CONDA_PREFIX -rm -rf arrow/cpp/build_docs -mkdir arrow/cpp/build_docs -pushd arrow/cpp/build_docs +CPP_BUILD_DIR=$(pwd)/arrow/cpp/build_docs + +rm -rf $CPP_BUILD_DIR +mkdir $CPP_BUILD_DIR +pushd $CPP_BUILD_DIR cmake -DCMAKE_BUILD_TYPE=$ARROW_BUILD_TYPE \ -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \ -DARROW_PYTHON=on \ @@ -59,6 +61,19 @@ make -j4 make install popd +# Build c_glib documentation +pushd arrow/c_glib +rm -rf doc/reference/html/* +./autogen.sh +./configure \ + --with-arrow-cpp-build-dir=$CPP_BUILD_DIR \ + --with-arrow-cpp-build-type=$ARROW_BUILD_TYPE \ + --enable-gtk-doc +LD_LIBRARY_PATH=$CPP_BUILD_DIR/$ARROW_BUILD_TYPE make GTK_DOC_V_XREF=": " +mkdir -p ../site/asf-site/docs/c_glib +rsync -r doc/reference/html/ ../site/asf-site/docs/c_glib +popd + # Build Parquet C++ rm -rf parquet-cpp/build_docs mkdir parquet-cpp/build_docs @@ -84,19 +99,6 @@ mkdir -p ../site/asf-site/docs/python rsync -r doc/_build/html/ ../site/asf-site/docs/python popd -# Build c_glib documentation -pushd arrow/c_glib -rm -rf doc/reference/html/* -./autogen.sh -./configure \ - --with-arrow-cpp-build-dir=$(pwd)/../cpp/build \ - --with-arrow-cpp-build-type=$ARROW_BUILD_TYPE \ - --enable-gtk-doc -LD_LIBRARY_PATH=$(pwd)/../cpp/build/$ARROW_BUILD_TYPE make GTK_DOC_V_XREF=": " -mkdir -p ../site/asf-site/docs/c_glib -rsync -r doc/reference/html/ ../site/asf-site/docs/c_glib -popd - # Make C++ documentation pushd arrow/cpp/apidoc rm -rf html/* From b1b5050b6149560ba78e8c551f403aa9328fa1cf Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Tue, 16 Jan 2018 13:31:25 -0500 Subject: [PATCH 3/7] Fix GLib doc build Change-Id: I8f07985c218ee02735839a9757dd1a2cc7159217 --- c_glib/arrow-glib/Makefile.am | 7 ++++++- dev/gen_apidocs/Dockerfile | 12 ++++-------- dev/gen_apidocs/create_documents.sh | 25 +++++++++++++++++-------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/c_glib/arrow-glib/Makefile.am b/c_glib/arrow-glib/Makefile.am index 16d07031427..9148f8a583a 100644 --- a/c_glib/arrow-glib/Makefile.am +++ b/c_glib/arrow-glib/Makefile.am @@ -16,6 +16,7 @@ # under the License. CLEANFILES = +DISTCLEANFILES = EXTRA_DIST = \ meson.build @@ -169,6 +170,10 @@ BUILT_SOURCES = \ stamp-enums.c \ stamp-enums.h +DISTCLEANFILES += \ + stamp-enums.c \ + stamp-enums.h + EXTRA_DIST += \ enums.c.template \ enums.h.template @@ -214,7 +219,7 @@ INTROSPECTION_SCANNER_ARGS = INTROSPECTION_SCANNER_ENV = if USE_ARROW_BUILD_DIR INTROSPECTION_SCANNER_ENV += \ - LD_LIBRARY_PATH=$(ARROW_LIB_DIR):$${PKG_CONFIG_PATH} + LD_LIBRARY_PATH=$(ARROW_LIB_DIR):$${LD_LIBRARY_PATH} endif if OS_MACOS INTROSPECTION_SCANNER_ENV += \ diff --git a/dev/gen_apidocs/Dockerfile b/dev/gen_apidocs/Dockerfile index ca4718e6378..f5502fb177c 100644 --- a/dev/gen_apidocs/Dockerfile +++ b/dev/gen_apidocs/Dockerfile @@ -14,18 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM ubuntu:14.04 -# Prerequsites for apt-add-repository -RUN apt-get update && apt-get install -y \ - software-properties-common python-software-properties +FROM ubuntu:16.04 # Basic OS dependencies -RUN apt-add-repository -y ppa:ubuntu-toolchain-r/test && \ - apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y \ wget \ rsync \ git \ - gcc-4.9 \ - g++-4.9 \ + gcc \ + g++ \ build-essential # This will install conda in /home/ubuntu/miniconda RUN wget -O /tmp/miniconda.sh \ diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 59c67f68582..4b6cf11b1b9 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -27,6 +27,7 @@ export ARROW_HOME=$(pwd)/dist export PARQUET_HOME=$(pwd)/dist CONDA_BASE=/home/ubuntu/miniconda export LD_LIBRARY_PATH=$(pwd)/dist/lib:${CONDA_BASE}/lib:${LD_LIBRARY_PATH} +export PKG_CONFIG_PATH=$(pwd)/dist/lib/pkgconfig:${PKG_CONFIG_PATH} export PATH=${CONDA_BASE}/bin:${PATH} # Prepare the asf-site before copying api docs @@ -45,6 +46,8 @@ source activate pyarrow-dev export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX export BOOST_ROOT=$CONDA_PREFIX export PARQUET_BUILD_TOOLCHAIN=$CONDA_PREFIX +export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:${LD_LIBRARY_PATH} +export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH} CPP_BUILD_DIR=$(pwd)/arrow/cpp/build_docs @@ -63,15 +66,21 @@ popd # Build c_glib documentation pushd arrow/c_glib -rm -rf doc/reference/html/* -./autogen.sh -./configure \ - --with-arrow-cpp-build-dir=$CPP_BUILD_DIR \ - --with-arrow-cpp-build-type=$ARROW_BUILD_TYPE \ +if [ -f Makefile ]; then + make distclean + # Work around for 'make distclean' removes doc/reference/xml/ + git checkout doc/reference/xml +fi +rm -rf build_docs +mkdir build_docs +pushd build_docs +../configure \ + --prefix=${AROW_HOME} \ --enable-gtk-doc -LD_LIBRARY_PATH=$CPP_BUILD_DIR/$ARROW_BUILD_TYPE make GTK_DOC_V_XREF=": " -mkdir -p ../site/asf-site/docs/c_glib -rsync -r doc/reference/html/ ../site/asf-site/docs/c_glib +make -j4 GTK_DOC_V_XREF=": " +mkdir -p ../../site/asf-site/docs/c_glib +rsync -r doc/reference/html/ ../../site/asf-site/docs/c_glib +popd popd # Build Parquet C++ From dbf8be8e47ddab1892224d7765f1779349a53480 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Tue, 16 Jan 2018 21:28:41 -0500 Subject: [PATCH 4/7] Disable auto-reconfigure Change-Id: Ic15d52b0ff9385c03767e08bdcbd5c7dfe0c185c --- dev/gen_apidocs/create_documents.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 4b6cf11b1b9..9faec66ac68 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -67,10 +67,13 @@ popd # Build c_glib documentation pushd arrow/c_glib if [ -f Makefile ]; then + # Ensure updating to prevent auto re-configure + touch configure **/Makefile make distclean # Work around for 'make distclean' removes doc/reference/xml/ git checkout doc/reference/xml fi +./autogen.sh rm -rf build_docs mkdir build_docs pushd build_docs From 0fcb1e11e8b440f07db0628298418f6b16cc3907 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Tue, 16 Jan 2018 22:23:55 -0500 Subject: [PATCH 5/7] Use gcc 4.9 rather than default gcc because of gcc5 ABI issues Change-Id: I94ba08a94ad8f6e4dc0e925d2fc3ce3aa7d642b4 --- dev/gen_apidocs/Dockerfile | 4 ++-- dev/gen_apidocs/create_documents.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dev/gen_apidocs/Dockerfile b/dev/gen_apidocs/Dockerfile index f5502fb177c..70643400517 100644 --- a/dev/gen_apidocs/Dockerfile +++ b/dev/gen_apidocs/Dockerfile @@ -20,8 +20,8 @@ RUN apt-get update && apt-get install -y \ wget \ rsync \ git \ - gcc \ - g++ \ + gcc-4.9 \ + g++-4.9 \ build-essential # This will install conda in /home/ubuntu/miniconda RUN wget -O /tmp/miniconda.sh \ diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 9faec66ac68..8e24f874522 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -49,6 +49,9 @@ export PARQUET_BUILD_TOOLCHAIN=$CONDA_PREFIX export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:${LD_LIBRARY_PATH} export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:${PKG_CONFIG_PATH} +export CC=gcc-4.9 +export CXX=g++-4.9 + CPP_BUILD_DIR=$(pwd)/arrow/cpp/build_docs rm -rf $CPP_BUILD_DIR From 5734a651997e83cb6f254b6c79eb1e7c2b364429 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Tue, 16 Jan 2018 23:43:18 -0500 Subject: [PATCH 6/7] Use JDK7 for Java on Ubuntu 16.04 Change-Id: If9e92d40ba0febae913b4b28c13176406184f7da --- dev/gen_apidocs/Dockerfile | 12 +++++++++++- dev/gen_apidocs/create_documents.sh | 23 ++++++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/dev/gen_apidocs/Dockerfile b/dev/gen_apidocs/Dockerfile index 70643400517..da740ee0773 100644 --- a/dev/gen_apidocs/Dockerfile +++ b/dev/gen_apidocs/Dockerfile @@ -15,6 +15,7 @@ # limitations under the License. # FROM ubuntu:16.04 + # Basic OS dependencies RUN apt-get update && apt-get install -y \ wget \ @@ -22,7 +23,15 @@ RUN apt-get update && apt-get install -y \ git \ gcc-4.9 \ g++-4.9 \ - build-essential + build-essential \ + software-properties-common + +# Java build fails with default JDK8 +RUN add-apt-repository ppa:openjdk-r/ppa &&\ + apt-get update &&\ + apt-get install -y openjdk-7-jdk &&\ + update-java-alternatives -s java-1.7.0-openjdk-amd64 + # This will install conda in /home/ubuntu/miniconda RUN wget -O /tmp/miniconda.sh \ https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ @@ -69,6 +78,7 @@ RUN /home/ubuntu/miniconda/bin/conda create -y -q -n pyarrow-dev \ doxygen \ maven \ -c conda-forge + ADD . /apache-arrow WORKDIR /apache-arrow CMD arrow/dev/gen_apidocs/create_documents.sh diff --git a/dev/gen_apidocs/create_documents.sh b/dev/gen_apidocs/create_documents.sh index 8e24f874522..54031262b3a 100755 --- a/dev/gen_apidocs/create_documents.sh +++ b/dev/gen_apidocs/create_documents.sh @@ -39,6 +39,20 @@ git clone --branch=asf-site \ https://git-wip-us.apache.org/repos/asf/arrow-site.git asf-site popd +# Make Java documentation +export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 +wget http://mirrors.gigenet.com/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz +tar xvf apache-maven-3.5.2-bin.tar.gz +export PATH=$(pwd)/apache-maven-3.5.2/bin:$PATH + +pushd arrow/java +rm -rf target/site/apidocs/* +mvn -Drat.skip=true install +mvn -Drat.skip=true site +mkdir -p ../site/asf-site/docs/java/ +rsync -r target/site/apidocs/ ../site/asf-site/docs/java/ +popd + # Make Python documentation (Depends on C++ ) # Build Arrow C++ source activate pyarrow-dev @@ -121,12 +135,3 @@ doxygen Doxyfile mkdir -p ../../site/asf-site/docs/cpp rsync -r html/ ../../site/asf-site/docs/cpp popd - -# Make Java documentation -pushd arrow/java -rm -rf target/site/apidocs/* -mvn -Drat.skip=true install -mvn -Drat.skip=true site -mkdir -p ../site/asf-site/docs/java/ -rsync -r target/site/apidocs/ ../site/asf-site/docs/java/ -popd From 5b907acd07a9ddaee3e073ae220983fd57c09e14 Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Tue, 16 Jan 2018 23:47:57 -0500 Subject: [PATCH 7/7] Add explicit instructions for uploading API docs to website Change-Id: Id59ce4ea69d1aaa8a90c678d3f6dda9f1b7a7fcb --- dev/release/RELEASE_MANAGEMENT.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev/release/RELEASE_MANAGEMENT.md b/dev/release/RELEASE_MANAGEMENT.md index 73eaf5f95b3..0f8c2202fef 100644 --- a/dev/release/RELEASE_MANAGEMENT.md +++ b/dev/release/RELEASE_MANAGEMENT.md @@ -112,6 +112,15 @@ software must be built in order to create the documentation, so this step may take some time to run, especially the first time around as the Docker container will also have to be built. +To upload the updated documentation to the website, navigate to `site/asf-site` +and commit all changes: + +``` +pushd site/asf-site +git add . +git commit -m "Updated API documentation for version X.Y.Z" +``` + After successfully creating the API documentation the website can be run locally to browse the API documentation from the top level `Documentation` menu. To run the website issue the command: