-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (152 loc) · 3.88 KB
/
pyproject.toml
File metadata and controls
170 lines (152 loc) · 3.88 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[build-system]
requires = ["hatchling>=1.24"]
build-backend = "hatchling.build"
[project]
name = "spine-lite"
version = "0.3.0a0"
description = "Deterministic policy and effects runtime for LLM tool calls."
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Mac McFall" }]
keywords = [
"llm",
"policy",
"effects",
"claude-code",
"hook",
"deterministic",
"tool-use",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.6",
"typer>=0.12",
]
[project.optional-dependencies]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.25",
]
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"hypothesis>=6.100",
"mypy>=1.10",
"ruff>=0.5",
"nox>=2024.4.15",
]
[project.scripts]
spine-lite = "spine_lite.cli:app"
[project.urls]
Homepage = "https://github.com/MacFall7/spine-lite-python"
Repository = "https://github.com/MacFall7/spine-lite-python"
Issues = "https://github.com/MacFall7/spine-lite-python/issues"
Changelog = "https://github.com/MacFall7/spine-lite-python/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.wheel]
packages = ["src/spine_lite"]
[tool.hatch.build.targets.sdist]
include = [
"src/spine_lite",
"tests",
"README.md",
"LICENSE",
"CHANGELOG.md",
"pyproject.toml",
]
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
extend-exclude = ["site", ".nox", ".venv"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"B", # flake8-bugbear
"UP", # pyupgrade
"ANN", # flake8-annotations
"D", # pydocstyle
"S", # flake8-bandit
"RUF", # ruff-specific
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TC", # flake8-type-checking
"N", # pep8-naming
]
ignore = [
"D203", # incompatible with D211
"D213", # incompatible with D212
"ANN401", # Any is gated separately via mypy + comment
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D", "S101", "S603", "ANN", "PT011"]
"noxfile.py" = ["D", "ANN"]
"docs/**" = ["D"]
# Typer introspects the type annotation at runtime to do Path validation,
# so Path can't move to a TYPE_CHECKING block in cli.py.
"src/spine_lite/cli.py" = ["TC003"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[tool.mypy]
python_version = "3.11"
strict = true
files = ["src/spine_lite", "tests"]
warn_unreachable = true
pretty = true
[[tool.mypy.overrides]]
module = ["typer.*"]
ignore_missing_imports = false
# Hypothesis's @given / @settings decorators don't propagate types in a way
# mypy --strict accepts as "typed" — disabling disallow_untyped_decorators
# only inside the test suite keeps strict typing on the runtime modules.
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_decorators = false
[tool.pytest.ini_options]
minversion = "8.0"
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--import-mode=importlib",
]
testpaths = ["tests"]
xfail_strict = true
filterwarnings = ["error"]
[tool.coverage.run]
source = ["src/spine_lite"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"\\.\\.\\.",
"if __name__ == .__main__.:",
]