-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (130 loc) · 4.5 KB
/
pyproject.toml
File metadata and controls
144 lines (130 loc) · 4.5 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "actionable-errors"
version = "0.1.1"
description = "Three-audience error framework: typed errors for code, actionable suggestions for humans, tool guidance for AI agents"
readme = "README.md"
requires-python = ">=3.11,<3.14"
license = { text = "MIT" }
authors = [{ name = "Jack Pines" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
# ZERO runtime dependencies — stdlib only
dependencies = []
[project.optional-dependencies]
dev = [
"pyright>=1.1,<2",
"pytest>=8,<9",
"pytest-asyncio>=0.24,<1",
"pytest-cov>=6,<7",
"ruff>=0.8,<1",
"taskipy>=1.14,<2",
"pre-commit>=4,<5",
]
[project.urls]
Repository = "https://github.com/grimlor/actionable-errors"
# ---------------------------------------------------------------------------
# Taskipy
# ---------------------------------------------------------------------------
[tool.taskipy.tasks]
lint = "uv run ruff check --fix src/ tests/"
format = "uv run ruff format src/ tests/"
type = "uv run pyright src/ tests/"
test = "uv run pytest tests/ -v"
cov = "uv run pytest tests/ --cov=actionable_errors --cov-report=term-missing"
check = "task format && task lint && task type && task test"
# ---------------------------------------------------------------------------
# Ruff
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 99
src = ["src", "tests"]
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"RUF", # ruff-specific rules
"D", # pydocstyle
"PLC0415", # import-outside-top-level
"PLC2701", # import-private-name (preview)
]
ignore = [
"E501", # line length (handled by formatter)
"D212", # multi-line-summary-first-line (conflicts with D213)
"D203", # one-blank-line-before-class (conflicts with D211)
]
[tool.ruff.lint.isort]
known-first-party = ["actionable_errors"]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"PLC0415", # import-outside-top-level — tests may import inside functions
"PLC2701", # import-private-name — testing internal state is intentional
"D205", # BDD Given/When/Then blocks aren't summary+body
"D400", # BDD steps don't end with periods
"D415", # same as D400
"D401", # fixture docstrings are descriptive, not imperative
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ---------------------------------------------------------------------------
# Pyright
# ---------------------------------------------------------------------------
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "strict"
venvPath = "."
venv = ".venv"
# ---------------------------------------------------------------------------
# python-semantic-release
# ---------------------------------------------------------------------------
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
version_variables = []
major_on_zero = false
allow_zero_version = true
commit_message = "chore(release): {version}"
tag_format = "v{version}"
branch = "main"
build_command = ""
upload_to_pypi = false
changelog_file = "CHANGELOG.md"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["feat", "fix", "perf", "refactor", "docs", "style", "test", "build", "ci", "chore"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
# ---------------------------------------------------------------------------
# Pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
python_files = ["*_test.py", "test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --strict-markers -m 'not integration and not live'"
markers = [
"integration: marks tests requiring external services",
"live: marks tests requiring live network access",
]