-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject-config
executable file
·46 lines (33 loc) · 1.04 KB
/
project-config
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
#!/usr/bin/env bash
# A simple configuration file for my vim session
# This file sets up the Makefile and the ENV vars for my vim config.
generate_makefile() {
echo "\
# This file is generated by \`. project-config\`. Any changes made here are overwritten.
.PHONY: docs
PROJECT = $VIM_PROJNAME
install:
pip3 install -e .
all:
make install edit docs todo
edit:
make format && make lint && make typecheck && make badge
format:
black \$(PROJECT)
typecheck:
mypy --show-error-codes --disable-error-code attr-defined \$(PROJECT)
badge:
python3 utils/create_badge.py -c 'make lint'
lint:
pylint -d fixme --exit-zero \$(PROJECT)
todo:
python3 utils/list_todos.py \"\`grep -rnw . -e '# TODO'\`\"
docs:
pdoc --docformat google -o docs teahaz" > $VIM_PROJPATH/Makefile
}
export VIM_PROJNAME="teahaz.py"
export VIM_PROJPATH="$(realpath `dirname $BASH_SOURCE`)"
export VIM_COMMAND="python3 $VIM_PROJPATH/tests/yamlload.py"
export VIM_NOTES="$VIM_PROJPATH/notes.md"
generate_makefile
echo "Set up project \"$VIM_PROJNAME\" at path \"$VIM_PROJPATH\"."