-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (37 loc) · 993 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
PYTHON ?= python3
.PHONY: format
format:
$(PYTHON) -m black subsetter tests
$(PYTHON) -m isort subsetter tests
.PHONY: format-check
format-check:
$(PYTHON) -m black subsetter tests --check
$(PYTHON) -m isort subsetter tests --check
.PHONY: mypy
mypy:
$(PYTHON) -m mypy subsetter tests
.PHONY: pylint
pylint:
$(PYTHON) -m pylint subsetter tests
.PHONY: lint
lint: format-check mypy pylint
.PHONY: test
test:
$(PYTHON) -m pytest -sv tests/ -m 'not mysql_live and not postgres_live'
.PHONY: test_all
test_all:
$(PYTHON) -m pytest --cov subsetter -sv tests/
.PHONY: build
build:
$(PYTHON) -m build
.PHONY: clean
clean:
rm -rf build dist *.egg-info
.PHONY: pypi-test
pypi-test: build
TWINE_USERNAME=__token__ TWINE_PASSWORD="$(shell gpg -d test.pypi-token.gpg)" \
$(PYTHON) -m twine upload --repository testpypi dist/*
.PHONY: pypi-live
pypi-live: build
TWINE_USERNAME=__token__ TWINE_PASSWORD="$(shell gpg -d live.pypi-token.gpg)" \
$(PYTHON) -m twine upload dist/*