Skip to content

Commit

Permalink
Add pre-commit info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Sep 13, 2020
1 parent 2a74775 commit 090e15a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,27 @@ For more information on Python logging configuration, see the [Python `logging`
- You can run isort from the command line with `poetry run isort .`.
- Configuration for isort is stored in _[pyproject.toml](pyproject.toml)_.
- Other web code (JSON, Markdown, YAML) is formatted with [Prettier](https://prettier.io/).
- Code style is enforced with [pre-commit](https://pre-commit.com/), which runs [Git hooks](https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).

- Configuration is stored in _[.pre-commit-config.yaml](.pre-commit-config.yaml)_.
- Pre-commit can run locally before each commit (hence "pre-commit"), or on different Git events like `pre-push`.
- Pre-commit is installed in the Poetry environment. To use:

```sh
# after running `poetry install`
path/to/inboard
❯ poetry shell

# install hooks that run before each commit
path/to/inboard
.venv ❯ pre-commit install

# and/or install hooks that run before each push
path/to/inboard
.venv ❯ pre-commit install --hook-type pre-push
```

- Pre-commit is also useful as a CI tool. The [hooks](.github/workflows/hooks.yml) GitHub Actions workflow runs pre-commit hooks with [GitHub Actions](https://github.com/features/actions).

### GitHub Actions workflows

Expand Down

0 comments on commit 090e15a

Please sign in to comment.