Skip to content

Commit 2dd3001

Browse files
authored
enforce wheel size limits, README formatting in CI (#67)
Contributes to rapidsai/build-planning#110 Proposes adding 2 types of validation on wheels in CI, to ensure we continue to produce wheels that are suitable for PyPI. * checks on wheel size (compressed), - *to be sure they're under PyPI limits* - *and to prompt discussion on PRs that significantly increase wheel sizes* * checks on README formatting - *to ensure they'll render properly as the PyPI project homepages* - *e.g. like how https://github.com/scikit-learn/scikit-learn/blob/main/README.rst becomes https://pypi.org/project/scikit-learn/* Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) - Alex Barghi (https://github.com/alexbarghi-nv) URL: #67
1 parent 5a17bbe commit 2dd3001

File tree

9 files changed

+69
-3
lines changed

9 files changed

+69
-3
lines changed

ci/build_wheel_cugraph-dgl.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
set -euo pipefail
55

6-
./ci/build_wheel.sh cugraph-dgl python/cugraph-dgl
6+
package_dir="python/cugraph-dgl"
7+
8+
./ci/build_wheel.sh cugraph-dgl ${package_dir}
9+
./ci/validate_wheel.sh ${package_dir} dist

ci/build_wheel_cugraph-pyg.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
set -euo pipefail
55

6-
./ci/build_wheel.sh cugraph-pyg python/cugraph-pyg
6+
package_dir="python/cugraph-pyg"
7+
8+
./ci/build_wheel.sh cugraph-pyg ${package_dir}
9+
./ci/validate_wheel.sh ${package_dir} dist

ci/build_wheel_pylibwholegraph.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
set -euo pipefail
55

6+
package_dir="python/pylibwholegraph"
7+
68
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DBUILD_SHARED_LIBS=OFF;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE;-DCUDA_STATIC_RUNTIME=ON;-DWHOLEGRAPH_BUILD_WHEELS=ON"
79

8-
./ci/build_wheel.sh pylibwholegraph python/pylibwholegraph
10+
./ci/build_wheel.sh pylibwholegraph ${package_dir}
11+
./ci/validate_wheel.sh ${package_dir} final_dist

ci/validate_wheel.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# Copyright (c) 2024, NVIDIA CORPORATION.
3+
4+
set -euo pipefail
5+
6+
package_dir=$1
7+
wheel_dir_relative_path=$2
8+
9+
cd "${package_dir}"
10+
11+
rapids-logger "validate packages with 'pydistcheck'"
12+
13+
pydistcheck \
14+
--inspect \
15+
"$(echo ${wheel_dir_relative_path}/*.whl)"
16+
17+
rapids-logger "validate packages with 'twine'"
18+
19+
twine check \
20+
--strict \
21+
"$(echo ${wheel_dir_relative_path}/*.whl)"

python/cugraph-dgl/pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,11 @@ include = [
6060
build-backend = "setuptools.build_meta"
6161
dependencies-file = "../../dependencies.yaml"
6262
matrix-entry = "cuda_suffixed=true"
63+
64+
[tool.pydistcheck]
65+
select = [
66+
"distro-too-large-compressed",
67+
]
68+
69+
# PyPI limit is 100 MiB, fail CI before we get too close to that
70+
max_allowed_size_compressed = '75M'

python/cugraph-pyg/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# cugraph-pyg
2+
3+
## Description
4+
5+
cuGraph-PyG supports PyTorch Geometric (PyG) and implements PyG's GraphStore, FeatureStore, Loader, and Sampler interfaces.

python/cugraph-pyg/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ testpaths = ["cugraph_pyg/tests"]
1616
name = "cugraph-pyg"
1717
dynamic = ["version"]
1818
description = "cugraph-pyg - PyG support for cuGraph massive-scale, ultra-fast GPU graph analytics."
19+
readme = { file = "README.md", content-type = "text/markdown" }
1920
authors = [
2021
{ name = "NVIDIA Corporation" },
2122
]
@@ -70,3 +71,11 @@ include = [
7071
build-backend = "setuptools.build_meta"
7172
dependencies-file = "../../dependencies.yaml"
7273
matrix-entry = "cuda_suffixed=true"
74+
75+
[tool.pydistcheck]
76+
select = [
77+
"distro-too-large-compressed",
78+
]
79+
80+
# PyPI limit is 100 MiB, fail CI before we get too close to that
81+
max_allowed_size_compressed = '75M'

python/pylibwholegraph/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# pylibwholegraph
2+
3+
WholeGraph supports PyTorch and provides a distributed graph and kv store.
4+
5+
Both cuGraph-DGL and cuGraph-PyG can leverage WholeGraph for even greater scalability.

python/pylibwholegraph/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ requires = [
2323
name = "pylibwholegraph"
2424
dynamic = ["version"]
2525
description = "pylibwholegraph - GPU Graph Storage for GNN feature and graph structure"
26+
readme = { file = "README.md", content-type = "text/markdown" }
2627
authors = [
2728
{ name = "NVIDIA Corporation" },
2829
]
@@ -74,3 +75,11 @@ wheel.packages = ["pylibwholegraph"]
7475
provider = "scikit_build_core.metadata.regex"
7576
input = "pylibwholegraph/VERSION"
7677
regex = "(?P<value>.*)"
78+
79+
[tool.pydistcheck]
80+
select = [
81+
"distro-too-large-compressed",
82+
]
83+
84+
# detect when package size grows significantly
85+
max_allowed_size_compressed = '350M'

0 commit comments

Comments
 (0)