-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
90 lines (77 loc) · 2.24 KB
/
mise.toml
File metadata and controls
90 lines (77 loc) · 2.24 KB
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
# SPDX-FileCopyrightText: 2026 Knitli Inc.
#
# SPDX-License-Identifier: MIT OR Apache-2.0
[tools]
uv = "latest"
tombi = "latest"
ruff = "latest"
ty = "latest"
typos = "latest"
"pipx:reuse" = "latest"
"pipx:exportify" = "latest"
git-cliff = "latest"
[settings]
idiomatic_version_file_enable_tools = []
[tasks]
[tasks.test]
run = "PYTHONPATH=src uv run pytest tests"
description = "Run the test suite with pytest."
[tasks.testcov]
run = '''PYTHONPATH=src uv run pytest tests/ --cov=exportify --cov-report=xml --cov-report=term-missing --junit-xml=test-results.xml'''
description = "Run the test suite with pytest and generate a coverage report in XML format."
[tasks.venv]
usage = '''
flag "--clear" help="Clear the existing virtual environment before creating a new one."
'''
run = '''
if [ "${usage_clear}" = "true" ]; then
uv venv --clear --seed -p 3.12 .venv
else
uv venv --seed -p 3.12 --allow-existing .venv
fi
'''
tools.uv = "latest"
[tasks.source]
depends = ["venv"]
run = "source .venv/bin/activate"
[tasks.sync]
depends = ["venv"]
run = "uv sync --inexact"
[tasks.annotate]
tools."pipx:reuse" = "latest"
run = '''reuse annotate -r -y 2026 --copyright "Knitli Inc." --license "MIT OR Apache-2.0" --skip-existing --fallback-dot-license ./'''
[tasks.fix]
usage = '''
flag "--add" help="Automatically add changed files from fixes to git staging area."
flag "--add-and-commit" help="Automatically add changed files from fixes to git staging area and commit with an amend."
'''
depends = ["annotate"]
run = [
"ruff check --fix --unsafe-fixes src tests",
"ruff format src tests",
"typos -w",
"tombi format pyproject.toml ruff.toml mise.toml",
]
[tasks.fix.tools]
ruff = "latest"
tombi = "latest"
typos = "latest"
[tasks.lint]
run = [
"ruff check src tests",
"typos",
"tombi lint pyproject.toml ruff.toml mise.toml",
"reuse lint",
]
[tasks.ci]
depends = ["lint", "test"]
description = "Run all CI checks, including linting and tests."
[tasks.clean]
run = [
"rm -rf .venv dist build .pytest_cache .ruff_cache .coverage test-results.xml",
"find . -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true",
'''find . -type f -name "*.pyc" -delete 2>/dev/null || true''',
"mise cache clear",
"uv cache clean --force",
]
depends_post = ["sync"]