-
Notifications
You must be signed in to change notification settings - Fork 73
/
tox.ini
70 lines (63 loc) · 1.41 KB
/
tox.ini
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
[tox]
requires =
tox>=4
envlist = lint, type, py{38,39,310,311,312}
[testenv]
description = run unit tests
commands_pre =
pip install ".[test]"
commands =
pytest {posargs}
[testenv:lint]
description = run linters with formatting
skip_install = true
allowlist_externals =
find
npx
commands_pre =
pip install ".[lint]"
commands =
black .
isort .
find ./src/mmh3 -name '*.[ch]' -exec clang-format -i {} +
npx prettier --write .
pylint --recursive=y .
npx markdownlint --config .markdown-lint.yml \
--ignore-path .gitignore **/*.md
[testenv:type]
description = run type checks
commands_pre =
pip install ".[test,type]"
commands =
mypy --strict tests
[testenv:docs]
description = run documentation build
allowlist_externals =
make
commands_pre =
pip install ".[docs]"
commands =
make -C docs clean
make -C docs html
[testenv:build_cfiles]
allowlist_externals =
find
git
commands_pre =
pip install ".[lint]"
commands =
git submodule update --init
python util/refresh.py
find ./src/mmh3 -name '*.[ch]' -exec clang-format -i {} +
[testenv:benchmark]
description = run benchmarks
commands_pre =
pip install ".[benchmark]"
commands =
python benchmark/benchmark.py {posargs}
[testenv:plot]
description = plot benchmark results
commands_pre =
pip install ".[benchmark,plot]"
commands =
python benchmark/plot_graph.py {posargs}