-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
51 lines (34 loc) · 1.05 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
SOURCES = $(shell find . -name "*.py")
install:
pip install -r requirements.txt
install-dev: install
pip install -e ".[dev]"
install-docs:
pip install -e ".[dev,docs]"
format: isort-format black-format
isort-format:
isort .
black-format:
black .
lint: isort-lint black-lint flake8-lint
isort-lint:
isort --check-only .
black-lint:
black --check .
flake8-lint:
flake8 .
unit:
pytest -svvv tests
coverage:
coverage run --source=pycfmodel --branch -m pytest tests/ --junitxml=build/test.xml -v
coverage report
coverage xml -i -o build/coverage.xml
coverage html
test: lint unit
test-docs:
mkdocs build --strict
freeze:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile --no-emit-index-url --no-annotate --output-file requirements.txt setup.py
freeze-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile --no-emit-index-url --upgrade --no-annotate --output-file requirements.txt setup.py
.PHONY: install install-dev install-docs format isort-format black-format lint isort-lint black-lint flake8-lint unit coverage test freeze freeze-upgrade