From 03a77a1fbe1af401f07227995cc22be7de0116e7 Mon Sep 17 00:00:00 2001 From: leahh Date: Thu, 30 Jan 2025 15:05:42 -0700 Subject: [PATCH] remove .githooks/pre-commit and update documentation on how to set up the pre-commit hooks --- .githooks/pre-commit | 20 -------------------- docs/sphinx/contribute.rst | 8 +++----- 2 files changed, 3 insertions(+), 25 deletions(-) delete mode 100755 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit deleted file mode 100755 index ec3b5915..00000000 --- a/.githooks/pre-commit +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# File generated by pre-commit: https://pre-commit.com -# ID: 138fd403232d2ddd5efb44317e38bf03 - -# start templated -INSTALL_PYTHON=/vast/home/leahh/active/JAZE/BEE/.venv/bin/python -ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit) -# end templated - -HERE="$(cd "$(dirname "$0")" && pwd)" -ARGS+=(--hook-dir "$HERE" -- "$@") - -if [ -x "$INSTALL_PYTHON" ]; then - exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" -elif command -v pre-commit > /dev/null; then - exec pre-commit "${ARGS[@]}" -else - echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2 - exit 1 -fi diff --git a/docs/sphinx/contribute.rst b/docs/sphinx/contribute.rst index 229bce47..7f137fc8 100644 --- a/docs/sphinx/contribute.rst +++ b/docs/sphinx/contribute.rst @@ -14,13 +14,11 @@ Upon release, develop will be merged by the team lead into main. Additionally, a Style Guide =========== -BEE is python code and adheres to style guidelines specified in **setup.cfg**, enforced using `pylint `_. Before attempting to commit and push changes, please install our pre-commit githooks by running the following command in project root: +BEE is python code and adheres to style guidelines specified in **setup.cfg**, enforced using `pylint `_. Before attempting to commit and push changes, please set up the git hook scripts by running the following command in the project root: -If using `git --version` >= 2.9: - git config core.hooksPath .githooks +.. code-block:: -Otherwise: - cp .githooks/* .git/hooks/ + pre-commit install Important Notes: ----------------