Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
153 changes: 81 additions & 72 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,81 @@
ci:
autofix_commit_msg: "chore(ci): pre-commit auto fixes"
autoupdate_commit_msg: "chore(ci): pre-commit autoupdate"
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v6.0.0'
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v2.3.0'
hooks:
- id: mypy
additional_dependencies: [types-PyYAML]
args: ["--config-file=pyproject.toml", "src/", "docs/"]
pass_filenames: false
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.21.2'
hooks:
- id: pyupgrade
args:
- --py39-plus
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-metaschema
files: ^src/rapids_dependency_file_generator/schema.json$
- id: check-jsonschema
files: ^tests/examples/([^/]*)/dependencies.yaml$
args: ["--schemafile", "src/rapids_dependency_file_generator/schema.json"]
- id: check-github-workflows
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
hooks:
- id: ruff
files: src/.*$
- id: ruff-format
files: src/.*$
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
args: ["--config", "pyproject.toml"]
additional_dependencies:
- 'rstcheck[sphinx,toml]'
exclude:
(?x)
^docs/source/_templates/.*$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.6.1
hooks:
- id: verify-pyproject-license
exclude:
(?x)
^tests/.*$
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.27.0
hooks:
- id: zizmor
default_language_version:
python: python3
ci:
autofix_commit_msg: "chore(ci): pre-commit auto fixes"
autoupdate_commit_msg: "chore(ci): pre-commit autoupdate"
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v6.0.0'
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v2.3.0'
hooks:
- id: mypy
additional_dependencies: [types-PyYAML]
args: ["--config-file=pyproject.toml", "src/", "docs/"]
pass_filenames: false
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.21.2'
hooks:
- id: pyupgrade
args:
- --py39-plus
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.4
hooks:
- id: check-metaschema
files: ^src/rapids_dependency_file_generator/schema.json$
- id: check-jsonschema
files: ^tests/examples/([^/]*)/dependencies.yaml$
args: ["--schemafile", "src/rapids_dependency_file_generator/schema.json"]
- id: check-github-workflows
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.22
hooks:
- id: ruff
files: src/.*$
- id: ruff-format
files: src/.*$
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
args: ["--config", "pyproject.toml"]
additional_dependencies:
- 'rstcheck[sphinx,toml]'
exclude:
(?x)
^docs/source/_templates/.*$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.6.1
hooks:
- id: verify-pyproject-license
exclude:
(?x)
^tests/.*$
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
additional_dependencies: [pyyaml]
exclude: |
(?x)^(
.*/output/expected/.*$
)
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.27.0
hooks:
- id: zizmor
default_language_version:
python: python3
16 changes: 8 additions & 8 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- id: rapids-dependency-file-generator
name: RAPIDS dependency file generator
description: Update dependency files according to the RAPIDS dependencies spec
entry: rapids-dependency-file-generator
language: python
files: "dependencies.yaml"
pass_filenames: false
args: [--warn-all, --strict]
- id: rapids-dependency-file-generator
name: RAPIDS dependency file generator
description: Update dependency files according to the RAPIDS dependencies spec
entry: rapids-dependency-file-generator
language: python
files: "dependencies.yaml"
pass_filenames: false
args: [--warn-all, --strict]
37 changes: 37 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
extends: default

rules:
anchors:
forbid-undeclared-aliases: true
forbid-duplicated-anchors: true
forbid-unused-anchors: true
braces:
forbid: false
min-spaces-inside: 0
# allow 1 space for jinja templating in conda recipes
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets: enable
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments: disable
comments-indentation: disable
document-end: disable
document-start: disable
key-duplicates:
forbid-duplicated-merge-keys: true
line-length: disable
truthy:
allowed-values: ['false', 'true']
# having problematic value in keys is rare... and also
# GitHub Actions' choie of 'on:' triggers this check
# ref: https://github.com/adrienverge/yamllint/issues/430
check-keys: false
8 changes: 4 additions & 4 deletions tests/examples/overlapping-deps/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies:
packages:
- pip
- pip:
- numpy>=2.0
- numpy>=2.0
depends_on_pandas:
common:
- output_types: [conda, requirements, pyproject]
Expand All @@ -67,9 +67,9 @@ dependencies:
# intentional overlap (numpy) with depends_on_numpy's pip list, to
# test that pip dependencies don't have duplicates
- pip:
# intentionally not in alphabetical order
- numpy>=2.0
- folium
# intentionally not in alphabetical order
- numpy>=2.0
- folium
rapids_build_skbuild:
common:
- output_types: [conda, requirements, pyproject]
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/requirements-pip-dict/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dependencies:
packages:
- fsspec>=0.6.0
- pip:
- pandas<1.0
- pandas<1.0