-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (45 loc) · 1.03 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
53
54
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/ ../iexcloud
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 ./iexcloud
black ./tests
flake8 ./iexcloud
flake8 ./tests
# create test
test:
make lint
pytest tests --cov
# create coverage report
coverage:
make activate
coverage run -m pytest tests
coverage html
requirements:
pipenv lock -r > requirements.txt