chore: add Checks workflow and enhance pre-commit hooks to match cuOpt OSS standards - #63
Merged
Merged
Conversation
Adds hooks aligned with the cuOpt .pre-commit-config.yaml: New hooks: - check-builtin-literals, check-executables-have-shebangs, check-json, check-yaml — standard file hygiene - shellcheck (v0.10.0.1) — lint ci/utils/*.sh scripts - yamllint (v1.38.0) — lint GitHub Actions YAML files - zizmor (v1.24.1) — GitHub Actions security audit; flags only high-severity findings (unpinned actions, etc.) - validate-skills local hook — wired to ci/utils/validate_skills.sh Also: - Add SPDX license header to .pre-commit-config.yaml - Add global exclude for skills sig/card/benchmark files - Pin all GitHub Actions to commit SHAs (required by NVIDIA policy and caught by zizmor); keep version tag as inline comment - Add zizmor ignore on NVIDIA/skills reusable workflow (internal) - Add pyproject.toml per-file-ignores for demo/ and brev/ notebooks (pre-existing E402/F841 in interactive code) Note: sync-skills-version local hook is commented out pending creation of the VERSION file. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
ramakrishnap-nv
requested review from
jgoldberg-nvidia and
tmckayus
and removed request for
a team
July 30, 2026 20:12
The project uses ruff for both formatting and linting, not black, isort, or flake8. Updated all references and code examples. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add .github/workflows/pre-commit.yml — a dedicated style-check job modelled on cuOpt's check-style pattern. It runs pre-commit run --all-files on every push to main and every PR, with pre-commit environment caching keyed on .pre-commit-config.yaml. Now that pre-commit covers ruff format, ruff check, shellcheck, yamllint, zizmor, and validate-skills: - Remove duplicate lint steps (ruff format/check) from pr.yaml - Remove duplicate lint job from main.yml; rename to 'test' (pytest only) - Update pr-builder to no longer depend on the removed lint job Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
tmckayus
approved these changes
Jul 30, 2026
- Rename .github/workflows/pre-commit.yml → checks.yml - Rename workflow to "Checks" and job to "check-style" (matches cuOpt pattern) - Apply pre-commit auto-fixes to pre-existing issues caught by new hooks: trailing whitespace in README.md, CHANGELOG.md, LICENSE-3rd-party.txt, .github/ templates and issue forms; missing newlines in src/readme.md, notebooks/readme.md, demo/diagrams/arch_diagram.svg, .gitignore; ruff format/check fixes across notebooks and src - Add nvskills-ci/ to .gitignore (cloned repo for separate PR work) - Expand pre-commit section in CONTRIBUTING.md: add manual run instructions and describe what each hook covers Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dedicated Checks workflow (
.github/workflows/checks.yml) modelled on cuOpt'scheck-stylepattern, and expands the pre-commit hook suite to match cuOpt OSS standards.New workflow —
checks.ymlRuns
pre-commit run --all-files --show-diff-on-failureon every push tomainand every PR, with pre-commit environment caching keyed on.pre-commit-config.yaml. Job is namedcheck-styleto match cuOpt.New pre-commit hooks
check-builtin-literals,check-executables-have-shebangs,check-json,check-yamlshellcheckci/utils/*.shyamllintzizmorvalidate-skills(local)ci/utils/validate_skills.shon skills/plugin changesAlso in this PR
zizmorenforces this on every future commitpr.yaml(covered bychecks.yml); renamemain.ymllint→testblack/isort/flake8withruff; add pre-commit usage instructions (manual run, staged-only run, description of what each hook covers).pre-commit-config.yamlandchecks.ymlskill.oms.sig,skill-card.md,BENCHMARK.mdnvskills-ci/to.gitignoreNot included (follow-up)
sync-skills-versionlocal hook — commented out pendingVERSIONfilerapidsai/verify-copyright— requires adding SPDX headers to workflow YAML filesTest plan
pre-commit run --all-filespasses locally (verified)Checks / check-styleCI job passes on this PR🤖 Generated with Claude Code