-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pre-commit-config.yaml
55 lines (55 loc) · 1.65 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: fix-encoding-pragma
- id: check-docstring-first
- repo: https://github.com/johann-petrak/licenseheaders.git
rev: '8e2d6f944aea639d62c8d26cd99dab4003c3904d'
hooks:
- id: licenseheaders
pass_filenames: false # avoid files to be passed to pytest as args
entry: licenseheaders
args: ["-cy", "-o", "Telespazio France", "-n", "KARIOS", "-t", "apache-2.tmpl", "-u", "https://github.com/telespazio-tim/karios", "-d", "karios"]
require_serial: true
- repo: local
hooks:
- id: env
name: env
entry: python -c 'import os; assert os.environ["CONDA_DEFAULT_ENV"] == "karios", "Not in karios conda env"'
language: system
require_serial: true
- id: isort
name: isort
entry: isort --check .
language: system
types: [python]
require_serial: true
- id: black
name: black
entry: black -l 100 --check .
language: system
types: [python]
require_serial: true
- id: bandit
name: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
entry: bandit .
language: system
types: [python]
- id: tests
name: tests
description: Run tests
entry: env PYTHONPATH=karios pytest -s tests
language: system
types: [python]
require_serial: true
pass_filenames: false # avoid files to be passed to pytest as args
always_run: true
stages: [push]
# - id: docstyle
# name: docstyle
# entry: pydocstyle --convention=google
# language: system
# types: [python]
# require_serial: true