-
Notifications
You must be signed in to change notification settings - Fork 0
/
.local
90 lines (64 loc) · 2.3 KB
/
.local
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
85
86
87
88
89
90
#
n=single
# alias x=' script -c "python3 ${n}.py" err '
alias x=' clear && logts -b log/single python3 ${n}.py '
# Otherwise, it picks opts from ../setup.cfg and dies looking for ./tests.
# !!! now using 'invoke test'
# No # # alias t=' clear && logts -b log/test pytest -c /dev/null '
# NO # # alias t=' clear && logts -b log/test ./py simple.py'
export PYTHONPATH=/home/phdyex/.local/lib/python3.8
# cease the warnings about a package that I do not maintain.
export PYTHONWARNINGS="ignore::DeprecationWarning:simplejson"
# !!! now using 'invoke test'
# NO # # alias t=' clear && logts -b log/. python parser.py '
# NO # alias t=' tst --general 63 '
alias c=' invoke clean && rm -f *.dot *.pdf && find . -name __pycache__ | xargs rm -rf '
alias _tst=' logts --quiet --base log t/run-test.py '
alias _err=' logts --quiet --base error t/run-test.py '
alias tst=' clear && _tst '
alias err=' clear && _err '
alias g=' tst --general '
alias p=' tst --program '
alias frag=' tst --fragment '
alias trail=' tst --trailing '
g=2
alias x=' g ${g} '
alias ex=' /usr/bin/emacs ./log/latest.txt '
alias trio="echo '# a b c / d e f / g h i / j k l / m n o'"
alias eterm=' emacs --load ~/.xemacs/my-ansi-term.el '
SAVED_GRAMMARS=ref/saved-grammar
alias save='( f=s/docopt.peg && set -x && cp $f ${SAVED_GRAMMARS}/$(ts --ref $f).peg )'
#
pt_target=tests
pt_opts=
alias pt='( c && export PYTHONPATH="t:.:${PYTHONPATH}" && logts -b log/test pytest -s ${pt_opts} ${pt_target} )'
alias px='( c && export PYTHONPATH="t:.:${PYTHONPATH}" && pytest -s ${pt_opts} ${pt_target} )'
#
# Wasn't there another feature here previously ?
function pytest-here() {
export PYTHONPATH=".:t:tests:${PYTHONPATH}"
logts -b log/test pytest -c /dev/null "$@"
}
alias pt-here=pytest-here
alias pthere=pytest-here
#------------------------------------------------------------------------------
# cbase=grammar/peg
cbase=grammar/python
# cgrp=develop
# ctgt=newline
# ctgt=line_dev
# ctgt=paragraph
# ctgt=blankline
# cgrp=optdesc
# ctgt=list
# ctgt=line
# ctgt=section
cgrp=.
ctgt=common
# ctgt=operand
# ctgt=option
# ctgt=usage
copt='-s -vvv'
alias cx=' clear && c && clear && pytest-here ${copt} tests/${cbase}/${cgrp}/test_${ctgt}.py '
echo ": cgrp = ${cgrp} , ctgt = ${ctgt}"
#------------------------------------------------------------------------------