Skip to content

Commit

Permalink
add rapids-dependency-file-generator pre-commmit hook (#682)
Browse files Browse the repository at this point in the history
Proposes adding a pre-commit hook to run `rapids-dependency-file-generator`.

With that change, local `pre-commit` and CI will raise an error if changes have been made in `dependencies.yaml` that would affect any other files checked into the repo, like the conda envs in https://github.com/rapidsai/cucim/tree/branch-24.02/conda/environments.

### How I tested this

Changed a `cmake` version constraint in `dependencies.yaml`.

Ran `pre-commit run --all-files`.

Observed the expected failure.

<img width="617" alt="image" src="https://github.com/rapidsai/cucim/assets/7608904/4a10092b-2cb0-42cd-a306-b6c2fdf66563">

Reverted that change, ran `pre-commit run --all-files` again, saw everything pass.

Authors:
  - James Lamb (https://github.com/jameslamb)
  - https://github.com/jakirkham

Approvers:
  - https://github.com/jakirkham
  - Bradley Dice (https://github.com/bdice)
  - Ray Douglass (https://github.com/raydouglass)
  - Gregory Lee (https://github.com/grlee77)

URL: #682
  • Loading branch information
jameslamb authored Jan 30, 2024
1 parent 4322ad7 commit 9d6fc91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ repos:
args: ["--toml", "python/cucim/pyproject.toml"]
additional_dependencies:
- tomli
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.8.0
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]

0 comments on commit 9d6fc91

Please sign in to comment.