| name | test-python-binding |
| description | Build and test the NeMo Relay Python binding and worker plugin SDK; use for python/nemo_relay, python/plugin, or crates/python changes |
| author | NVIDIA Corporation and Affiliates |
| license | Apache-2.0 |
Build And Test Python Binding
Companion Guidance
Use karpathy-guidelines alongside this skill for implementation or review
work. Keep changes scoped, surface assumptions, and define focused validation
before editing.
Use this skill when the change is primarily in python/nemo_relay,
python/plugin, python/tests, crates/python, or Python-facing
docs/examples.
Default Path
- Format changed Python wrapper and test files with
uv run ruff format python python/plugin.
- Run focused
pytest first when you know the affected area.
- Run
just test-python-plugin when the Python worker SDK changed.
- Run the full Python suite with
just test-python before review.
- If any Rust files changed as part of the Python work, also run
cargo fmt --all, just test-rust, and
cargo clippy --workspace --all-targets -- -D warnings.
- Use
just build-python when you want an explicit build-only pass.
- Use
just build-python-plugin when the Python worker SDK changed.
- If the native Rust bridge changed, add the Rust crate tests for
nemo-relay-python.
Python Test Style
Common Commands
uv run pytest -k "<pattern>"
just test-python-plugin
uv run ruff format python python/plugin
just test-python
cargo fmt --all
just test-rust
cargo clippy --workspace --all-targets -- -D warnings
just build-python
just build-python-plugin
cargo test -p nemo-relay-python
When To Escalate
- If
crates/core, crates/adaptive, or shared runtime semantics changed,
also use validate-change.
- If
python/plugin or worker protocol behavior changed, also use
maintain-dynamic-plugins.
- If the change is actually about docs only, prefer
contribute-docs
plus targeted command checks.
References
pyproject.toml
crates/python/Cargo.toml
crates/python/README.md
python/nemo_relay/README.md
python/plugin/pyproject.toml
python/plugin/src/nemo_relay_plugin
python/tests/plugin
docs/getting-started/quick-start/python.mdx
docs/contribute/testing-and-docs.mdx
validate-change