This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
/
Makefile
68 lines (50 loc) · 2.18 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
tests: ## Make unit tests
IEX_TOKEN=Tpk_ecc89ddf30a611e9958142010a80043c python -m pytest -v pyEX --cov=pyEX --junitxml=python_junit.xml --cov-report=xml --cov-branch --reruns 2 --reruns-delay 1
lint: ## run linter
python -m flake8 pyEX setup.py docs/conf.py
fix: ## run black fix
python -m black pyEX/ setup.py docs/conf.py
talib_nix: ## install talib for *nix
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar xfzv ta-lib-0.4.0-src.tar.gz
cd ta-lib && ./configure --prefix=/usr LDFLAGS="-lm" && make && sudo make install
talib_darwin: ## install talib for mac
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar xfzv ta-lib-0.4.0-src.tar.gz
cd ta-lib && ./configure && make && make install
talib_windows_py37: ## install talib for windows
python -m pip install https://public.paine.nyc/TA_Lib-0.4.21-cp37-cp37m-win_amd64.whl
talib_windows_py38: ## install talib for windows
python -m pip install https://public.paine.nyc/TA_Lib-0.4.21-cp38-cp38-win_amd64.whl
talib_windows_py39: ## install talib for windows
python -m pip install https://public.paine.nyc/TA_Lib-0.4.21-cp39-cp39-win_amd64.whl
annotate: ## MyPy type annotation check
python -m mypy -s pyEX
annotate_l: ## MyPy type annotation check - count only
python -m mypy -s pyEX | wc -l
clean: ## clean the repository
find . -name "__pycache__" | xargs rm -rf
find . -name "*.pyc" | xargs rm -rf
rm -rf .coverage cover htmlcov logs build dist *.egg-info
make -C ./docs clean
rm -rf ./docs/*.*.rst # generated
docs: ## make documentation
make -C ./docs html
open ./docs/_build/html/index.html
install: ## install to site-packages
python -m pip install .
dev:
python -m pip install .[dev]
dist: ## create dists
rm -rf dist build
python setup.py sdist bdist_wheel
python -m twine check dist/*
publish: dist ## dist to pypi
python -m twine upload dist/* --skip-existing
# Thanks to Francoise at marmelab.com for this
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
print-%:
@echo '$*=$($*)'
.PHONY: clean test tests help annotate annotate_l docs dist