Skip to content

Commit

Permalink
Add copyright check (#9)
Browse files Browse the repository at this point in the history
* Add copyright check

Fixes: #2
  • Loading branch information
KyleFromNVIDIA authored Jan 29, 2024
1 parent 67defbc commit 342015c
Show file tree
Hide file tree
Showing 6 changed files with 1,749 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,17 @@
language: python
types: [shell]
args: [--fix]
- id: verify-copyright
name: verify-copyright
description: make sure copyright headers are up to date
entry: verify-copyright
language: python
files: |
(?x)
[.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
meta[.]yaml$|
pyproject[.]toml$|
setup[.]cfg$
args: [--fix]
4 changes: 2 additions & 2 deletions ci/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

set -ue

pip install build pytest
pip install build

python -m build .

for PKG in dist/*; do
echo "$PKG"
pip uninstall -y rapids-pre-commit-hooks
pip install "$PKG"
pip install "$PKG[test]"
pytest
done
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ classifiers = [
requires-python = ">=3.9"
dependencies = [
"bashlex",
"gitpython",
]

[project.optional-dependencies]
dev = [
test = [
"freezegun",
"pytest",
]

[project.scripts]
verify-conda-yes = "rapids_pre_commit_hooks.shell.verify_conda_yes:main"
verify-copyright = "rapids_pre_commit_hooks.copyright:main"

[tool.setuptools]
packages = { "find" = { where = ["src"] } }
Expand Down
Loading

0 comments on commit 342015c

Please sign in to comment.