-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlets.yaml
84 lines (62 loc) · 2.07 KB
/
lets.yaml
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
shell: bash
commands:
create:
description: Create .venv
cmd: pdm sync --group dev
clean:
description: Clean build artifacts
cmd: |
find . -type d -name __pycache__ -exec rm -fr {} \;
TO_DEL="build .coverage coverage.xml .lets/ log .mypy_cache .pdm-build pi_py.egg-info pi_ui/dist pi_wasm/build pi_wasm/.zig-cache pi_wasm/zig-out __pycache__ .pytest_cache .tox"
for d in ${TO_DEL}
do
echo $d
rm -fr $d
done
envclean:
description: Clean environment
cmd: |
TO_DEL="pi_ui/node_modules .venv"
for d in ${TO_DEL}
do
echo $d
rm -fr $d
done
allclean:
depends: [ clean, envclean ]
description: Clean build artifacts and environment
gitignore:
description: generate .gitignore
cmd: |
source $HOME/.local/.bash.d/gitignore.io
gi -s -- python,zig >.gitignore
echo -e '\n.pdm-python\n.zig-cache/' >>.gitignore
pybuild:
cmd: ENABLE_TESTS=0 .devcontainer/vsc-run-pytests.sh
wasmbuild:
cmd: ENABLE_TESTS=0 .devcontainer/vsc-run-zig-tests.sh
uibuild:
cmd: .devcontainer/vsc-build-ui.sh
gen:
description: Build wasm & ui; then start ui
cmd: pdm run python -m pi_py.pi_digits "$@"
ui:
depends: [ allclean, pybuild, wasmbuild, uibuild, uistart ]
description: Build wasm & ui; then start ui
uistart:
cmd: cd pi_ui && pnpm start
flake8:
cmd: pdm run flake8 pi_py/
mypy:
cmd: pdm run mypy pi_py/
test:
depends: [ pytest, wasmtest ]
pytest:
cmd: ENABLE_TESTS=1 .devcontainer/vsc-run-pytests.sh
wasmtest:
cmd: ENABLE_TESTS=1 .devcontainer/vsc-run-zig-tests.sh
testcov:
description: Produce test coverage xml and term reports
cmd: pdm run pytest --cov=pi_py --cov-report xml:coverage.xml --cov-report term
tox:
cmd: pdm run tox "$@"