forked from KristianHolsheimer/keras-gym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (36 loc) · 1.32 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
PYTHON_EXEC = python3
all: clean src wheel
clean:
$(PYTHON_EXEC) setup.py clean
rm -rf dist build *.egg-info
docs: clean_docs
$(PYTHON_EXEC) setup.py build_sphinx
clean_docs:
rm -rf build/sphinx doc/build
src:
$(PYTHON_EXEC) setup.py sdist
wheel:
$(PYTHON_EXEC) setup.py bdist_wheel
install:
$(PYTHON_EXEC) setup.py install
flake8:
$(PYTHON_EXEC) setup.py flake8
upload: all
$(PYTHON_EXEC) -m twine upload -u krispisvis dist/*
test: flake8
$(PYTHON_EXEC) -m pytest
nbconvert:
rm -f doc/_static/notebooks/*/*.html doc/_static/notebooks/*.html
for f in $$(find notebooks/*/*.ipynb); do jupyter nbconvert --to html --output-dir doc/_static/$$(dirname $$f) $$f; done
install_dev: install_requirements
$(PYTHON_EXEC) -m pip install -e .
install_requirements:
for r in requirements.txt requirements.dev.txt doc/requirements.txt; do $(PYTHON_EXEC) -m pip install -r $$r; done
upgrade_requirements:
for r in requirements.txt requirements.dev.txt doc/requirements.txt; do $(PYTHON_EXEC) -m pur -r $$r; $(PYTHON_EXEC) -m pip install -r $$r; done
tf_gpu:
$(PYTHON_EXEC) -m pip uninstall --yes tensorflow && $(PYTHON_EXEC) -m pip install tensorflow-gpu
tf_cpu:
$(PYTHON_EXEC) -m pip uninstall --yes tensorflow-gpu && $(PYTHON_EXEC) -m pip install tensorflow
rm_pycache:
find -regex '.*__pycache__[^/]*' -type d -exec rm -rf '{}' \;