Skip to content

Commit 388b926

Browse files
Add pre-commit config and CI workflow (#58)
* Add pre-commit config Closes #39 * Apply pre-commit formatting
1 parent dea6bc9 commit 388b926

27 files changed

+534
-88
lines changed

.github/workflows/pre-commit.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
env:
12+
SKIP: no-commit-to-branch
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v2
16+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.3.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: debug-statements
9+
- id: end-of-file-fixer
10+
- id: no-commit-to-branch
11+
args: [--branch, main]
12+
- id: trailing-whitespace
13+
- repo: https://github.com/PyCQA/isort
14+
rev: 5.10.1
15+
hooks:
16+
- id: isort
17+
name: isort
18+
- repo: https://github.com/asottile/pyupgrade
19+
rev: v2.37.1
20+
hooks:
21+
- id: pyupgrade
22+
args: [--py37-plus]
23+
- repo: https://github.com/psf/black
24+
rev: 22.6.0
25+
hooks:
26+
- id: black
27+
- id: black-jupyter
28+
- repo: https://github.com/PyCQA/pylint
29+
rev: v2.14.5
30+
hooks:
31+
- id: pylint
32+
args: [--rcfile=.pylintrc]
33+
files: ^pymc_experimental/
34+
- repo: https://github.com/MarcoGorelli/madforhooks
35+
rev: 0.3.0
36+
hooks:
37+
- id: no-print-statements
38+
files: ^pymc_experimental/
39+
- repo: local
40+
hooks:
41+
- id: no-relative-imports
42+
name: No relative imports
43+
entry: from \.[\.\w]* import
44+
types: [python]
45+
language: pygrep

0 commit comments

Comments
 (0)