-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
41 lines (32 loc) · 1.01 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
PYTHON_VERSION ?= 3.9
dist: clean-dist setup
. venv/bin/activate && python3 -m build .
.PHONY: setup
setup: venv/setup.txt
venv:
virtualenv venv --python=${PYTHON_VERSION}
venv/setup.txt: venv dev-requirements.txt
. venv/bin/activate && \
pip3 install --upgrade pip && \
pip3 install --requirement dev-requirements.txt
touch venv/setup.txt
.PHONY: test
test: setup
@ . venv/bin/activate && PYTHONPATH=src/ pytest -rsx tests/ src/ --cov ./src/rules_engine/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
@ . venv/bin/activate && black --check src tests
@ . venv/bin/activate && mypy src
.PHONY: clean
clean: clean-dist
rm -rf venv
.PHONY: clean-dist
clean-dist:
rm -rf build
rm -rf src/funnel_rules_engine.egg-info
rm -rf dist
.PHONY: release
release: test dist
. venv/bin/activate && twine upload dist/*
.PHONY: test-release
test-release: test dist
. venv/bin/activate && twine upload -r testpypi dist/*