-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
62 lines (61 loc) · 2.17 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
default_install_hook_types: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
exclude: ^tests/
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
hooks:
- id: mypy
exclude: ^(tests\/.*|docs\/.*)$
additional_dependencies: [types-tabulate, types-PyYAML]
- repo: local
hooks:
- id: pipenv-lock
name: Generate Pipfile.lock for sambanova-generative-data-prep
stages: [manual]
language: system
entry: bash -c 'source .circleci/VERSIONS &&
test ${CIRCLECI} = "true" &&
pipenv lock ||
docker run
-e DOCKER_DEFAULT_PLATFORM=${PLATFORM}
--rm -v ${PWD}:/app -w /app ${DOCKER_IMAGE} bash -c "
pip install pip==${PIP_VERSION} && pip install pipenv==${PIPENV_VERSION} && pipenv lock &&
pipenv requirements > requirements/requirements.txt &&
pipenv requirements --categories=default,build-packages,dev-packages,docs-packages,tests-packages > requirements/all-requirements.txt &&
pipenv requirements --categories build-packages > requirements/build-requirements.txt &&
pipenv requirements --categories dev-packages > requirements/dev-requirements.txt &&
pipenv requirements --categories docs-packages > requirements/docs-requirements.txt &&
pipenv requirements --categories tests-packages > requirements/tests-requirements.txt"'
- id: pytest
name: Run Pytest using pipenv
stages: [manual]
language: system
entry: bash -c 'pipenv run pytest -m fast'
always_run: true
pass_filenames: false