-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (118 loc) · 2.54 KB
/
pyproject.toml
File metadata and controls
141 lines (118 loc) · 2.54 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
[project]
name = "git-draft"
description = "Version-controlled code assistant"
authors = [{name="Matthieu Monsch", email="mtth@apache.org"}]
license = "MIT"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.12"
dependencies = [
"docopt-ng (>=0.9,<0.10)",
"jinja2 (>=3.1.5,<4)",
"msgspec (>=0.19.0,<0.20.0)",
"xdg-base-dirs (>=6.0.2,<7)",
"yaspin (>=3.1.0,<4)",
]
[project.optional-dependencies]
claude-code = ["claude-code-sdk (==0.0.22)"]
openai = ["openai (>=1.64.0,<2)"]
[project.scripts]
git-draft = "git_draft.__main__:main"
[project.urls]
repository = "https://github.com/mtth/git-draft"
documentation = "https://mtth.github.io/git-draft"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# Poetry
[tool.poetry]
version = "0.0.0" # Set programmatically
packages = [{include="git_draft", from="src"}]
[tool.poetry.dependencies]
python = ">=3.12,<4"
[tool.poetry.group.dev.dependencies]
coverage = "^7.4.4"
mypy = "^1.18.1"
poethepoet = "^0.25.0"
pytest = "^8.2.0"
pytest-asyncio = "^1.0.0"
ruff = "^0.11.0"
# Poe
[tool.poe.tasks.fix]
help = "format source code"
sequence = [
{cmd="ruff format ${args}"},
{cmd="ruff check --fix ${args}"},
]
args = [
{name="args", help="target folders", positional=true, multiple=true, default="src tests"},
]
[tool.poe.tasks.lint]
help = "lint configuration and source code"
sequence = [
{cmd="poetry check"},
{cmd="ruff check ${args}"},
{cmd="mypy ${args}"},
]
args = [
{name="args", help="target folders", positional=true, multiple=true, default="src tests"},
]
[tool.poe.tasks.test]
help = "run tests with coverage"
sequence = [
{cmd="coverage run"},
{cmd="coverage report"},
]
# Other tools
[tool.coverage.run]
branch = true
command_line = "-m pytest"
relative_files = true
[tool.coverage.report]
include = ["src/**/*.py"]
show_missing = true
[tool.mypy]
disable_error_code = "import-untyped"
enable_error_code = "exhaustive-match"
[tool.pytest.ini_options]
log_level = "DEBUG"
[tool.ruff]
line-length = 79
[tool.ruff.lint]
select = [
"A",
"ANN",
"ARG",
"D",
"E",
"ERA",
"F",
"I",
"INP",
"LOG",
"N",
"PL",
"RUF",
"SIM",
"SLF",
"T20",
"TD",
"UP",
"W"
]
ignore = [
"ANN003", "ANN401",
"D102", "D103", "D105", "D107", "D415",
"PLR2004",
"TD002", "TD003",
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-returns = 20
[tool.ruff.lint.per-file-ignores]
"__main__.py" = ["T20"]
"tests/**" = ["ANN", "D", "SLF"]