-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
58 lines (45 loc) · 1.24 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
.DEFAULT_GOAL := all
isort = isort balsam tests
black = black --target-version py37 balsam tests
.PHONY: install-dev
install-dev:
python -m pip install --upgrade wheel pip
python -m pip install -r requirements/dev.txt
.PHONY: format
format:
$(isort)
$(black)
.PHONY: lint
lint:
flake8 balsam/ tests/
$(isort) --check-only --df
$(black) --check --diff
.PHONY: mypy
mypy:
mypy --config-file setup.cfg --package balsam
.PHONY: generate-api
generate-api:
python balsam/schemas/api_generator.py > balsam/_api/models.py
.PHONY: validate-defaults
validate-defaults:
python balsam/config/defaults/validate.py
.PHONY: test-unit
test-unit:
pytest tests/units --cov=balsam --cov-config setup.cfg
.PHONY: test-api
test-api:
pytest tests/server tests/api --cov=balsam --cov-config setup.cfg
.PHONY: test-site-integ
test-site-integ:
pytest tests/site_integration --cov=balsam --cov-config setup.cfg
.PHONY: testcov
testcov:
pytest tests/units tests/server tests/api tests/site_integration --cov=balsam --cov-config setup.cfg --cov-report=html
.PHONY: distribute
distribute:
cp docs/README.md README.md
python -m build
python -m twine check dist/*
python -m twine upload dist/*
.PHONY: all
all: generate-api validate-defaults format lint mypy testcov