-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
67 lines (46 loc) · 1.11 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
.DEFAULT_GOAL := build
.PHONY: build publish package coverage test lint docs venv
PROJ_SLUG = mmconv_cli
CLI_NAME = mmconv-cli
PY_VERSION = 3.9
LINTER = pylint
build:
pip install --editable .
run:
$(CLI_NAME) run
submit:
$(CLI_NAME) submit
freeze:
pip freeze > requirements.txt
lint:
$(LINTER) $(PROJ_SLUG)
test: lint
py.test --cov-report term --cov=$(PROJ_SLUG) tests/
quicktest:
py.test --cov-report term --cov=$(PROJ_SLUG) tests/
coverage: lint
py.test --cov-report html --cov=$(PROJ_SLUG) tests/
docs: coverage
mkdir -p docs/source/_static
mkdir -p docs/source/_templates
cd docs && $(MAKE) html
pandoc --from=markdown --to=rst --output=README.rst README.md
answers:
cd docs && $(MAKE) html
xdg-open docs/build/html/index.html
package: clean docs
python setup.py sdist
publish: package
twine upload dist/*
clean :
rm -rf dist \
rm -rf docs/build \
rm -rf *.egg-info
coverage erase
venv :
virtualenv --python python$(PY_VERSION) venv
install:
pip install -r requirements.txt
licenses:
pip-licenses --with-url --format=rst \
--ignore-packages $(shell cat .pip-lic-ignore | awk '{$$1=$$1};1')