-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (40 loc) · 1.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
.PHONY: ci check-venv pip pip-dev lint-check lint-fix test typecheck package package-dist package-upload style
venv: ## create virtual env
python3 -v venv venv
ci: pip pip-dev lint-check
$(MAKE) test
check-venv:
if [ -z $${VIRTUAL_ENV+x} ]; then echo "Are you sure you want to install dependencies outside of a virtual environment?"; sleep 30; fi
pip: check-venv
pip install -r requirements/cpu.txt
pip install -r requirements/base.txt
pip-dev: check-venv
pip install -r requirements/dev.txt
test:
python -m coverage erase
python -m coverage run --source taleweave/ -m unittest discover -v -s tests/
python -m coverage html -i
python -m coverage xml -i
python -m coverage report -i
package: package-dist package-upload
package-dist:
python3 ./setup.py sdist
package-upload:
twine upload dist/*
lint-check:
black --check taleweave/
black --check tests/
flake8 taleweave
flake8 tests
isort --check-only --filter-files taleweave
isort --check-only --filter-files tests
lint-fix:
black taleweave/
black tests/
flake8 taleweave
flake8 tests
isort --filter-files taleweave
isort --filter-files tests
style: lint-fix
typecheck:
mypy taleweave