-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
51 lines (41 loc) · 895 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
49
50
51
# Variables
SOURCE = casanova
# Functions
define clean
rm -rf *.egg-info .pytest_cache build dist
find . -name "*.pyc" | xargs rm -f
find . -name __pycache__ | xargs rm -rf
rm -f *.spec
endef
# Commands
all: lint test
test: unit
publish: clean lint test upload
$(call clean)
clean:
$(call clean)
deps:
pip3 install -U pip
pip3 install -r requirements.txt
lint:
@echo Searching for unused imports...
importchecker $(SOURCE) | grep -v __init__ || true
importchecker test | grep -v __init__ || true
@echo
format:
@echo Formatting source code using black
black $(SOURCE) benchmark scripts test
@echo
unit:
@echo Running unit tests...
pytest -svvv test
@echo
upload:
python setup.py sdist bdist_wheel
twine upload dist/*
# To be sure it works with pyenv:
# $ pyenv local casanova 3.7 3.8 3.9 3.10 3.11
tox:
tox
readme:
python -m scripts.generate_readme > docs/cli.md