From fecdb8717eeb0da4d964d22775a9e81038eabfb2 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 25 Mar 2025 19:06:34 -0700 Subject: [PATCH] Polish CONTRIBUTING>md (#2005) --- CONTRIBUTING.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1531bb88..fddb2a974 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,26 +5,26 @@ possible. ## Pull Requests -1. Fork and submit pull requests to the repo. +1. Fork and submit pull requests to the repo. 2. If you've added code that should be tested, add tests. 3. If a change is likely to impact efficiency, run some of the benchmarks before and after the change. Examples of benchmarks can be found in `benchmarks/python/`. 4. If you've changed APIs, update the documentation. -5. Every PR should have passing tests and at least one review. +5. Every PR should have passing tests and at least one review. 6. For code formatting install `pre-commit` using something like `pip install pre-commit` and run `pre-commit install`. This should install hooks for running `black` and `clang-format` to ensure consistent style for C++ and python code. - + You can also run the formatters manually as follows: - - ``` - clang-format -i file.cpp - ``` - - ``` - black file.py - ``` - + + ```shell + clang-format -i file.cpp + ``` + + ```shell + black file.py + ``` + or run `pre-commit run --all-files` to check all files in the repo. ## Issues