-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (134 loc) · 4.1 KB
/
pyproject.toml
File metadata and controls
149 lines (134 loc) · 4.1 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
[project]
name = "kingpin"
description = "Deployment Automation Engine"
requires-python = ">=3.11"
license = "Apache-2.0"
authors = [{name = "Nextdoor Engineering"}]
maintainers = [{name = "Nextdoor Engineering"},]
keywords = [
"deployment",
"automation",
"kingpin",
"aws",
"nextdoor",
"cloudformation"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
]
dependencies = [
# JSON schema validation for the deployment DSL
"jsonschema>=3.0.0,<5.0.0",
"jsonpickle==4.1.1",
# CFN YAML parsing (handles edge cases PyYAML doesn't)
"cfn-flip==1.3.0",
# Colorized log output
"rainbow_logging_handler==2.2.2",
# kingpin.actors.aws.*
"boto3==1.42.0",
# snake_case to CamelCase conversion (S3 actor)
"inflection==0.5.1",
]
dynamic = [
"version",
"readme",
]
[project.optional-dependencies]
# NOTE: keep in sync with [dependency-groups] docs (used by uv locally)
docs = [
"Sphinx",
"sphinx_rtd_theme",
]
[project.urls]
Homepage = "https://nextdoor.com/"
Documentation = "https://kingpin.readthedocs.io/en/latest/"
Source = "https://github.com/Nextdoor/kingpin"
Changelog = "https://github.com/Nextdoor/kingpin/releases"
[project.scripts]
kingpin = "kingpin.bin.deploy:begin"
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages]
find = {}
[tool.setuptools.dynamic]
version = {attr = "kingpin.version.__version__"}
readme = {file = ["README.rst"]}
[tool.coverage.run]
omit = ["**/test/*"]
[tool.coverage.report]
show_missing = true
[dependency-groups]
dev = [
# formatting
"black",
# linting (parallel to pyflakes during transition)
"ruff",
# testing
"pytest",
"pytest-cov",
"pyflakes",
"requests",
# building
"setuptools",
"build",
]
# NOTE: keep in sync with [project.optional-dependencies] docs (used by RTD/pip)
docs = [
"Sphinx",
"sphinx_rtd_theme",
]
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes (superset of standalone pyflakes)
"W", # pycodestyle warnings
"I", # isort (import sorting)
"B", # flake8-bugbear (common bug patterns)
"UP", # pyupgrade (auto-modernize Python syntax)
"ASYNC", # flake8-async (blocking calls in async functions)
"RUF006", # asyncio-dangling-task
]
ignore = [
# --- Conflict resolution: existing CI tools take precedence ---
# TODO(ruff-primary): re-enable E501 after ruff replaces black.
# Black handles line length; ruff E501 flags string literals and comments
# that black intentionally leaves alone.
"E501",
# --- Intentional patterns (not tool conflicts) ---
# Module-level imports not at top — 3 intentional violations in
# test_base.py where imports follow os.environ manipulation.
"E402",
# Mutable argument defaults (B006) — BaseActor.__init__ uses `options={}`
# and `init_context={}` as defaults intentionally (copied immediately).
"B006",
# Function call in default argument (B008) — 1 instance in base.py, same
# pattern as B006. Intentional.
"B008",
# Ambiguous variable name (E741) — 1 instance using `e` as a variable
# in an except clause. Standard Python pattern.
"E741",
]
[tool.ruff.lint.per-file-ignores]
# Test files: suppress assert-raises-exception (B017) — tests legitimately
# use `assertRaises(Exception)` for broad exception testing.
"**/test/*.py" = ["B017"]
[tool.ruff.format]
# TODO(ruff-primary): ruff format is NOT used during the parallel-tools period.
# Black remains the sole formatter. These settings exist only to keep ruff format
# output close to black's for comparison, not for actual use.
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.uv]
python-preference = "only-managed"