-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
53 lines (39 loc) · 1.44 KB
/
Makefile
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
.PHONY: docs build benchmarks
install:
find src/convtools -type f -name "*.so" -delete
pip install -e .
ls -la src/convtools
dynamic_docs_examples:
python build-docs-examples.py
dynamic_docs_performance:
python build-docs-performance.py
docs_drop_dynamic_md:
rm docs/examples-md/.last_build.csv || true
docs:
mkdocs serve
spellcheck:
find . \( -name "*.rst" -o -name "*.py" \) -not -path "./build/*" -not -path "./tests/*" -exec aspell/aspell {} \;
checks:
black src tests
isort src tests
pylint src
mypy --check-untyped-defs src
ruff check src
bash-py%:
docker run --rm -it -v $$PWD:/mnt/convtools -w /mnt/convtools python:$* bash
lock-py%:
docker run --rm -it \
-v $$PWD:/mnt/convtools \
-w /mnt/convtools/ci-requirements \
python:$* bash -c \
"rm -f requirements$*.out && pip install -r requirements$*.in && pip freeze > requirements$*.out"
test-py%:
docker build --build-arg="PY_VERSION=$*" -t convtools_$*:latest ci-requirements
docker run --rm -it -v $$PWD:/mnt/convtools convtools_$*:latest bash -c \
"pip install -e . && pytest"
test: test-py3.6 test-py3.7 test-py3.8 test-py3.9 test-py3.10 test-py3.11 test-py3.12
benchmark-py%:
~/.pyenv/versions/convtools-$*/bin/pip install -e .
~/.pyenv/versions/convtools-$*/bin/pip install tabulate
~/.pyenv/versions/convtools-$*/bin/python run_benchmarks.py
benchmarks: benchmark-py3.7 benchmark-py3.8 benchmark-py3.9 benchmark-py3.10 benchmark-py3.11 benchmark-py3.12 benchmark-py3.13