diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c320c236..ab01b05c 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,6 +1,8 @@ name: documentation on: workflow_dispatch +# on: [pull_request] + permissions: contents: write diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b86c2759..7dcbdd19 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,3 @@ -ci: - autofix_commit_msg: | - [pre-commit.ci] auto fixes from pre-commit.com hooks - - for more information, see https://pre-commit.ci - autofix_prs: true - autoupdate_branch: '' - autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' - autoupdate_schedule: weekly - skip: [] - submodules: false repos: - repo: https://github.com/cheshirekow/cmake-format-precommit diff --git a/README.md b/README.md index 256bf560..11042ac0 100644 --- a/README.md +++ b/README.md @@ -59,14 +59,29 @@ Precommit is a framework for mmangaing and maintain multi-lanagueg pre-commit ho Precommit is auto applied through CI to every pull request and every commit to the said pull request. Precommit checks for valid yaml files, end of file spaces, Syntax of C codeand etc. To see specifically what formating precommit looks for please check out our .clang-format and .cmake-format filed as well as our .pre-commit-config.yaml which show the specific precommit hooks being applied. ### Running Pre-commit locally -To run pre-commit locally you first must install pre-commit. It can be installed via +To run pre-commit locally you first must install pre-commit and there are a couple ways to do this. + +#### Prerequiste to installing pre-commit +It is recommended that you install pre-commit through python. Here we assume Python is aleadly installed if that is not the case please check out these [docs](https://wiki.python.org/moin/BeginnersGuide/Download) for how to install python. + +Next create a virtual environment with the following: +```shell +python -m venv /path/to/new/virtual/environment +``` + +Activate the new environment: +```shell +source /path/to/new/virtual/environment/bin/activate +``` + + Now that we are within a virtual environment we can install pre-commit via; ```shell pip install pre-commit ``` To install the hooks and have pre-commit run automatically before every commit run ```shell -pre-commit install +pre-commit install --install-hooks ``` If you want to manually run all pre-commit hooks on a repository, run