-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (33 loc) · 999 Bytes
/
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
all: run_tests
run_tests:
export PYTHONPATH=`pwd`; \
python -m unittest discover -v
check:
python -m compileall .
flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
mypy -p lale
PYTHON_VERSION ?= 3.6
docker_build: docker_build$(PYTHON_VERSION)
docker_run: docker_run$(PYTHON_VERSION)
docker: docker$(PYTHON_VERSION)
docker_build%:
docker build --build-arg=python_version=$* -t lale$* .
docker_run%:
docker run -it lale$* bash
docker%: docker_build% docker_run%
# I am not sure why this is needed, but Make does not work without it
- true
launch_notebook:
export PYTHONPATH=`pwd`; \
jupyter notebook
docs/new_operators.md: examples/docs_new_operators.ipynb
export PYTHONPATH=`pwd`; \
jupyter nbconvert --to markdown --execute --output ../$@ $<
clean:
-rm -rf lale/__pycache__
-rm -rf lale/*.pyc
-rm -rf lale/tests/__pycache__
-rm -rf test/__pycache__
-rm -rf test/*.pyc
-rm -rf examples/.ipynb_checkpoints
.PHONY: clean docker% docker_build% docker_run%