Skip to content

Commit

Permalink
Remove hard-coding of RAPIDS version where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Mar 8, 2024
1 parent 4b29fb8 commit 04ac412
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 3 additions & 1 deletion ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
cuxfilter

export RAPIDS_VERSION_NUMBER="24.04"
export RAPIDS_VERSION="$(rapids-version)"
export RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
export RAPIDS_VERSION_NUMBER="$RAPIDS_VERSION_MAJOR_MINOR"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build Python docs"
Expand Down
6 changes: 0 additions & 6 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ function sed_runner() {
sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak
}

# RTD update
sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/source/conf.py
sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/source/conf.py
# docs update
sed_runner "/cuxfilter=[0-9]\{2\}.[0-9]\{2\}/ s/=[0-9]\{2\}.[0-9]\{2\}/=${NEXT_SHORT_TAG}/g" docs/source/user_guide/installation.rst

Expand Down Expand Up @@ -69,6 +66,3 @@ sed_runner "/cuxfilter=[0-9]\{2\}.[0-9]\{2\}/ s/=[0-9]\{2\}.[0-9]\{2\}/=${NEXT_S
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" ${FILE};
done

sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
sed_runner "s/RAPIDS_VERSION=.*/RAPIDS_VERSION=${NEXT_SHORT_TAG}.*/g" ci/test_external.sh
9 changes: 7 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

from packaging.version import Version

import cuxfilter

# -- Project information -----------------------------------------------------
project = "cuxfilter"
copyright = "2018-2023, NVIDIA Corporation"
Expand All @@ -9,10 +13,11 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
CUXFILTER_VERSION = Version(cuxfilter.__version__)
# The short X.Y version.
version = '24.04'
version = f"{CUXFILTER_VERSION.major:02}.{CUXFILTER_VERSION.minor:02}"
# The full version, including alpha/beta/rc tags
release = '24.04.00'
release = f"{CUXFILTER_VERSION.major:02}.{CUXFILTER_VERSION.minor:02}.{CUXFILTER_VERSION.micro:02}"

nbsphinx_allow_errors = True

Expand Down

0 comments on commit 04ac412

Please sign in to comment.