-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
58 lines (41 loc) · 1.14 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
.PHONY: spec
src = unshell/
spec = spec/
report ?= term # or html
setup-poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
install:
poetry install
./scripts/install_hooks.sh
dev: check
debug:
poetry run pytest ${src} -x --pdb
lint:
poetry run flake8 ${src} ${spec}
fmt:
poetry run autopep8 --in-place --recursive ${src} ${spec}
check:
poetry run mypy ${src}
test:
poetry run pytest ${src}
test-file: ## make test-file f=unshell/test_core.py
poetry run pytest ${f}
test-one: ## make test-one k=test_unshell_should_return_function
poetry run pytest -k ${k}
spec:
poetry run pytest ${spec}
cov:
poetry run pytest --cov=${src} --cov=${spec} --cov-report=${report}
build: ## make build version=patch|minor|major
rm -rf dist/
poetry version ${version}
poetry build
deploy:
git add -f pyproject.toml dist/
git commit -m "Release $(shell poetry version -s)"
git tag -a "$(shell poetry version -s)" -m "Release $(shell poetry version -s)"
git push --follow-tags
publish:
poetry publish
release: ## make release version=patch|minor|major
gh workflow run release.yml -f version=${version}