-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
72 lines (52 loc) · 2.15 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
SOURCES = $(shell find . -name "*.py")
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements.txt -r requirements-dev.txt .
install-docs:
pip install -r requirements.txt -r requirements-docs.txt .
format: isort-format black-format
isort-format:
isort .
black-format:
black .
lint: isort-lint black-lint ruff-lint
isort-lint:
isort --check-only .
black-lint:
black --check .
ruff-lint:
ruff check .
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
coverage-master:
coverage run --source=pycfmodel --branch -m pytest tests/ --junitxml=build/test.xml -v -m "not actions"
coverage report
coverage xml -i -o build/coverage.xml
coverage html
test: lint unit
test-docs:
mkdocs build --strict
FREEZE_OPTIONS = --no-emit-index-url --no-annotate -v --resolver=backtracking
freeze-base:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --output-file requirements.txt
freeze-dev:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --extra dev --output-file requirements-dev.txt
freeze-docs:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) setup.py --extra docs --output-file requirements-docs.txt
freeze: freeze-base freeze-dev freeze-docs
freeze-base-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --output-file requirements.txt
freeze-dev-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --extra dev --output-file requirements-dev.txt
freeze-docs-upgrade:
CUSTOM_COMPILE_COMMAND="make freeze" pip-compile $(FREEZE_OPTIONS) --upgrade setup.py --extra docs --output-file requirements-docs.txt
freeze-upgrade: freeze-base-upgrade freeze-dev-upgrade freeze-docs-upgrade
.PHONY: install install-dev install-docs format isort-format black-format lint isort-lint black-lint flake8-lint unit \
coverage test freeze freeze-upgrade freeze-base freeze-dev freeze-docs freeze-base-upgrade freeze-dev-upgrade \
freeze-docs-upgrade