-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 1.19 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
42
43
44
45
46
47
48
49
50
51
52
.PHONY: clean virtualenv test docker dist dist-upload lint lint-fix view-coverage setupaws
clean:
find . -name '*.py[co]' -delete
find ./cluster_funk -name __pycache__ |xargs rm -rf
virtualenv:
virtualenv --prompt '|> cluster_funk <| ' env
env/bin/pip install -r requirements-dev.txt
env/bin/python setup.py develop
@echo
@echo "VirtualENV Setup Complete. Now run: source env/bin/activate"
@echo
test:
python -m pytest \
-v \
--cov=cluster_funk \
--cov-report=term \
--cov-report=xml \
--junitxml=pytest-report.xml \
--cov-report=html:coverage-report \
tests/
lint:
python -m pycodestyle tests
python -m pycodestyle cluster_funk
lint-fix:
python -m autopep8 -ria tests
python -m autopep8 -ria cluster_funk
docker: clean
docker build -t cluster_funk:latest .
dist: clean
rm -rf dist/*
python -B setup.py sdist
python -B setup.py bdist_wheel
dist-upload:
twine upload dist/*
view-coverage:
open ./coverage-report/index.html
setupaws:
mkdir -p ~/.aws
touch ~/.aws/credentials
touch ~/.aws/config
echo '[default]\naws_secret_access_key = my-40-digit-secret-key\naws_access_key_id = my-20-digit-id' >> ~/.aws/credentials
echo '[default]\nregion = us-east-1' >> ~/.aws/config