diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f7c0ba17..b7acf730d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,32 +35,34 @@ into three categories: Remember, if you are unsure about anything, don't hesitate to comment on issues and ask for clarifications! -## Pre-commit checks +## Installation of Development Dependencies -Numba-CUDA uses [`pre-commit`](https://pre-commit.com/) to run a number of style -checks in CI. To ensure your contribution will pass the checks, you can also set -up pre-commit locally to run the checks prior to committing. +There are some dependencies that are required for developing Numba-CUDA, but are not required for installation or distribution. +These dependencies are listed under the `test-cu11` and `test-cu12` optional dependency groups in our project configuration. -To set up pre-commit with Numba-CUDA, run +To install Numba-CUDA for development, run this in the root of the repository: +```shell +pip install -e ".[test-cu11]" ``` -pip install pre-commit -``` - or - -``` -conda install pre-commit +```sh +pip install -e ".[test-cu12]" ``` -depending on your package manager, then run +Numba-CUDA uses [`pre-commit`](https://pre-commit.com/) to run a number of style +checks in CI. To ensure your contribution will pass the checks, you can also set +up pre-commit locally to run the checks prior to committing. -``` +```shell +# This will run a small set of checks every time you commit. pre-commit install ``` -in the root of the Numba-CUDA repository to set up the pre-commit hooks to run -checks prior to each commit. +To run them manually without committing, run this in the root of the repository: +```shell +pre-commit run --all-files +``` ## Releases diff --git a/pyproject.toml b/pyproject.toml index 3d15ac212..7eb060003 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ cu12 = [ "nvidia-nvjitlink-cu12" ] test = [ + "pre-commit", "psutil", "cffi", "pytest", @@ -46,28 +47,15 @@ test = [ "filecheck", ] test-cu11 = [ + "numba-cuda[cu11]", "numba-cuda[test]", "nvidia-curand-cu11", ] test-cu12 = [ + "numba-cuda[cu12]", "numba-cuda[test]", "nvidia-curand-cu12", ] -dev = [ - "pre-commit", - "numba-cuda[test]", -] -dev-cu11 = [ - "numba-cuda[test-cu11]", - "numba-cuda[test]", - "numba-cuda[dev]", -] -dev-cu12 = [ - "numba-cuda[test-cu12]", - "numba-cuda[test]", - "numba-cuda[dev]", -] - [project.urls] Homepage = "https://nvidia.github.io/numba-cuda/"