-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
57 lines (47 loc) · 1.26 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
CLI_APP = whaleAlertLogger
PACKAGE_NAME = whalealert
VENV_NAME = venv
VENV_ACTIVATE = $(VENV_NAME)/bin/activate
PYTHON = $(VENV_NAME)/bin/python3
COVERAGE = $(VENV_NAME)/bin/coverage3
test: venv
@. $(VENV_ACTIVATE); $(COVERAGE) run -m unittest discover -s tests
@. $(VENV_ACTIVATE); $(COVERAGE) report
testRun: install package
$(CLI_APP) -h
$(CLI_APP) -w testWorkingDir -g
$(CLI_APP) -s
$(CLI_APP) -s -j
$(CLI_APP) -q
$(CLI_APP) -v
$(CLI_APP) -q -m 1
$(CLI_APP) -q -b bitcoin
$(CLI_APP) -q -b bitcoin -t BTC
$(CLI_APP) -q -t ETH
$(CLI_APP) -w testWorkingDir -x
rm -f cryptoData.xlsx
rm -rf testWorkingDir
pip install .
package: venv test
@. $(VENV_ACTIVATE); \
$(PYTHON) setup.py sdist bdist_wheel
venv: $(VENV_ACTIVATE)
$(VENV_ACTIVATE):
@test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
@. $(VENV_ACTIVATE); pip3 install -r requirements.txt
@touch $(VENV_ACTIVATE)
install:
@pip3 install .
testRelease: test
@$(PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*
release: test
@$(PYTHON) -m twine upload --skip-existing dist/*
uninstall: clean
@pip3 uninstall $(PACKAGE_NAME)
clean:
@rm -rf $(VENV_NAME)
@rm -rf *.egg-info
@rm -rf build/
@rm -rf dist/
@rm -rf __pycache__
@rm -rf **/__pycache__