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 #12741

Merged
merged 27 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4bf7f75
Remove gitattributes.
vyasr Feb 9, 2023
269ab8b
Remove all versioneer.py files.
vyasr Feb 9, 2023
6811f47
Remove all _version.py files.
vyasr Feb 9, 2023
aa01802
Remove references to versioneer from setup.cfg files.
vyasr Feb 9, 2023
ab98892
Update __init__.py and setup.py
vyasr Feb 9, 2023
290a54b
Update all new spots in update-version.sh.
vyasr Feb 9, 2023
eeae13e
Add new script for wheel updates.
vyasr Feb 9, 2023
ba1286f
Update pr.yaml.
vyasr Feb 9, 2023
1109657
Remove extra ref in pre-commit config.
vyasr Feb 9, 2023
add09db
Remove versioneer skip in copyright check.
vyasr Feb 9, 2023
369c1b1
Versioneer is no longer required for builds.
vyasr Feb 9, 2023
4415eab
Remove mypy exclude for _version.py.
vyasr Feb 9, 2023
6841120
Merge remote-tracking branch 'origin/branch-23.04' into feat/remove_v…
vyasr Feb 9, 2023
254be25
Add back dropped comment.
vyasr Feb 9, 2023
ecfdb73
Merge remote-tracking branch 'origin/branch-23.04' into feat/remove_v…
vyasr Feb 21, 2023
93bd02e
Update to latest approach for workflows.
vyasr Feb 21, 2023
3a2163f
Move cuda suffix logic into wheels script.
vyasr Feb 21, 2023
70c511f
Make sure the URL is not modified.
vyasr Feb 21, 2023
e20fc96
Update script documentation.
vyasr Feb 21, 2023
fab9332
Remove now unnecessary custom backend in favor of direct modification…
vyasr Feb 21, 2023
0268ce2
Remove now invalid stream usage version update.
vyasr Feb 21, 2023
3c5b85f
Update update-version.sh.
vyasr Feb 21, 2023
a09193d
Pin rmm in pyproject.toml.
vyasr Feb 21, 2023
3128853
Use normalized version.
vyasr Feb 21, 2023
4845b39
Update regex for dask-cudf.
vyasr Feb 21, 2023
84ad86e
Merge remote-tracking branch 'origin/branch-23.04' into feat/remove_v…
vyasr Feb 22, 2023
a04e2c6
Remove lingering references to strings_udf.
vyasr Feb 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitattributes

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
package-name: cudf
package-dir: python/cudf
skbuild-configure-options: "-DCUDF_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF"
uses-setup-env-vars: false
wheel-publish-cudf:
needs: wheel-build-cudf
secrets: inherit
Expand All @@ -85,6 +86,7 @@ jobs:
date: ${{ inputs.date }}
package-name: dask_cudf
package-dir: python/dask_cudf
uses-setup-env-vars: false
wheel-publish-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
package-name: cudf
package-dir: python/cudf
skbuild-configure-options: "-DCUDF_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF"
uses-setup-env-vars: false
wheel-tests-cudf:
needs: wheel-build-cudf
secrets: inherit
Expand All @@ -112,6 +113,7 @@ jobs:
package-name: dask_cudf
package-dir: python/dask_cudf
before-wheel: "RAPIDS_PY_WHEEL_NAME=cudf_cu11 rapids-download-wheels-from-s3 ./local-cudf && pip install --no-deps ./local-cudf/cudf*.whl"
uses-setup-env-vars: false
wheel-tests-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ repos:
exclude: |
(?x)^(
.*test.*|
^CHANGELOG.md$|
^.*versioneer.py$
^CHANGELOG.md$
)

default_language_version:
Expand Down
3 changes: 1 addition & 2 deletions ci/checks/copyright.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,6 @@
]
ExemptFiles = [
re.compile(r"cpp/include/cudf_test/cxxopts.hpp"),
re.compile(r"versioneer[.]py"),
]

# this will break starting at year 10000, which is probably OK :)
Expand Down
33 changes: 33 additions & 0 deletions ci/release/apply_wheel_modifications.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
#
# Usage: bash apply_wheel_modifications.sh <new_version> <cuda_suffix>

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

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

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

# cudf setup.py cuda suffixes
sed -i "s/name=\"cudf\"/name=\"cudf${CUDA_SUFFIX}\"/g" python/cudf/setup.py
sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/cudf/setup.py
sed -i "s/ptxcompiler/ptxcompiler${CUDA_SUFFIX}/g" python/cudf/setup.py
sed -i "s/cubinlinker/cubinlinker${CUDA_SUFFIX}/g" python/cudf/setup.py

# cudf pyproject.toml cuda suffixes
sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/cudf/pyproject.toml

# dask_cudf setup.py cuda suffixes
sed -i "s/name=\"dask-cudf\"/name=\"dask-cudf${CUDA_SUFFIX}\"/g" python/dask_cudf/setup.py
# Need to provide the == to avoid modifying the URL
sed -i "s/\"cudf==/\"cudf${CUDA_SUFFIX}==/g" python/dask_cudf/setup.py
wence- marked this conversation as resolved.
Show resolved Hide resolved
27 changes: 19 additions & 8 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,27 @@ function sed_runner() {
# cpp update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' cpp/CMakeLists.txt

# cpp stream testing update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' cpp/tests/utilities/identify_stream_usage/CMakeLists.txt

# Python update
# Python CMakeLists updates
sed_runner 's/'"cudf_version .*)"'/'"cudf_version ${NEXT_FULL_TAG})"'/g' python/cudf/CMakeLists.txt


# cpp libcudf_kafka update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' cpp/libcudf_kafka/CMakeLists.txt

# cpp cudf_jni update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' java/src/main/native/CMakeLists.txt

# Python __init__.py updates
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cudf/cudf/__init__.py
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/dask_cudf/dask_cudf/__init__.py
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cudf_kafka/cudf_kafka/__init__.py
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/custreamz/custreamz/__init__.py

# Python setup.py updates
sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cudf/setup.py
sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/dask_cudf/setup.py
sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cudf_kafka/setup.py
sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/custreamz/setup.py

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

Expand Down Expand Up @@ -81,9 +89,12 @@ sed_runner "s/CUDF_TAG branch-${CURRENT_SHORT_TAG}/CUDF_TAG branch-${NEXT_SHORT_
# 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/rmm{cuda_suffix}.*\",/rmm{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cudf/setup.py
sed_runner "s/cudf{cuda_suffix}==.*\",/cudf{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/dask_cudf/setup.py
# Dependency versions in setup.py
sed_runner "s/rmm==.*\",/rmm==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cudf/setup.py
sed_runner "s/cudf==.*\",/cudf==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/dask_cudf/setup.py

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

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

This file was deleted.

4 changes: 1 addition & 3 deletions python/cudf/cudf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import rmm

from cudf import api, core, datasets, testing
from cudf._version import get_versions
from cudf.api.extensions import (
register_dataframe_accessor,
register_index_accessor,
Expand Down Expand Up @@ -112,8 +111,7 @@
rmm.register_reinitialize_hook(clear_cache)


__version__ = get_versions()["version"]
del get_versions
__version__ = "23.04.00"
wence- marked this conversation as resolved.
Show resolved Hide resolved
wence- marked this conversation as resolved.
Show resolved Hide resolved

__all__ = [
"BaseIndex",
Expand Down
Loading