Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (152 loc) · 5.02 KB
/
Copy pathpyproject.toml
File metadata and controls
164 lines (152 loc) · 5.02 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
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
# The PyPI distribution is github-agent-cli: the names github-agent and ghagent are already
# taken by unrelated projects. The product and the console script keep their names.
name = "github-agent-cli"
description = "Repository and wiki steward: one command per documentation job, standard library only."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.11"
authors = [{ name = "github-agent contributors" }]
keywords = [
"agent",
"changelog",
"documentation",
"github",
"lint",
"markdown",
"repository-audit",
"wiki",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Quality Assurance",
]
dependencies = []
dynamic = ["version"]
[project.optional-dependencies]
# Pillow is the only optional dependency: it adds PNG output to `ghagent assets render`.
# Every check runs on the standard library.
png = ["Pillow>=10.0"]
[project.urls]
Homepage = "https://github.com/paulmann/github-agent"
Documentation = "https://github.com/paulmann/github-agent/tree/main/docs"
Repository = "https://github.com/paulmann/github-agent"
Changelog = "https://github.com/paulmann/github-agent/blob/main/CHANGELOG.md"
Issues = "https://github.com/paulmann/github-agent/issues"
[project.scripts]
ghagent = "ghagent:main"
# The version is read from the pack's single source: tools/ghalib/util.py.
# Nothing in this file repeats the number.
[tool.hatch.version]
path = "tools/ghalib/util.py"
pattern = '^PACK_VERSION = "(?P<version>[^"]+)"'
[tool.hatch.build]
exclude = [ "**/__pycache__",
"**/*.py[cod]",
"/.ghagent",
"/.install.json",
"/build",
"/dist",
]
# The installed package is the CLI plus its library, flat in site-packages:
# ghagent.py
# ghalib/...
# `sources` strips the `tools/` prefix, so no generic `tools` package is installed.
[tool.hatch.build.targets.wheel]
only-include = ["tools/ghagent.py", "tools/ghalib"]
sources = ["tools"]
# The source distribution is the complete pack. `ghagent install` copies tools, tests,
# skills, reference, docs, wiki and .github, so the sdist must carry all of them to stay
# installable from an unpacked archive.
[tool.hatch.build.targets.sdist]
only-include = [
"pyproject.toml",
"LICENSE",
"CITATION.cff",
"README.md",
"README.ru.md",
"README.de.md",
"README.es.md",
"README.hi.md",
"README.zh.md",
"AGENTS.md",
"AGENTS.ru.md",
"CHANGELOG.md",
"CHANGELOG.ru.md",
"CONTRIBUTING.md",
"CONTRIBUTING.ru.md",
"SECURITY.md",
"SECURITY.ru.md",
"SUPPORT.md",
"SUPPORT.ru.md",
"CODE_OF_CONDUCT.md",
"CODE_OF_CONDUCT.ru.md",
"GOVERNANCE.md",
"GOVERNANCE.ru.md",
".editorconfig",
".ghagent.json",
".gitattributes",
".gitignore",
".dockerignore",
".pre-commit-hooks.yaml",
"action.yml",
"Dockerfile",
"mkdocs.yml",
"scripts",
"assets",
"docs",
"examples",
"hooks",
"reference",
"skills",
"tests",
"tools",
"wiki",
".github",
]
# ---------------------------------------------------------------------------
# Static analysis. Development tools only: neither ruff nor mypy is imported by
# the pack, and neither ships in the wheel — the runtime dependency count stays 0.
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
# E501 is deliberately absent: prose in this pack is written in paragraphs that
# wrap for a reader, not for a 79-column counter. E4/E7/E9 and F catch the
# defects that matter (unused names, undefined names, broken syntax); I keeps
# imports sorted so two files do not fight about the same block.
select = ["E4", "E7", "E9", "F", "I"]
[tool.mypy]
python_version = "3.11"
files = ["tools/ghalib", "tools/ghagent.py"]
# The tests import the pack the same way the CLI does (`from ghalib import …`), so the same
# module path has to be on the checker's search path when a caller checks a single file such
# as `python -m mypy tests/run_tests.py`.
mypy_path = "tools"
# Build output is not part of the checked tree: a local `python -m build` leaves a second copy
# of the package under dist/, which mypy would otherwise report as a duplicate module.
exclude = ["^dist/", "^site/", "^build/"]
check_untyped_defs = true
no_implicit_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
# Pillow is the optional extra: it is absent on a bare checkout and in CI, and the pack
# imports it lazily, inside a function, exactly so that a missing Pillow lowers the output
# format instead of breaking the import. The checker must not turn that into an error.
[[tool.mypy.overrides]]
module = ["PIL", "PIL.*"]
ignore_missing_imports = true