Skip to content

Commit

Permalink
enforce wheel size limits, README formatting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Nov 13, 2024
1 parent eddc5d2 commit d0d4634
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/build_wheel_distributed_ucxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ package_dir="python/distributed-ucxx"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

./ci/build_wheel.sh distributed-ucxx "${package_dir}"
./ci/validate_wheel.sh "${package_dir}" dist

RAPIDS_PY_WHEEL_NAME="distributed_ucxx_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${package_dir}/dist"
2 changes: 2 additions & 0 deletions ci/build_wheel_libucxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ python -m auditwheel repair \
-w "${package_dir}/final_dist" \
${package_dir}/dist/*

./ci/validate_wheel.sh "${package_dir}" final_dist

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 cpp "${package_dir}/final_dist"
2 changes: 2 additions & 0 deletions ci/build_wheel_ucxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ python -m auditwheel repair \
-w "${package_dir}/final_dist" \
${package_dir}/dist/*

./ci/validate_wheel.sh "${package_dir}" final_dist

RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python "${package_dir}/final_dist"
21 changes: 21 additions & 0 deletions ci/validate_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.

set -euo pipefail

package_dir=$1
wheel_dir_relative_path=$2

cd "${package_dir}"

rapids-logger "validate packages with 'pydistcheck'"

pydistcheck \
--inspect \
"$(echo ${wheel_dir_relative_path}/*.whl)"

rapids-logger "validate packages with 'twine'"

twine check \
--strict \
"$(echo ${wheel_dir_relative_path}/*.whl)"
8 changes: 8 additions & 0 deletions python/distributed-ucxx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ matrix-entry = "cuda_suffixed=true"
[tool.setuptools.dynamic]
version = {file = "distributed_ucxx/VERSION"}

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# PyPI limit is 100 MiB, fail CI before we get too close to that
max_allowed_size_compressed = '75M'

[tool.pytest.ini_options]
markers = [
"ignore_alive_references",
Expand Down
8 changes: 8 additions & 0 deletions python/libucxx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ requires = [
"libucx==1.15.0",
"ninja",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# PyPI limit is 100 MiB, fail CI before we get too close to that
max_allowed_size_compressed = '75M'
8 changes: 8 additions & 0 deletions python/ucxx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,11 @@ wheel.exclude = ["*.pyx", "CMakeLists.txt"]
provider = "scikit_build_core.metadata.regex"
input = "ucxx/VERSION"
regex = "(?P<value>.*)"

[tool.pydistcheck]
select = [
"distro-too-large-compressed",
]

# PyPI limit is 100 MiB, fail CI before we get too close to that
max_allowed_size_compressed = '75M'

0 comments on commit d0d4634

Please sign in to comment.