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

Stop using versioneer to manage versions #5245

Merged
merged 14 commits into from
Feb 22, 2023
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY

skbuild-configure-options: "-DCUML_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DDISABLE_DEPRECATION_WARNINGS=ON -DCPM_cumlprims_mg_SOURCE=/project/cumlprims_mg/"
uses-setup-env-vars: false
wheel-publish-cuml:
needs: wheel-build-cuml
secrets: inherit
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
extra-repo-sha: branch-23.02
extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY
skbuild-configure-options: "-DCUML_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DDISABLE_DEPRECATION_WARNINGS=ON -DCPM_cumlprims_mg_SOURCE=/project/cumlprims_mg/"
uses-setup-env-vars: false
wheel-tests-cuml:
needs: wheel-build-cuml
secrets: inherit
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

23 changes: 23 additions & 0 deletions ci/release/apply_wheel_modifications.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
#
# Usage: bash apply_wheel_modifications.sh <new_version>

VERSION=${1}
CUDA_SUFFIX=${2}

# __init__.py versions
sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" python/cuml/__init__.py

# setup.py versions
sed -i "s/version=.*,/version=\"${VERSION}\",/g" python/setup.py

# setup.py cuda suffixes
sed -i "s/name=\"cuml\"/name=\"cuml${CUDA_SUFFIX}\"/g" python/setup.py
sed -i "s/cudf/cudf${CUDA_SUFFIX}/g" python/setup.py
sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/setup.py
sed -i "s/raft-dask/raft-dask${CUDA_SUFFIX}/g" python/setup.py

# cudf pyproject.toml cuda suffixes
sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/pyproject.toml
sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/pyproject.toml
27 changes: 20 additions & 7 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,35 @@ NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}')
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
NEXT_UCX_PY_VERSION="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG}).*"

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

# Inplace sed replace; workaround for Linux and Mac
function sed_runner() {
sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak
}


# __init__.py and setup.py versions
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cuml/__init__.py
sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/setup.py

# Dependency versions in pyproject.toml
sed_runner "s/rmm==.*\",/rmm==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pyproject.toml
sed_runner "s/pylibraft==.*\",/pylibraft==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pyproject.toml

# Dependency versions in setup.py
sed_runner "s/cudf==.*\",/cudf==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/setup.py
sed_runner "s/pylibraft==.*\",/pylibraft==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/setup.py
sed_runner "s/raft-dask==.*\",/raft-dask==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/setup.py


# CMakeLists
sed_runner 's/'"CUML VERSION .* LANGUAGES"'/'"CUML VERSION ${NEXT_FULL_TAG} LANGUAGES"'/g' cpp/CMakeLists.txt
sed_runner 's/'"set(CUML_VERSION .*)"'/'"set(CUML_VERSION ${NEXT_FULL_TAG})"'/g' python/CMakeLists.txt

# rapids-cmake version
sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake

Expand Down Expand Up @@ -71,13 +91,6 @@ for FILE in .github/workflows/*.yaml; do
sed_runner "s/dask-cuda.git@branch-[^\"\s]\+/dask-cuda.git@branch-${NEXT_SHORT_TAG}/g" ${FILE};
done

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")

# Wheel builds install intra-RAPIDS dependencies from same release
sed_runner "s/{cuda_suffix}==.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/setup.py
sed_runner "s/{cuda_suffix}==.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/_custom_build/backend.py

for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
done
40 changes: 0 additions & 40 deletions python/_custom_build/backend.py

This file was deleted.

7 changes: 1 addition & 6 deletions python/cuml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,8 @@

from cuml.linear_model.linear_regression import LinearRegression

# Import verion. Remove at end of file
from ._version import get_versions


# Version configuration
__version__ = get_versions()["version"]
del get_versions
__version__ = "23.04.00"


def __getattr__(name):
Expand Down
Loading