-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
84 lines (67 loc) · 2.05 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.PHONY: install
install: build
pip install -Ue .[dev]
.PHONY: install-py2
install-py2: build
python2 -m pip install -Ue .[dev]
.PHONY: force-install
force-install: force-build
pip install -Ue .[dev]
.PHONY: force-install-py2
force-install-py2: force-build
python2 -m pip install -Ue .[dev]
.PHONY: setup
setup:
pip install -U setuptools wheel pip pytest coconut-develop[watch]
.PHONY: unclean-build
unclean-build:
coconut setup.coco --and bbopt-source bbopt --no-tco --line-numbers --strict --jobs sys
-mkdir "./bbopt/examples"
cp -rf "./bbopt-source/examples" "./bbopt/"
.PHONY: build
build: clean unclean-build
.PHONY: force-build
force-build: clean
coconut setup.coco --and bbopt-source bbopt --force --no-tco --line-numbers --strict --jobs sys
-mkdir "./bbopt/examples"
cp -rf "./bbopt-source/examples" "./bbopt/"
.PHONY: package
package:
python3 setup.py sdist bdist_wheel
.PHONY: upload
upload: install package
pip3 install -U --ignore-installed twine
twine upload dist/*
.PHONY: test
test: install
pytest --strict-markers --full-trace -s ./bbopt/tests
.PHONY: force-test
force-test: force-install
pytest --strict-markers --full-trace -s ./bbopt/tests
.PHONY: force-test-py2
force-test-py2: force-install-py2
python2 -m pytest --strict-markers --full-trace -s ./bbopt/tests
.PHONY: test-keras
test-keras: install
-rm ./bbopt/examples/keras_example.bbopt.pickle
python ./bbopt/examples/keras_example.py
.PHONY: clean
clean:
rm -rf ./dist ./build
-find . -name "*.pyc" -delete
-C:/GnuWin32/bin/find.exe . -name "*.pyc" -delete
-find . -name "__pycache__" -delete
-C:/GnuWin32/bin/find.exe . -name "__pycache__" -delete
-find . -name "*.bbopt.pickle" -delete
-C:/GnuWin32/bin/find.exe . -name "*.bbopt.pickle" -delete
-find . -name "*.bbopt.json" -delete
-C:/GnuWin32/bin/find.exe . -name "*.bbopt.json" -delete
.PHONY: wipe
wipe: clean
rm -rf ./bbopt ./setup.py
.PHONY: watch
watch: install
coconut bbopt-source bbopt --watch --no-tco --line-numbers --strict --jobs sys
.PHONY: benchmark
benchmark: unclean-build
python ./bbopt/benchmarking.py