From df7fc85682587e4fa0ffe96b3712b369da5735b5 Mon Sep 17 00:00:00 2001 From: Daniel Mesejo Date: Mon, 7 Aug 2023 18:47:45 +0200 Subject: [PATCH] docs: include pre-commit hooks section in contributor guide --- README.md | 6 +++--- docs/source/index.rst | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 506a38227..a682f73d5 100644 --- a/README.md +++ b/README.md @@ -222,11 +222,11 @@ python -m pytest ### Running & Installing pre-commit hooks -arrow-datafusion-python takes advantage of (pre-commit)[https://pre-commit.com/] to assist developers in with code linting to help reduce the number of commits that ultimately fail in CI due to linter errors. Using the pre-commit hooks is optional for the developer but certainly helpful for keep PRs clean and concise. +arrow-datafusion-python takes advantage of [pre-commit](https://pre-commit.com/) to assist developers with code linting to help reduce the number of commits that ultimately fail in CI due to linter errors. Using the pre-commit hooks is optional for the developer but certainly helpful for keeping PRs clean and concise. -Our pre-commit hooks can be installed by running `pre-commit install` which will install the configurations in your ARROW_DATAFUSION_PYTHON_ROOT/.github directory and run each time you perform a commit failing to perform the commit if an offending lint is found giving you the opportunity to make changes locally before pushing. +Our pre-commit hooks can be installed by running `pre-commit install`, which will install the configurations in your ARROW_DATAFUSION_PYTHON_ROOT/.github directory and run each time you perform a commit, failing to complete the commit if an offending lint is found allowing you to make changes locally before pushing. -The pre-commit hooks can also be ran ad-hoc without installing them by simply running `pre-commit run --all-files` +The pre-commit hooks can also be run adhoc without installing them by simply running `pre-commit run --all-files` ## How to update dependencies diff --git a/docs/source/index.rst b/docs/source/index.rst index 78f44ea17..a48db7df0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -259,6 +259,15 @@ Whenever rust code changes (your changes or via `git pull`): maturin develop python -m pytest +Running & Installing pre-commit hooks +===================================== + +arrow-datafusion-python takes advantage of `pre-commit `_ to assist developers with code linting to help reduce the number of commits that ultimately fail in CI due to linter errors. Using the pre-commit hooks is optional for the developer but certainly helpful for keeping PRs clean and concise. + +Our pre-commit hooks can be installed by running :code:`pre-commit install`, which will install the configurations in your ARROW_DATAFUSION_PYTHON_ROOT/.github directory and run each time you perform a commit, failing to complete the commit if an offending lint is found allowing you to make changes locally before pushing. + +The pre-commit hooks can also be run adhoc without installing them by simply running :code:`pre-commit run --all-files` + How to update dependencies ==========================