/
Makefile
executable file
·57 lines (37 loc) · 955 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
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# ifeq ($(TRAVIS_OS_NAME),windows)
# SHELL := cmd
# else
# SHELL := /bin/bash
# endif
SHELL := /bin/bash
default:
@echo "\"make save\"?"
gh:
@if [ "$(shell git rev-parse --abbrev-ref HEAD)" != "master" ]; then exit 1; fi
@echo "Pushing to github..."
git add -A
@read -p "Enter commit message: " MSG; \
git commit -a -m "$$MSG"
git push
clean: rmonelab rmtmp
@find . | grep -E "(__pycache__|\.pyc|\.pyo$\)" | xargs rm -rf
- rm -rf .ipynb_checkpoints
- rm -f .app*
run:
jupyter notebook --no-browser &
sleep 3 && $(BROWSER) http://localhost:8888/apps/app.ipynb
lstmp:
@find . -type d -name 'tmp*'
rmtmp:
@find . -type d -name 'tmp*' | xargs rm -rf
lsonelab:
@find . -type f -name '*.pos' -o -name '*.pre' -o -name '*.msh' -o -name '*.res'
rmonelab:
@find . -type f -name '*.pos' -o -name '*.pre' -o -name '*.msh' -o -name '*.res' | xargs rm -f
lint:
flake8 .
style:
@echo "Styling..."
black .
save: clean style gh