Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
44 changes: 44 additions & 0 deletions python/cugraph-pyg/cugraph_pyg/_doctor_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

"""
Smoke check for `rapids doctor` (RAPIDS CLI).

See: https://github.com/rapidsai/rapids-cli#check-plugins
"""


def cugraph_pyg_smoke_check(**kwargs):
"""
A quick check to ensure cugraph-pyg can be imported and its core
submodules are loadable.
"""
try:
import cugraph_pyg

# Ensure core submodules load (touches pylibwholegraph, torch-geometric, etc.)
import cugraph_pyg.data
import cugraph_pyg.tensor

except ImportError as e:
raise ImportError(
"cugraph-pyg or its dependencies could not be imported. "
"Tip: install with `pip install cugraph-pyg` or use a RAPIDS conda environment."
) from e

if not hasattr(cugraph_pyg, "__version__") or not cugraph_pyg.__version__:
raise AssertionError(
"cugraph-pyg smoke check failed: __version__ not found or empty"
)

from cugraph_pyg.utils import import_optional, MissingModule

torch = import_optional("torch")

if isinstance(torch, MissingModule):
import warnings

warnings.warn(
"PyTorch is required to use cuGraph-PyG."
"Please install PyTorch from PyPI or Conda-Forge."
)
3 changes: 3 additions & 0 deletions python/cugraph-pyg/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ dependencies = [
"torch-geometric>=2.5,<2.8",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.entry-points."rapids_doctor_check"]
cugraph_pyg_smoke_check = "cugraph_pyg._doctor_check:cugraph_pyg_smoke_check"

[project.urls]
Homepage = "https://github.com/rapidsai/cugraph-gnn"
Documentation = "https://docs.rapids.ai/api/cugraph/stable/"
Expand Down
39 changes: 39 additions & 0 deletions python/pylibwholegraph/pylibwholegraph/_doctor_check.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

"""
Smoke check for `rapids doctor` (RAPIDS CLI).

See: https://github.com/rapidsai/rapids-cli#check-plugins
"""


def pylibwholegraph_smoke_check(**kwargs):
"""
A quick check to ensure pylibwholegraph can be imported and the
native library loads correctly.
"""
try:
import pylibwholegraph
except ImportError as e:
raise ImportError(
"pylibwholegraph or its dependencies could not be imported. "
"Tip: install with `pip install pylibwholegraph` or use a RAPIDS conda environment."
) from e

if not hasattr(pylibwholegraph, "__version__") or not pylibwholegraph.__version__:
raise AssertionError(
"pylibwholegraph smoke check failed: __version__ not found or empty"
)

from pylibwholegraph.utils import import_optional, MissingModule

torch = import_optional("torch")

if isinstance(torch, MissingModule):
import warnings

warnings.warn(
"PyTorch is required to use pylibwholegraph."
"Please install PyTorch from PyPI or Conda-Forge."
)
2 changes: 2 additions & 0 deletions python/pylibwholegraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ dependencies = [
"numpy>=1.23,<3.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.entry-points."rapids_doctor_check"]
pylibwholegraph_smoke_check = "pylibwholegraph._doctor_check:pylibwholegraph_smoke_check"

[project.optional-dependencies]
test = [
Expand Down
Loading