-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (38 loc) · 1018 Bytes
/
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
project := rendermd
.PHONY: clean
clean:
@rm -rf dist ${project}.egg-info
@rm -rf .cover
@rm -f .coverage
.PHONY: test
test:
PYTHONPATH=. pytest $(filter-out $@,$(MAKECMDGOALS))
.PHONY: coverage
coverage: ## Generate a test coverage report based on `manage.py test`
PYTHONPATH=. pytest . --cov=. --cov-report term-missing \
--cov-report html:.cover \
--cov-report xml:./coverage.xml \
--junitxml ./test-reports/xunit.xml
.PHONY: setup
setup:
git init && rm -rf .git/hooks && ln -s $(shell pwd)/git-hooks .git/hooks
.PHONY: publish
publish: clean
python setup.py sdist bdist_wheel
twine upload dist/* --config-file .pypirc --skip-existing
.PHONY: generate-stubs
generate-stubs: clean
find . -type f -name '*.pyi' | xargs rm
stubgen ${project}/ -o .
.PHONY: lint
lint:
black . --check
mypy .
isort -c
.PHONY: check-version-bump
check-version-bump:
./check_version_bump.sh
.PHONY: pre-commit
pre-commit: generate-stubs
python -m rendermd.command_line
m2r README.md --overwrite