forked from costas-basdekis/gcode-documentation-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmise.toml
53 lines (45 loc) · 980 Bytes
/
mise.toml
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
[tools]
pre-commit = "latest"
python = "3.10"
uv = "latest"
[tasks.test]
description = "Run tests"
run = "uv run pytest"
[tasks.clean]
description = "Clean python caches"
run = """
#!/usr/bin/env bash
rm -rf .tox .mypy_cache .pytest_cache
find -name __pycache__ -prune | xargs rm -rf
find -name '*.py[co]' -delete
"""
[tasks.setup]
description = "Install dependencies"
run = "uv sync"
[tasks.lint]
description = "Lint all files"
run = "pre-commit run --all-files"
[tasks.publish-output]
description = "publish output documentation"
run = """
#!/usr/bin/env bash
set -eox pipefail
uv run ./update_documentation.py
rm -rf /tmp/output/
cp -r output/ /tmp/
git fetch --depth=1
git switch output
git clean -f -d
rm -rf output/
mv /tmp/output .
git add output/
if git diff --cached --exit-code >/dev/null ; then
echo "No changes to commit"
exit 0
fi
git commit -m "Update documentation output"
git push
"""
[tasks.ci]
description = 'Run CI tasks'
depends = ['lint', 'test']