-
Notifications
You must be signed in to change notification settings - Fork 169
/
Copy path.pre-commit-config.yaml
129 lines (125 loc) · 4.7 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
repos:
# Black: format Python code
# https://github.com/psf/black/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
exclude: (versioneer.py|dataprofiler/_version.py)
types: [file, python]
language_version: python3
# Isort: sort import statements
# https://github.com/timothycrosley/isort/blob/develop/.pre-commit-hooks.yaml
# The setup.cfg holds the compatible config for use with black
# https://github.com/psf/black/blob/master/docs/compatible_configs.md#isort
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3
# Flake8: complexity and style checking
# https://flake8.pycqa.org/en/latest/user/using-hooks.html
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
exclude: (^docs/|^dataprofiler/tests/|^.*/__init__.py)
language_version: python3
# General fixers: format files for white spaces and trailing new lines, warn on debug statements
# https://github.com/pre-commit/pre-commit-hooks#hooks-available
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: (^dataprofiler/tests/data/|^dataprofiler/tests/speed_tests/data/)
- id: debug-statements
- id: end-of-file-fixer
exclude: (^dataprofiler/tests/data/)
# Mypy: Optional static type checking
# https://github.com/pre-commit/mirrors-mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
exclude: (^dataprofiler/tests/|^resources/|^examples|venv*/|versioneer.py|dataprofiler/_version.py)
language_version: python3
additional_dependencies: # Keep up-to-date with the respective requirement files
[
# requirements.txt
h5py>=2.10.0,
wheel>=0.33.1,
numpy<2.0.0,
pandas>=1.1.2,
python-dateutil>=2.7.5,
pytz>=2020.1,
pyarrow>=1.0.1,
chardet>=3.0.4,
fastavro>=1.0.0.post1,
python-snappy>=0.7.1,
charset-normalizer>=1.3.6,
psutil>=4.0.0,
scipy>=1.4.1,
requests>=2.28.1,
networkx>=2.5.1,
typing-extensions>=3.10.0.2,
HLL>=2.0.3,
datasketches>=4.1.0,
boto3>=1.28.61,
# requirements-dev.txt
check-manifest>=0.48,
black==22.3.0,
isort==5.12.0,
pre-commit==2.19.0,
tox==3.25.1,
types-setuptools==67.7.0.1,
types-python-dateutil==2.8.19.12,
types-requests==2.30.0.0,
types-chardet==5.0.4.5,
types-six==1.16.21.8,
# requirements-ml.txt
scikit-learn>=0.23.2,
'keras>=2.4.3,<=3.4.0',
rapidfuzz>=2.6.1,
"tensorflow>=2.6.4,<2.15.0; sys.platform != 'darwin'",
"tensorflow>=2.6.4,<2.15.0; sys_platform == 'darwin' and platform_machine != 'arm64'",
"tensorflow-macos>=2.6.4,<2.15.0; sys_platform == 'darwin' and platform_machine == 'arm64'",
tqdm>=4.0.0,
# requirements-reports.txt
'matplotlib>=3.3.3,<3.6.1',
seaborn>=0.11.1,
# requirements-test.txt
coverage>=5.0.1,
fsspec>=0.3.3,
pytest>=6.0.1,
pytest-cov>=2.8.1,
pytest-xdist>=2.1.0,
pytest-forked>=1.3.0,
toolz>=0.10.0,
'memray>=1.7.0,<1.12.0',
]
# Check-manifest: ensures required non-Python files are included in MANIFEST.in
# https://github.com/mgedmin/check-manifest/blob/master/.pre-commit-hooks.yaml
- repo: https://github.com/mgedmin/check-manifest
rev: "0.48"
hooks:
- id: check-manifest
additional_dependencies: ['h5py', 'wheel', 'future', 'numpy<2.0.0', 'pandas',
'python-dateutil', 'pytz', 'pyarrow', 'chardet', 'fastavro',
'python-snappy', 'charset-normalizer', 'psutil', 'scipy', 'requests',
'networkx','typing-extensions', 'HLL', 'datasketches', 'boto3']
# Pyupgrade - standardize and modernize Python syntax for newer versions of the language
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.0
hooks:
- id: pyupgrade
args: ["--py38-plus"]
exclude: (versioneer.py|dataprofiler/_version.py)
# Autoflake - cleanup unused variables and imports
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
args:
- "--in-place"
- "--ignore-pass-statements"