From 7f616689f5e456b1876d18ccf738f92a4b65ba7b Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 19 Apr 2024 15:05:56 -0400 Subject: [PATCH 01/14] chore(ci): Build docs --- ci/build-test/wheel.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/build-test/wheel.sh b/ci/build-test/wheel.sh index 6cf30ace..e7c3422a 100755 --- a/ci/build-test/wheel.sh +++ b/ci/build-test/wheel.sh @@ -5,7 +5,7 @@ OUTPUT_DIR="${OUTPUT_DIR:-"/tmp/output"}" ./ci/update-versions.sh "${RELEASE_VERSION:-}" -pip install build pytest +pip install build pytest sphinx python -m build \ --outdir "${OUTPUT_DIR}" \ @@ -18,3 +18,5 @@ for PKG in "${OUTPUT_DIR}/"*; do pytest rapids-dependency-file-generator -h # test CLI output done + +make -C docs htmlhelp From 68f6757ae0fccb5946486ca7d74f5b61dddf607e Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 19 Apr 2024 15:07:05 -0400 Subject: [PATCH 02/14] Install numpydoc --- ci/build-test/wheel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-test/wheel.sh b/ci/build-test/wheel.sh index e7c3422a..81f43de8 100755 --- a/ci/build-test/wheel.sh +++ b/ci/build-test/wheel.sh @@ -5,7 +5,7 @@ OUTPUT_DIR="${OUTPUT_DIR:-"/tmp/output"}" ./ci/update-versions.sh "${RELEASE_VERSION:-}" -pip install build pytest sphinx +pip install build pytest sphinx numpydoc python -m build \ --outdir "${OUTPUT_DIR}" \ From 9b58eff25441f517b081adcc5e375d4e1c15b63f Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 19 Apr 2024 15:08:28 -0400 Subject: [PATCH 03/14] Install pydata-sphinx-theme --- ci/build-test/wheel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-test/wheel.sh b/ci/build-test/wheel.sh index 81f43de8..79bfc788 100755 --- a/ci/build-test/wheel.sh +++ b/ci/build-test/wheel.sh @@ -5,7 +5,7 @@ OUTPUT_DIR="${OUTPUT_DIR:-"/tmp/output"}" ./ci/update-versions.sh "${RELEASE_VERSION:-}" -pip install build pytest sphinx numpydoc +pip install build pytest sphinx numpydoc pydata-sphinx-theme python -m build \ --outdir "${OUTPUT_DIR}" \ From fa3b48a334144b50cbc78459858bcb8b27fdd885 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 19 Apr 2024 15:13:43 -0400 Subject: [PATCH 04/14] Remove html_static_path --- docs/source/conf.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e10cadb3..75e9aa91 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -51,8 +51,6 @@ "navbar_align": "right", } -html_static_path = ["_static"] - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] From f0e0689d78b90305f253ae6807fe43def41bff6f Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 19 Apr 2024 16:53:01 -0400 Subject: [PATCH 05/14] Add new CI job for docs build --- .github/workflows/build-test.yaml | 7 ++++++ ci/build-test/wheel.sh | 4 +-- ci/build_docs.sh | 41 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100755 ci/build_docs.sh diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index abec04ac..adf9a0e6 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -23,6 +23,13 @@ jobs: with: name: conda_artifacts path: ${{ env.OUTPUT_DIR }} + docs-build: + if: github.ref_type == 'branch' + needs: conda + runs-on: ubuntu-latest + container: rapidsai/ci-conda:latest + steps: + - run: ./ci/build_docs.sh wheel: runs-on: ubuntu-latest container: python:3 diff --git a/ci/build-test/wheel.sh b/ci/build-test/wheel.sh index 79bfc788..6cf30ace 100755 --- a/ci/build-test/wheel.sh +++ b/ci/build-test/wheel.sh @@ -5,7 +5,7 @@ OUTPUT_DIR="${OUTPUT_DIR:-"/tmp/output"}" ./ci/update-versions.sh "${RELEASE_VERSION:-}" -pip install build pytest sphinx numpydoc pydata-sphinx-theme +pip install build pytest python -m build \ --outdir "${OUTPUT_DIR}" \ @@ -18,5 +18,3 @@ for PKG in "${OUTPUT_DIR}/"*; do pytest rapids-dependency-file-generator -h # test CLI output done - -make -C docs htmlhelp diff --git a/ci/build_docs.sh b/ci/build_docs.sh new file mode 100755 index 00000000..2ecde46a --- /dev/null +++ b/ci/build_docs.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright (c) 2023-2024, NVIDIA CORPORATION. + +set -euo pipefail + +rapids-logger "Create test conda environment" +. /opt/conda/etc/profile.d/conda.sh + +ENV_YAML_DIR="$(mktemp -d)" + +rapids-dependency-file-generator \ + --output conda \ + --file_key docs | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -n docs +conda activate docs + +rapids-print-env + +rapids-logger "Downloading artifacts from previous jobs" +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + +rapids-mamba-retry install \ + --channel "${PYTHON_CHANNEL}" \ + rapids-dependency-file-generator + +export RAPIDS_DOCS_DIR="$(mktemp -d)" + +rapids-logger "Build rapids-dependency-file-generator Sphinx docs" +pushd docs +make dirhtml +mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" +mv build/dirhtml/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" +if [[ "${RAPIDS_BUILD_TYPE}" != "pull-request" ]]; then + make text + mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" + mv build/text/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" +fi +popd + +rapids-upload-docs From fdea5687e485f1285767131c08ab457d04118774 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 09:55:06 -0400 Subject: [PATCH 06/14] Add checkout action --- .github/workflows/build-test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index adf9a0e6..103498fd 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -29,6 +29,10 @@ jobs: runs-on: ubuntu-latest container: rapidsai/ci-conda:latest steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false - run: ./ci/build_docs.sh wheel: runs-on: ubuntu-latest From 1254bc922f604f3b10c5618bea3761e5aa5124ab Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 09:59:55 -0400 Subject: [PATCH 07/14] Don't run DFG --- ci/build_docs.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 2ecde46a..197e6348 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -8,10 +8,6 @@ rapids-logger "Create test conda environment" ENV_YAML_DIR="$(mktemp -d)" -rapids-dependency-file-generator \ - --output conda \ - --file_key docs | tee "${ENV_YAML_DIR}/env.yaml" - rapids-mamba-retry env create --yes -n docs conda activate docs From a849de0eedce2dc35d213f158cafffc76c17fdc2 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 10:14:11 -0400 Subject: [PATCH 08/14] Add environment file --- ci/build_docs.sh | 7 ++++++- dependencies.yaml | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 dependencies.yaml diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 197e6348..200914dc 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -8,7 +8,12 @@ rapids-logger "Create test conda environment" ENV_YAML_DIR="$(mktemp -d)" -rapids-mamba-retry env create --yes -n docs +rapids-dependency-file-generator \ + --output conda \ + --file_key docs \ + --matrix "" | tee "${ENV_YAML_DIR}/env.yaml" + +rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n docs conda activate docs rapids-print-env diff --git a/dependencies.yaml b/dependencies.yaml new file mode 100644 index 00000000..c111e6a6 --- /dev/null +++ b/dependencies.yaml @@ -0,0 +1,12 @@ +files: + docs: + output: none + includes: + - docs +dependencies: + docs: + common: + - output_types: [conda] + packages: + - numpydoc + - sphinx From 12f462bd6d9f7429ec12577cba8b030a1af1bd81 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 10:59:39 -0400 Subject: [PATCH 09/14] Download GitHub artifacts --- .github/workflows/build-test.yaml | 4 ++++ ci/build_docs.sh | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 103498fd..de6be9e5 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -33,6 +33,10 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - uses: actions/download-artifact@v4 + with: + name: conda_artifacts + path: artifacts-channel - run: ./ci/build_docs.sh wheel: runs-on: ubuntu-latest diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 200914dc..d568cb99 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -18,11 +18,8 @@ conda activate docs rapids-print-env -rapids-logger "Downloading artifacts from previous jobs" -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - rapids-mamba-retry install \ - --channel "${PYTHON_CHANNEL}" \ + --channel "artifacts-channel" \ rapids-dependency-file-generator export RAPIDS_DOCS_DIR="$(mktemp -d)" From 257eac197f6034c81aab8e65bf60cf0dbc13f153 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 11:05:05 -0400 Subject: [PATCH 10/14] Use absolute path for channel --- ci/build_docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index d568cb99..8a1d8b8c 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -19,7 +19,7 @@ conda activate docs rapids-print-env rapids-mamba-retry install \ - --channel "artifacts-channel" \ + --channel "file://$(pwd)/artifacts-channel" \ rapids-dependency-file-generator export RAPIDS_DOCS_DIR="$(mktemp -d)" From 0dbd1bfef4889ce7ab14900923497e471566c93d Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 11:37:15 -0400 Subject: [PATCH 11/14] Install make --- dependencies.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/dependencies.yaml b/dependencies.yaml index c111e6a6..ca11ae55 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -8,5 +8,6 @@ dependencies: common: - output_types: [conda] packages: + - make - numpydoc - sphinx From f107e05469ec98f7b8dcd161240682f1c25c1762 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 11:41:06 -0400 Subject: [PATCH 12/14] Install pydata-sphinx-theme --- dependencies.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/dependencies.yaml b/dependencies.yaml index ca11ae55..214f50b7 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -10,4 +10,5 @@ dependencies: packages: - make - numpydoc + - pydata-sphinx-theme - sphinx From b72dd47d0d28df815f1f589ce85017ec49d609f7 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 11:46:03 -0400 Subject: [PATCH 13/14] Don't use RAPIDS_BUILD_TYPE --- ci/build_docs.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 8a1d8b8c..8b3d9080 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -29,11 +29,9 @@ pushd docs make dirhtml mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" mv build/dirhtml/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" -if [[ "${RAPIDS_BUILD_TYPE}" != "pull-request" ]]; then - make text - mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" - mv build/text/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" -fi +make text +mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" +mv build/text/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" popd rapids-upload-docs From 3ae6c2e80abae229e4540389f93264c270cdd4dd Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Mon, 22 Apr 2024 12:46:34 -0400 Subject: [PATCH 14/14] Upload GitHub artifacts --- .github/workflows/build-test.yaml | 4 ++++ ci/build_docs.sh | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index de6be9e5..b5da7dbb 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -38,6 +38,10 @@ jobs: name: conda_artifacts path: artifacts-channel - run: ./ci/build_docs.sh + - uses: actions/upload-artifact@v4 + with: + name: docs_artifacts + path: ${{ env.OUTPUT_DIR }} wheel: runs-on: ubuntu-latest container: python:3 diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 8b3d9080..c195025f 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -22,16 +22,12 @@ rapids-mamba-retry install \ --channel "file://$(pwd)/artifacts-channel" \ rapids-dependency-file-generator -export RAPIDS_DOCS_DIR="$(mktemp -d)" - rapids-logger "Build rapids-dependency-file-generator Sphinx docs" pushd docs make dirhtml -mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" -mv build/dirhtml/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/html" +mkdir -p "${OUTPUT_DIR}/rapids-dependency-file-generator/html" +mv build/dirhtml/* "${OUTPUT_DIR}/rapids-dependency-file-generator/html" make text -mkdir -p "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" -mv build/text/* "${RAPIDS_DOCS_DIR}/rapids-dependency-file-generator/txt" +mkdir -p "${OUTPUT_DIR}/rapids-dependency-file-generator/txt" +mv build/text/* "${OUTPUT_DIR}/rapids-dependency-file-generator/txt" popd - -rapids-upload-docs