-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.34 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.34 KB
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
# Adds file annotations to Github Actions (only useful on CI)
GITHUB_ACTIONS_FORMATTING=0
ifeq ($(GITHUB_ACTIONS_FORMATTING), 1)
FLAKE8_FORMAT=--format='::error file=%(path)s,line=%(row)d,col=%(col)d,title=%(code)s::%(path)s:%(row)d:%(col)d: %(code)s %(text)s'
else
FLAKE8_FORMAT=
endif
.PHONY: test docs
docs:
# put -n back in when things are better documented
@(cd docs/ && (make html SPHINXOPTS="-W --keep-going"))
lint:
@echo " Linting FUSE codebase"
@python3 -m flake8 $(FLAKE8_FORMAT) fuse
@echo " Linting FUSE test suite"
@python3 -m flake8 $(FLAKE8_FORMAT) test
test_examples:
@echo " Running examples"
@FIREDRAKE_USE_FUSE=1 python3 -m pytest test/test_2d_examples_docs.py
@FIREDRAKE_USE_FUSE=1 python3 -m pytest test/test_3d_examples_docs.py
tests:
@echo " Running all tests"
@FIREDRAKE_USE_FUSE=1 python3 -m coverage run -p -m pytest -rx test
coverage:
@python3 -m coverage combine
@python3 -m coverage report -m
@python3 -m coverage json
test_cells:
@echo " Running all cell comparison tests"
@firedrake-clean
@FIREDRAKE_USE_FUSE=1 python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect0]
@firedrake-clean
@FIREDRAKE_USE_FUSE=1 python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect1]
clean:
@(cd docs/ && make clean)
prepush: lint tests
@rm .coverage.*
make clean docs