Skip to content

Commit 91eeb00

Browse files
committed
CI job for black formatting
1 parent f174764 commit 91eeb00

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
uses: actions/setup-python@v2
3636
with:
3737
python-version: ${{ matrix.python-version }}
38+
- name: Pre-commit Checks
39+
run: |
40+
pip -q install pre-commit
41+
pre-commit run --all-files
3842
- name: Start from clean state
3943
run: make clean
4044
- name: Run tests

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.1.0
4+
hooks:
5+
- id: black

CONTRIBUTE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,14 @@ make check
3232
git commit -m "Update CASE ontology pointer to version 0.6.0" dependencies/CASE case_utils/ontology/version_info.py
3333
git commit -m "Build CASE 0.6.0.ttl" case_utils/ontology/case-0.6.0.ttl
3434
```
35+
36+
This project uses [the `pre-commit` tool](https://pre-commit.com/) for linting The easiest way to install it is with `pip`:
37+
```bash
38+
pip install pre-commit
39+
pre-commit --version
40+
```
41+
42+
The `pre-commit` tool hooks into Git's commit machinery to run a set of linters and static analyzers over each change. To install `pre-commit` into Git's hooks, run:
43+
```bash
44+
pre-commit install
45+
```

0 commit comments

Comments
 (0)