-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (52 loc) · 1.78 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
COV=pytest --cov --cov-config=pyproject.toml
develop:
pdm sync --clean
lock:
pdm lock -G :all
black:
black -l 82 src _transonic_testing data_tests tests
format: black
tests_pythran:
TRANSONIC_BACKEND="pythran" pytest --nbval-lax tests data_tests/ipynb
tests_cython:
TRANSONIC_BACKEND="cython" pytest tests data_tests/ipynb
tests_jax:
TRANSONIC_BACKEND="jax" pytest --lf tests data_tests/ipynb
tests_numba:
TRANSONIC_BACKEND="numba" pytest tests data_tests/ipynb
tests_python:
TRANSONIC_BACKEND="python" pytest tests data_tests/ipynb
tests_mpi:
mpirun -np 2 pytest tests
tests_nbval:
pytest --nbval data_tests/ipynb
tests_cov:
mkdir -p .coverage
pytest tests --cov-config pyproject.toml
clean:
rm -rf $(HOME)/.transonic/*/*/_transonic_testing/
rm -rf $(HOME)/.transonic/*/*/*/_transonic_testing/
rm -rf .coverage build dist
tests_coverage_short:
mkdir -p .coverage
COVERAGE_FILE=.coverage/coverage.python TRANSONIC_BACKEND="python" $(COV) tests
COVERAGE_FILE=.coverage/coverage.numba TRANSONIC_BACKEND="numba" $(COV) tests
COVERAGE_FILE=.coverage/coverage.pythran $(COV) tests
tests_ipynb:
TRANSONIC_BACKEND="python" pytest --nbval-lax data_tests/ipynb
pytest --nbval-lax data_tests/ipynb
tests_coverage_mpi:
mpirun -np 2 coverage run --rcfile=pyproject.toml -m mpi4py -m pytest tests
tests_coverage: tests_coverage_short tests_coverage_mpi
COVERAGE_FILE=.coverage/coverage.cython TRANSONIC_BACKEND="cython" $(COV) tests
report_coverage:
coverage combine
coverage report
coverage html
coverage xml
@echo "Code coverage analysis complete. View detailed report:"
@echo "file://${PWD}/.coverage/index.html"
coverage_short: tests_coverage_short report_coverage
coverage: tests_coverage report_coverage
lint:
pylint -rn --rcfile=pylintrc --jobs=$(shell nproc) fluidsim --exit-zero