Repository navigation
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test ba4ebf1 |
|
| @@ -23,8 +23,26 @@ def test_checking_build_uses_final_local_output_as_docs_domain(tmp_path, monkeyp | |||
| helper.parent.mkdir(parents=True) | |||
| shutil.copyfile(BUILD_HELPER, helper) | |||
|
|
|||
There was a problem hiding this comment.
codex GPT-6.1-Sol ultra explanation for the changes in this file:
These changes make the existing docs-helper test exercise the source-directory mapping affected by this PR.
The helper checks that cuda.bindings, cuda.core, and cuda.pathfinder are imported from this checkout and that their versions agree with installed distribution metadata. Previously, it inferred each source directory from the distribution name by replacing hyphens with underscores. That inference stops working for bindings after this rename:
Distribution: cuda-bindings
Python import: cuda.bindings
Source directory: cuda_bindings_13
The helper now records the source directories explicitly. To cover that change, this test needs to execute the helper's import checks.
Previously, the test's fake python executable intercepted python - (execute a program from standard input), discarded the program with cat >/dev/null, and returned success. That bypassed the entire import-checking block. Leaving that stub in place would let the test pass even if the helper still expected the old cuda_bindings/ directory.
The added setup creates minimal Python packages under the expected source directories, supplies matching .dist-info/METADATA, and exposes those directories through PYTHONPATH. Removing the python - interception then lets the real interpreter execute the helper's checks against this temporary checkout.
Package installation remains stubbed out, and documentation generation remains simulated, so the test still runs without CUDA or Sphinx. Its existing assertions about the docs domain and copied output remain in place; it now also fails if the helper uses the wrong source directory.
|
Warning This pull request changes a CodeRabbit configuration file. Because it comes from a fork or its author is not a repository collaborator, reviews use only the configuration from the target branch. The proposed configuration will take effect after it is merged. 📝 Summary
Priority: ⬇️ Low Change: Refactor Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: NVIDIA/cuda-python/.coderabbit.yaml
- Review profile: CHILL
- Plan: Enterprise
- Run ID:
39093a49-fecc-4a59-8b55-d92ef1a9cb2b
⛔ Files ignored due to path filters: 4
benchmarks/cuda_bindings/pixi.lockis excluded by!**/*.lockcuda_bindings_13/docs/source/_static/images/Nsight-Compute-CLI-625x473.pngis excluded by!**/*.pngcuda_bindings_13/pixi.lockis excluded by!**/*.lockcuda_core/pixi.lockis excluded by!**/*.lock
📒 Files selected for processing: 285
.coderabbit.yaml.github/labeler.yml.github/workflows/build-docs.yml.github/workflows/build-wheel.yml.github/workflows/ci-pixi-source-test.yml.github/workflows/ci.yml.github/workflows/coverage.yml.github/workflows/test-sdist-linux.yml.github/workflows/test-sdist-windows.yml.gitignore.pre-commit-config.yamlAGENTS.mdCONTRIBUTING.mdREADME.mdbenchmarks/cuda_bindings/AGENTS.mdbenchmarks/cuda_bindings/pixi.tomlbenchmarks/cuda_core/pixi.tomlci/README.mdci/tools/build_docs_for_link_check.shci/tools/check_pixi_cuda_version.pyci/tools/check_release_notes.pyci/tools/compute_ci_plan.pyci/tools/env-varsci/tools/run-testsci/tools/tests/test_build_docs_for_link_check.pyci/tools/tests/test_check_release_notes.pyci/tools/tests/test_compute_ci_plan.pycontext7.jsoncuda_bindings_13/.git_archival.txtcuda_bindings_13/AGENTS.mdcuda_bindings_13/CLAUDE.mdcuda_bindings_13/DESCRIPTION.rstcuda_bindings_13/LICENSEcuda_bindings_13/MANIFEST.incuda_bindings_13/README.mdcuda_bindings_13/_build_shared.pycuda_bindings_13/build_hooks.pycuda_bindings_13/cuda/bindings/__init__.pxdcuda_bindings_13/cuda/bindings/__init__.pycuda_bindings_13/cuda/bindings/_internal/__init__.pycuda_bindings_13/cuda/bindings/_internal/_fast_enum.pycuda_bindings_13/cuda/bindings/_internal/cudla.pxdcuda_bindings_13/cuda/bindings/_internal/cudla_linux.pyxcuda_bindings_13/cuda/bindings/_internal/cudla_windows.pyxcuda_bindings_13/cuda/bindings/_internal/cufile.pxdcuda_bindings_13/cuda/bindings/_internal/cufile_linux.pyxcuda_bindings_13/cuda/bindings/_internal/driver.pxdcuda_bindings_13/cuda/bindings/_internal/driver_linux.pyxcuda_bindings_13/cuda/bindings/_internal/driver_windows.pyxcuda_bindings_13/cuda/bindings/_internal/nvfatbin.pxdcuda_bindings_13/cuda/bindings/_internal/nvfatbin_linux.pyxcuda_bindings_13/cuda/bindings/_internal/nvfatbin_windows.pyxcuda_bindings_13/cuda/bindings/_internal/nvjitlink.pxdcuda_bindings_13/cuda/bindings/_internal/nvjitlink_linux.pyxcuda_bindings_13/cuda/bindings/_internal/nvjitlink_windows.pyxcuda_bindings_13/cuda/bindings/_internal/nvml.pxdcuda_bindings_13/cuda/bindings/_internal/nvml_linux.pyxcuda_bindings_13/cuda/bindings/_internal/nvml_windows.pyxcuda_bindings_13/cuda/bindings/_internal/nvrtc.pxdcuda_bindings_13/cuda/bindings/_internal/nvrtc_linux.pyxcuda_bindings_13/cuda/bindings/_internal/nvrtc_windows.pyxcuda_bindings_13/cuda/bindings/_internal/nvvm.pxdcuda_bindings_13/cuda/bindings/_internal/nvvm_linux.pyxcuda_bindings_13/cuda/bindings/_internal/nvvm_windows.pyxcuda_bindings_13/cuda/bindings/_internal/runtime.pxdcuda_bindings_13/cuda/bindings/_internal/runtime_linux.pyxcuda_bindings_13/cuda/bindings/_internal/runtime_ptds.pxdcuda_bindings_13/cuda/bindings/_internal/runtime_ptds_linux.pyxcuda_bindings_13/cuda/bindings/_internal/runtime_ptds_windows.pyxcuda_bindings_13/cuda/bindings/_internal/runtime_windows.pyxcuda_bindings_13/cuda/bindings/_internal/utils.pxdcuda_bindings_13/cuda/bindings/_internal/utils.pyxcuda_bindings_13/cuda/bindings/_lib/__init__.pycuda_bindings_13/cuda/bindings/_lib/cyruntime/cyruntime.pxdcuda_bindings_13/cuda/bindings/_lib/cyruntime/cyruntime.pxicuda_bindings_13/cuda/bindings/_lib/dlfcn.pxdcuda_bindings_13/cuda/bindings/_lib/utils.pxdcuda_bindings_13/cuda/bindings/_lib/utils.pxicuda_bindings_13/cuda/bindings/_lib/windll.pxdcuda_bindings_13/cuda/bindings/_v2/__init__.pycuda_bindings_13/cuda/bindings/_v2/nvrtc.pxdcuda_bindings_13/cuda/bindings/_v2/nvrtc.pyxcuda_bindings_13/cuda/bindings/cudla.pxdcuda_bindings_13/cuda/bindings/cudla.pyxcuda_bindings_13/cuda/bindings/cufile.pxdcuda_bindings_13/cuda/bindings/cufile.pyxcuda_bindings_13/cuda/bindings/cycudla.pxdcuda_bindings_13/cuda/bindings/cycudla.pyxcuda_bindings_13/cuda/bindings/cycufile.pxdcuda_bindings_13/cuda/bindings/cycufile.pyxcuda_bindings_13/cuda/bindings/cydriver.pxdcuda_bindings_13/cuda/bindings/cydriver.pyxcuda_bindings_13/cuda/bindings/cynvfatbin.pxdcuda_bindings_13/cuda/bindings/cynvfatbin.pyxcuda_bindings_13/cuda/bindings/cynvjitlink.pxdcuda_bindings_13/cuda/bindings/cynvjitlink.pyxcuda_bindings_13/cuda/bindings/cynvml.pxdcuda_bindings_13/cuda/bindings/cynvml.pyxcuda_bindings_13/cuda/bindings/cynvrtc.pxdcuda_bindings_13/cuda/bindings/cynvrtc.pyxcuda_bindings_13/cuda/bindings/cynvvm.pxdcuda_bindings_13/cuda/bindings/cynvvm.pyxcuda_bindings_13/cuda/bindings/cyruntime.pxdcuda_bindings_13/cuda/bindings/cyruntime.pyxcuda_bindings_13/cuda/bindings/driver.pxdcuda_bindings_13/cuda/bindings/driver.pyxcuda_bindings_13/cuda/bindings/nvfatbin.pxdcuda_bindings_13/cuda/bindings/nvfatbin.pyxcuda_bindings_13/cuda/bindings/nvjitlink.pxdcuda_bindings_13/cuda/bindings/nvjitlink.pyxcuda_bindings_13/cuda/bindings/nvml.pxdcuda_bindings_13/cuda/bindings/nvml.pyxcuda_bindings_13/cuda/bindings/nvrtc.pxdcuda_bindings_13/cuda/bindings/nvrtc.pyxcuda_bindings_13/cuda/bindings/nvvm.pxdcuda_bindings_13/cuda/bindings/nvvm.pyxcuda_bindings_13/cuda/bindings/runtime.pxdcuda_bindings_13/cuda/bindings/runtime.pyxcuda_bindings_13/cuda/bindings/utils/__init__.pycuda_bindings_13/cuda/bindings/utils/_envvar.pycuda_bindings_13/cuda/bindings/utils/_nvvm_utils.pycuda_bindings_13/cuda/bindings/utils/_ptx_utils.pycuda_bindings_13/cuda/bindings/utils/_version_check.pycuda_bindings_13/docs/Makefilecuda_bindings_13/docs/README.mdcuda_bindings_13/docs/build_docs.shcuda_bindings_13/docs/make.batcuda_bindings_13/docs/nv-versions.jsoncuda_bindings_13/docs/source/_templates/main.htmlcuda_bindings_13/docs/source/api.rstcuda_bindings_13/docs/source/conduct.rstcuda_bindings_13/docs/source/conf.pycuda_bindings_13/docs/source/contribute.rstcuda_bindings_13/docs/source/environment_variables.rstcuda_bindings_13/docs/source/examples.rstcuda_bindings_13/docs/source/index.rstcuda_bindings_13/docs/source/install.rstcuda_bindings_13/docs/source/license.rstcuda_bindings_13/docs/source/module/cudla.rstcuda_bindings_13/docs/source/module/cufile.rstcuda_bindings_13/docs/source/module/driver.rstcuda_bindings_13/docs/source/module/nvfatbin.rstcuda_bindings_13/docs/source/module/nvjitlink.rstcuda_bindings_13/docs/source/module/nvml.rstcuda_bindings_13/docs/source/module/nvrtc.rstcuda_bindings_13/docs/source/module/nvvm.rstcuda_bindings_13/docs/source/module/runtime.rstcuda_bindings_13/docs/source/module/utils.rstcuda_bindings_13/docs/source/motivation.rstcuda_bindings_13/docs/source/overview.rstcuda_bindings_13/docs/source/release.rstcuda_bindings_13/docs/source/release/11.4.0-notes.rstcuda_bindings_13/docs/source/release/11.5.0-notes.rstcuda_bindings_13/docs/source/release/11.6.0-notes.rstcuda_bindings_13/docs/source/release/11.6.1-notes.rstcuda_bindings_13/docs/source/release/11.7.0-notes.rstcuda_bindings_13/docs/source/release/11.7.1-notes.rstcuda_bindings_13/docs/source/release/11.8.0-notes.rstcuda_bindings_13/docs/source/release/11.8.1-notes.rstcuda_bindings_13/docs/source/release/11.8.2-notes.rstcuda_bindings_13/docs/source/release/11.8.3-notes.rstcuda_bindings_13/docs/source/release/11.8.4-notes.rstcuda_bindings_13/docs/source/release/11.8.5-notes.rstcuda_bindings_13/docs/source/release/11.8.6-notes.rstcuda_bindings_13/docs/source/release/11.8.7-notes.rstcuda_bindings_13/docs/source/release/12.0.0-notes.rstcuda_bindings_13/docs/source/release/12.1.0-notes.rstcuda_bindings_13/docs/source/release/12.2.0-notes.rstcuda_bindings_13/docs/source/release/12.2.1-notes.rstcuda_bindings_13/docs/source/release/12.3.0-notes.rstcuda_bindings_13/docs/source/release/12.4.0-notes.rstcuda_bindings_13/docs/source/release/12.5.0-notes.rstcuda_bindings_13/docs/source/release/12.6.0-notes.rstcuda_bindings_13/docs/source/release/12.6.1-notes.rstcuda_bindings_13/docs/source/release/12.6.2-notes.rstcuda_bindings_13/docs/source/release/12.8.0-notes.rstcuda_bindings_13/docs/source/release/12.9.0-notes.rstcuda_bindings_13/docs/source/release/12.9.1-notes.rstcuda_bindings_13/docs/source/release/12.9.2-notes.rstcuda_bindings_13/docs/source/release/12.9.3-notes.rstcuda_bindings_13/docs/source/release/12.9.4-notes.rstcuda_bindings_13/docs/source/release/12.9.5-notes.rstcuda_bindings_13/docs/source/release/12.9.6-notes.rstcuda_bindings_13/docs/source/release/12.9.7-notes.rstcuda_bindings_13/docs/source/release/12.9.8-notes.rstcuda_bindings_13/docs/source/release/12.9.9-notes.rstcuda_bindings_13/docs/source/release/13.0.0-notes.rstcuda_bindings_13/docs/source/release/13.0.1-notes.rstcuda_bindings_13/docs/source/release/13.0.2-notes.rstcuda_bindings_13/docs/source/release/13.0.3-notes.rstcuda_bindings_13/docs/source/release/13.1.0-notes.rstcuda_bindings_13/docs/source/release/13.1.1-notes.rstcuda_bindings_13/docs/source/release/13.2.0-notes.rstcuda_bindings_13/docs/source/release/13.3.0-notes.rstcuda_bindings_13/docs/source/release/13.3.1-notes.rstcuda_bindings_13/docs/source/release/13.4.0-notes.rstcuda_bindings_13/docs/source/release/13.4.0b1-notes.rstcuda_bindings_13/docs/source/release/13.4.1-notes.rstcuda_bindings_13/docs/source/release/13.4.1a0-notes.rstcuda_bindings_13/docs/source/release/13.4.2-notes.rstcuda_bindings_13/docs/source/release/13.4.3-notes.rstcuda_bindings_13/docs/source/release/13.5.0-notes.rstcuda_bindings_13/docs/source/support.rstcuda_bindings_13/docs/source/tips_and_tricks.rstcuda_bindings_13/docs/versions.jsoncuda_bindings_13/pixi.tomlcuda_bindings_13/pyproject.tomlcuda_bindings_13/setup.pycuda_bindings_13/tests/conftest.pycuda_bindings_13/tests/cudla/conftest.pycuda_bindings_13/tests/cudla/test_cudla_bindings.pycuda_bindings_13/tests/cufile.jsoncuda_bindings_13/tests/cython/build_tests.batcuda_bindings_13/tests/cython/build_tests.pycuda_bindings_13/tests/cython/build_tests.shcuda_bindings_13/tests/cython/test_ccuda.pyxcuda_bindings_13/tests/cython/test_ccudart.pyxcuda_bindings_13/tests/cython/test_cython.pycuda_bindings_13/tests/cython/test_interoperability_cython.pyxcuda_bindings_13/tests/example_tests/run_samples.pycuda_bindings_13/tests/example_tests/test_args.jsoncuda_bindings_13/tests/example_tests/test_cuda_bindings_utils.pycuda_bindings_13/tests/example_tests/test_interactive_sample_configuration.pycuda_bindings_13/tests/example_tests/test_samples.pycuda_bindings_13/tests/legacy_api/README.mdcuda_bindings_13/tests/legacy_api/test_legacy_kernelParams.pycuda_bindings_13/tests/legacy_api/test_legacy_nvfatbin.pycuda_bindings_13/tests/legacy_api/test_legacy_nvjitlink.pycuda_bindings_13/tests/legacy_api/test_legacy_nvrtc.pycuda_bindings_13/tests/nvml/README.mdcuda_bindings_13/tests/nvml/__init__.pycuda_bindings_13/tests/nvml/conftest.pycuda_bindings_13/tests/nvml/test_compute_mode.pycuda_bindings_13/tests/nvml/test_cuda.pycuda_bindings_13/tests/nvml/test_device.pycuda_bindings_13/tests/nvml/test_gpu.pycuda_bindings_13/tests/nvml/test_init.pycuda_bindings_13/tests/nvml/test_nvlink.pycuda_bindings_13/tests/nvml/test_page_retirement.pycuda_bindings_13/tests/nvml/test_pci.pycuda_bindings_13/tests/nvml/test_pynvml.pycuda_bindings_13/tests/nvml/test_unit.pycuda_bindings_13/tests/nvml/test_util.pycuda_bindings_13/tests/nvml/util.pycuda_bindings_13/tests/test_basics.pycuda_bindings_13/tests/test_build_hooks.pycuda_bindings_13/tests/test_cuda.pycuda_bindings_13/tests/test_cudart.pycuda_bindings_13/tests/test_cufile.pycuda_bindings_13/tests/test_envvar.pycuda_bindings_13/tests/test_graphics_apis.pycuda_bindings_13/tests/test_interoperability.pycuda_bindings_13/tests/test_kernelParams.pycuda_bindings_13/tests/test_nvfatbin.pycuda_bindings_13/tests/test_nvjitlink.pycuda_bindings_13/tests/test_nvrtc.pycuda_bindings_13/tests/test_nvvm.pycuda_bindings_13/tests/test_utils.pycuda_bindings_13/tests/test_version_check.pycuda_bindings_13/tests/utils/check_cyclical_import.pycuda_core/AGENTS.mdcuda_core/_build_shared.pycuda_core/build_hooks.pycuda_core/pixi.tomlcuda_core/pyproject.tomlcuda_core/tests/AGENTS.mdcuda_core/tests/conftest.pycuda_core/tests/example_tests/test_sample_environment.pycuda_core/tests/test_build_hooks.pycuda_core/tests/test_driver_table.pycuda_core/tests/test_graphics.pycuda_core/tests/test_rt_layout.pycuda_python/AGENTS.mdcuda_python/docs/build_all_docs.shcuda_python_test_helpers/cuda_python_test_helpers/_pytest_plugin.pycuda_python_test_helpers/cuda_python_test_helpers/cython_cache.pycuda_python_test_helpers/cuda_python_test_helpers/graphics.pypixi.tomlpytest.iniruff.tomltoolshed/build_static_bitcode_input.pytoolshed/check_cython_not_none.pytoolshed/check_generated_file_seals.pytoolshed/check_spdx.pytoolshed/find_skipped_tests.py
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
|
|
||
| [feature.bindings-source.dependencies] | ||
| cuda-bindings = { path = "../../cuda_bindings" } | ||
| cuda-bindings = { path = "../../cuda_bindings_13" } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
git diff --name-status 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- '*pixi.toml' '*pixi.lock'
rg -n -A19 '## Pixi lockfiles' CONTRIBUTING.md
git diff 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- pixi.toml benchmarks/cuda_bindings/pixi.tomlRepository: NVIDIA/cuda-python
Length of output: 3001
important: Update the root lockfile.
The root pixi.toml changed, so regenerate pixi.lock with the pinned Pixi version:
pixi lock --manifest-path .The benchmark bindings lockfile is already updated. The CUDA core lockfile is a separate finding.
| [feature.core-source.dependencies] | ||
| cuda-core = { path = "../../cuda_core" } | ||
| cuda-bindings = { path = "../../cuda_bindings" } | ||
| cuda-bindings = { path = "../../cuda_bindings_13" } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
rg -n -C 5 'cuda_bindings|cuda-bindings' benchmarks/cuda_core/pixi.lock | head -100
sed -n '1,110p' benchmarks/cuda_core/pixi.toml
rg -n 'locked|frozen|pixi (install|run|lock)|benchmarks/cuda_core' .github ci benchmarks/cuda_core/README.md CONTRIBUTING.md | head -130Repository: NVIDIA/cuda-python
Length of output: 12437
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- CONTRIBUTING lockfile guidance ---'
sed -n '240,282p' CONTRIBUTING.md
printf '%s\n' '--- lock freshness workflow ---'
sed -n '1,150p' .github/workflows/ci-pixi-lockfile-freshness-check.yml
printf '%s\n' '--- source test workflow relevant setup ---'
sed -n '55,125p' .github/workflows/ci-pixi-source-test.yml
printf '%s\n' '--- benchmark lock local/source references ---'
rg -n -C 4 -F -e 'cuda_bindings_13' -e 'cuda_bindings' -e 'cuda-bindings' -e 'source = ' benchmarks/cuda_core/pixi.lock || test "$?" -eq 1
printf '%s\n' '--- benchmark lock header and workspace metadata ---'
sed -n '1,35p' benchmarks/cuda_core/pixi.lock
printf '%s\n' '--- exact PR diff for benchmark files ---'
git diff --name-status 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- benchmarks/cuda_coreRepository: NVIDIA/cuda-python
Length of output: 12330
important: Update benchmarks/cuda_core/pixi.lock with this manifest change.
The source environment now points cuda-bindings to ../../cuda_bindings_13, but the lockfile is unchanged. Pixi may refresh a stale lock during pixi run, so this does not establish a benchmark environment failure. The repository still requires the matching lockfile update.
Regenerate it with the pinned Pixi version:
pixi lock --manifest-path benchmarks/cuda_core| "HEAD", | ||
| "--", | ||
| "cuda_bindings", | ||
| "cuda_bindings_13", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '1,160p' toolshed/check_generated_file_seals.py
sed -n '60,76p' .pre-commit-config.yaml
rg -n 'sealed|generated.file.seals|seal' AGENTS.md CONTRIBUTING.md cuda_bindings_13/AGENTS.mdRepository: NVIDIA/cuda-python
Length of output: 5893
🏁 Script executed:
set -o pipefail
printf '%s\n' '--- focused diff ---'
git diff --find-renames 983ac757fea12a9f29575a82c4d5e269914784d8 ba4ebf153f574e993ecf755c2946348c2c67ff50 -- toolshed/check_generated_file_seals.py .pre-commit-config.yaml
printf '%s\n' '--- relevant references ---'
rg -n -F --glob '!**/.git/**' -e 'check-generated-file-seals' -e 'generated-file seal' -e 'GENERATED-DO-NOT-MODIFY-THIS-FILE' -e 'cuda_bindings/' -e 'cuda_bindings_13/' .pre-commit-config.yaml toolshed AGENTS.md CONTRIBUTING.md cuda_bindings_13 2>/dev/null || test "$?" -eq 1
printf '%s\n' '--- base and head sealed-file path samples ---'
git grep -l -I -F -- 'GENERATED-DO-NOT-MODIFY-THIS-FILE' 983ac757fea12a9f29575a82c4d5e269914784d8 -- cuda_bindings 2>/dev/null | sed -n '1,12p'
git grep -l -I -F -- 'GENERATED-DO-NOT-MODIFY-THIS-FILE' ba4ebf153f574e993ecf755c2946348c2c67ff50 -- cuda_bindings_13 2>/dev/null | sed -n '1,12p'Repository: NVIDIA/cuda-python
Length of output: 23064
suggestion: Preserve seal checks across the rename.
When pre-commit runs before the rename is committed, HEAD can contain a sealed file under cuda_bindings/, while the hook checks its cuda_bindings_13/ path. Removing the seal can therefore pass the hook. Map the old path to the new path while loading previously sealed files.
Suggested fix
"HEAD",
"--",
+ "cuda_bindings",
"cuda_bindings_13",
],
@@
- return {
- normalize_repo_path(line.removeprefix(head_prefix))
- for line in process.stdout.splitlines()
- if line.startswith(head_prefix)
- }
+ previously_sealed_paths = set()
+ for line in process.stdout.splitlines():
+ if not line.startswith(head_prefix):
+ continue
+ path = normalize_repo_path(line.removeprefix(head_prefix))
+ if path.startswith("cuda_bindings/"):
+ path = "cuda_bindings_13/" + path.removeprefix("cuda_bindings/")
+ previously_sealed_paths.add(path)
+ return previously_sealed_paths🧰 Tools
🪛 ast-grep (0.45.3)
[error] 54-69: Command coming from incoming request
Context: subprocess.run( # noqa: S603
[ # noqa: S607
"git",
"grep",
"-l",
"-I",
"-F",
"-e",
GENERATED_FILE_MARKER_FRAGMENT,
"HEAD",
"--",
"cuda_bindings_13",
],
capture_output=True,
text=True,
)
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(subprocess-from-request)
ba4ebf1 to
ac0e4bb
Compare
ac0e4bb to
284b006
Compare
Move the current bindings sources and update build, CI, documentation, and tooling paths. Preserve distribution and import names, samples, historical links, and the shared build-helper symlink. Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
284b006 to
4d0e58b
Compare
Description
Following the discussion of #2737, the team requested a staged approach to supporting multiple CUDA bindings release lines on
main(#1199). This PR is the first preparatory step: give the existing CUDA 13 source root an explicit versioned name and update the plumbing that depends on it.This PR renames the CUDA 13 bindings source directory from
cuda_bindings/tocuda_bindings_13/, and updates the build, test, CI, documentation, and tooling paths that refer to it.Package names, Python imports, generated bindings, and the sample and benchmark directory names stay the same. The shared build-helper symlink is retargeted to the new directory, and release documentation retains support for locating the source root in older tags.
Stacked on #3143 so Lychee can check repository links to the renamed directory before it exists on the default branch. This is a new iteration of #3116, which remains unchanged for reference.
Review aid
Most of the diff consists of the directory move and repeated path substitutions. A two-commit review branch makes the other adjustments easier to inspect. Read these two views in order:
cuda_bindings_13withcuda_bindingsin file contents; all file paths stay as in this PR.Directory moves remain visible in the first view. The intermediate commit is for review only and is not expected to build. The review branch is a snapshot from before the latest stack refresh; its final tree was verified against that revision. The latest restack preserves the rename patch unchanged.
This review comment explains the changes in
ci/tools/tests/test_build_docs_for_link_check.py, including why the test now executes the helper's import checks.Validation
After restacking on current
mainthrough #3142 → #3155 → #3143, this revision passes 254 CI-tool tests and 36 subtests, pluspre-commit run --all-fileslocally. The rename patch is identical to the preceding published revision. Full CI has not been requested for this refreshed layer.Earlier validation, before this stack refresh:
pre-commit run --all-files: passed.Checklist