Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rapids-dependency-file-generator pre-commit hook #531

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

jameslamb
Copy link
Member

Contributes to rapidsai/shared-workflows#46.

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 to dependencies.yaml cause some error from rapids-dependency-file-generator.

If this project checks any files modified by that tool into source control in the future, it'd also raise an error if any of those files change.

This is a bit cheaper way to find out about things like typos, misaligning spacing, etc. than waiting for CI to report it. It's very fast, shouldn't be noticeable in day-to-day development.

How I tested this

Changed an output: conda to output: condafile (not a valid output type) in dependencies.yaml.

Ran pre-commit run --all-files.

Observed the expected failure.

Screenshot 2024-01-31 at 9 14 10 AM

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

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The cmake-format.json is up to date with these changes.
  • I have added new files under rapids-cmake/
    • I have added include guards (include_guard(GLOBAL))
    • I have added the associated docs/ rst file and update the api.rst

@jameslamb jameslamb added non-breaking Introduces a non-breaking change 3 - Ready for Review Ready for review by team bug Something isn't working labels Jan 31, 2024
@KyleFromNVIDIA
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit e2aceda into rapidsai:branch-24.04 Feb 5, 2024
16 checks passed
@jameslamb jameslamb deleted the ci/pre-commit branch February 5, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants