forked from facebookincubator/Bowler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
41 lines (33 loc) · 1.04 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
venv:
python3 -m venv .venv
@echo 'run `source .venv/bin/activate` to use virtualenv'
setup:
python3 -m pip install -Ur requirements.txt
python3 -m pip install -Ur requirements-dev.txt
dev: venv
source .venv/bin/activate && make setup
source .venv/bin/activate && python3 setup.py develop
@echo 'run `source .venv/bin/activate` to develop bowler'
release: lint test clean
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
format:
isort --recursive -y bowler setup.py
black bowler setup.py
lint:
@/bin/bash -c 'die() { echo "$$1"; exit 1; }; \
while read filename; do \
grep -q "Copyright (c) Facebook" "$$filename" || \
die "Missing copyright in $$filename"; \
grep -q "#!/usr/bin/env python3" "$$filename" || \
die "Missing #! in $$filename"; \
done < <( git ls-tree -r --name-only HEAD | grep ".py$$" )'
black --check bowler setup.py
mypy -m bowler
test:
python3 -m coverage run -m bowler.tests
python3 -m coverage report
clean:
rm -rf build dist README MANIFEST *.egg-info
distclean: clean
rm -rf .venv