-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
104 lines (83 loc) · 2.74 KB
/
Copy pathMakefile
File metadata and controls
104 lines (83 loc) · 2.74 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.PHONY: help clean clean-pyc clean-build clean-coverage list test test-all coverage docs release sdist js js-watch docker-run docker-build docker-run-watch
help:
@echo "----"
@echo "MISC"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "test-all - run tests on every Python version with tox"
@echo "bump-and-push - run tests, lint, bump patch, push to git, and release on pypi"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "sdist - package"
@echo "cleanup-pep8 - automatical clean up some linting violations"
@echo "----"
@echo "DOCKER"
@echo "docker-build - run a server with local checkout using docker"
@echo "docker-run - run a server with local checkout using docker"
clean: clean-build clean-pyc clean-coverage
clean-build:
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-coverage:
rm -fr docs/htmlcov/
js:
./bin/omnic --verbose precache-named viewers --type=min.js --force
js-watch:
find omnic/ -name \*.js | entr -r ./bin/omnic --verbose precache-named viewers --type=min.js --force
docker-build:
docker build --tag omnic .
docker-run: docker-build
docker run -it -p 127.0.0.1:8080:8080 omnic
docker-run-watch:
find omnic -name '*.js' -o -name '*.py' | entr -r make docker-run
lint:
# flake8 omnic test # for now ignore linting issues in test
flake8 omnic
test:
py.test
test-all:
tox
test-watch-s:
find omnic/ test/ -name \*.py | entr -r py.test -s
runserver-watch:
find omnic/ test/ -name \*.py | entr -r python ./bin/omnic runserver
cleanup-pep8:
autoflake --in-place --remove-all-unused-imports --remove-unused-variables -r omnic
autoflake --in-place --remove-all-unused-imports --remove-unused-variables -r test
autopep8 --in-place -r omnic
autopep8 --in-place -r test
isort -rc --atomic omnic
isort -rc --atomic test
bump-and-push: test lint
bumpversion patch
git push
git push --tags
make release
coverage:
coverage run --source omnic `which py.test`
#coverage run `which py.test`
coverage report -m
coverage html -d ./docs/htmlcov/
xdg-open ./docs/htmlcov/index.html
docs:
rm -f docs/omnic.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ omnic
$(MAKE) -C docs clean
$(MAKE) -C docs html
xdfg-open docs/_build/html/index.html
release: clean
python setup.py sdist upload
python setup.py bdist_wheel upload
sdist: clean
python setup.py sdist
python setup.py bdist_wheel upload
ls -l dist