-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (40 loc) · 959 Bytes
/
Makefile
File metadata and controls
48 lines (40 loc) · 959 Bytes
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
SHELL=/bin/bash -O extglob -c
.PHONY: activate_env clean_pyc docker lint test coverage
# activate pipenv
activate:
-pipenv shell
# clean up pyc files
clean_pyc:
find . -name '*.py[co]' -exec rm {} \;
# build and run development docker container
docker:
scripts/docker_build.sh
scripts/docker_run.sh
# run sphinx documentation
doc:
echo "Please commit your changes or stash them before running documentation."
make activate
-rm -rf docs/build
-cd docs && sphinx-apidoc -o source/ ../pyback
cd docs && make clean && make html
git checkout gh-pages 2>/dev/null || git checkout --orphan gh-pages
rm -rf !(.git|docs)
mv docs/build/html/* .
touch .nojekyll
rm -rf docs
git add --all
git commit -m "Update Documentation"
git checkout master
# lint code
lint:
make activate
black ./pyback
black ./tests
# create test
test:
pytest tests --cov
# create coverage report
coverage:
make activate
coverage run -m pytest tests
coverage html