Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rapids-upload-docs script #56

Merged
merged 1 commit into from
May 30, 2023

Conversation

ajschmidt8
Copy link
Member

@ajschmidt8 ajschmidt8 commented May 19, 2023

Summary

This PR adds a new script, rapids-upload-docs.

The purpose of this script is to consolidate the logic for uploading documentation to S3.

This will be useful for the upcoming two efforts:

  • enabling documentation files to be previewed on PRs
  • temporarily halting documentation uploads to the rapidsai-docs bucket while we restructure the bucket in anticipation of some upcoming website changes

Usage

The snippet below shows how the script can be used.

It requires two environment variables be set:

  • RAPIDS_VERSION_NUMBER - a RAPIDS version (e.g. 23.06)
  • RAPIDS_DOCS_DIR - a path to a directory containing the docs to upload (see folder structure below)
export RAPIDS_VERSION_NUMBER="23.06"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build cuDF Sphinx docs"
pushd docs/cudf
sphinx-build -b dirhtml source _html
sphinx-build -b text source _text
mkdir -p "${RAPIDS_DOCS_DIR}/cudf/"{html,txt}
mv _html/* "${RAPIDS_DOCS_DIR}/cudf/html"
mv _text/* "${RAPIDS_DOCS_DIR}/cudf/txt"
popd

rapids-logger "Build dask-cuDF Sphinx docs"
pushd docs/dask_cudf
sphinx-build -b dirhtml source _html
sphinx-build -b text source _text
mkdir -p "${RAPIDS_DOCS_DIR}/dask-cudf/"{html,txt}
mv _html/* "${RAPIDS_DOCS_DIR}/dask-cudf/html"
mv _text/* "${RAPIDS_DOCS_DIR}/dask-cudf/txt"
popd

rapids-upload-docs

The structure of RAPIDS_DOCS_DIR should look like this:

$RAPIDS_DOCS_DIR
├── cudf
│   ├── html
│   │   └── <html files>
│   └── txt
│       └── <txt files>
└── dask-cudf
    ├── html
    │   └── <html files>
    └── txt
        └── <txt files>

ajschmidt8 added a commit to rapidsai/shared-workflows that referenced this pull request May 19, 2023
This PR is necessary for rapidsai/gha-tools#56.

Note: this path uses `/tmp` instead of the `${{ github.workspace }}` convention used in places like this: https://github.com/rapidsai/shared-action-workflows/blob/914f969d872d37d57f5449407635fc3ddb8d8e4b/.github/workflows/conda-cpp-tests.yaml#L103-L105. The problem with `github.workspace` is that it's the same directory that the code is checked out to. Therefore since a `docs` directory already exists in `cudf`'s root directory, this would cause problems. Assuming this `/tmp` path works as expected, I will open up a follow-up PR to update the `github.workspace` instances to follow this convention.
@ajschmidt8
Copy link
Member Author

ajschmidt8 commented May 19, 2023

This PR requires rapidsai/shared-workflows#93.

Reverted that PR in rapidsai/shared-workflows#107.

@ajschmidt8 ajschmidt8 marked this pull request as ready for review May 24, 2023 16:57
ajschmidt8 added a commit to rapidsai/shared-workflows that referenced this pull request May 30, 2023
This PR is necessary for rapidsai/gha-tools#56.

Note: the path in this PR uses `/tmp` instead of the `${{
github.workspace }}` convention used in places like this:
https://github.com/rapidsai/shared-action-workflows/blob/914f969d872d37d57f5449407635fc3ddb8d8e4b/.github/workflows/conda-cpp-tests.yaml#L103-L105

The problem with `github.workspace` is that it's the same directory that
the code is checked out to. Therefore since a `docs` directory already
exists in `cudf`'s root directory, this would cause problems. Assuming
this `/tmp` path works as expected, I will open up a follow-up PR to
update the `github.workspace` instances to follow this convention.
@ajschmidt8
Copy link
Member Author

@AyodeAwe, I will merge this PR for now since the script is unused and we can test it out when you're finished with the nginx work.

@ajschmidt8 ajschmidt8 merged commit c9fded7 into rapidsai:main May 30, 2023
@ajschmidt8 ajschmidt8 deleted the rapids-upload-docs branch May 30, 2023 18:03
rapids-bot bot pushed a commit to rapidsai/rmm that referenced this pull request Jun 5, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1288
rapids-bot bot pushed a commit to rapidsai/cusignal that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #580
rapids-bot bot pushed a commit to rapidsai/cuxfilter that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #489
rapids-bot bot pushed a commit to rapidsai/kvikio that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #234
rapids-bot bot pushed a commit to rapidsai/rapids-cmake that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #419
rapids-bot bot pushed a commit to rapidsai/cucim that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #570
rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1181
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #13518
rapids-bot bot pushed a commit to rapidsai/raft that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - Corey J. Nolet (https://github.com/cjnolet)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1578
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Jun 7, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #5457
rapids-bot bot pushed a commit to rapidsai/cugraph that referenced this pull request Jun 8, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #3640
rapids-bot bot pushed a commit to rapidsai/dask-cuda that referenced this pull request Jun 8, 2023
This PR updates the `build_docs.sh` script to use the new consolidatory `rapids-upload-script` [shared script](rapidsai/gha-tools#56). 

The shared script enables docs uploads to applicable S3 buckets for branch. nightly and PR builds.

Authors:
  - Jake Awe (https://github.com/AyodeAwe)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1194
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants