-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
261 lines (245 loc) · 6.16 KB
/
pyproject.toml
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
name = "fujin-cli"
version = "0.10.0"
description = "Get your project up and running in a few minutes on your own vps."
readme = "README.md"
keywords = [
"caddy",
"deployment",
"django",
"fastapi",
"litestar",
"python",
"systemd",
]
authors = [
{ name = "Tobi DEGNON", email = "[email protected]" },
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"cappa>=0.24",
"fabric>=3.2.2",
"gevent[recommended]>=24.11.1",
"msgspec[toml]>=0.18.6",
"python-dotenv>=1.0.1",
"rich>=13.9.2",
]
urls.Documentation = "https://github.com/falcopackages/fujin#readme"
urls.Issues = "https://github.com/falcopackages/fujin/issues"
urls.Source = "https://github.com/falcopackages/fujin"
scripts.fujin = "fujin.__main__:main"
[dependency-groups]
dev = [
"bump-my-version>=0.27",
"django>=5.1.2",
"fastapi>=0.115.3",
"git-cliff>=2.6.1",
"litestar>=2.12.1",
]
docs = [
"myst-parser",
"shibuya",
"sphinx-autobuild",
"sphinx-autodoc2>=0.5",
"sphinx-copybutton",
"sphinx-design",
"sphinx-exec-code>=0.14",
"sphinx-togglebutton>=0.3.2",
]
[tool.hatch.build.targets.wheel]
packages = [
"src/fujin",
]
[tool.ruff]
# Assume Python {{ python_version }}
target-version = "py312"
# Same as Black.
line-length = 88
indent-width = 4
extend-include = [
"*.pyi?",
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".github",
".hg",
".mypy_cache",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"migrations",
"node_modules",
]
# Like Black, indent with spaces, rather than tabs.
format.indent-style = "space"
# Like Black, use double quotes for strings.
format.quote-style = "double"
# Like Black, automatically detect the appropriate line ending.
format.line-ending = "auto"
lint.select = [
"B", # flake8-bugbear
"E", # Pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
]
lint.ignore = [
"E501",
"E741",
"I", # isort
] # temporary
# Tests can use magic values, assertions, and relative imports
lint.per-file-ignores."tests/**/*" = [
"PLR2004",
"S101",
"TID252",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"A",
"B",
"C",
"D",
"E",
"F",
"I",
]
lint.unfixable = [
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
lint.isort.force-single-line = true
lint.isort.known-first-party = [
"fujin",
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
# Preserve types, even if a file imports `from __future__ import annotations`.
lint.pyupgrade.keep-runtime-typing = true
[tool.bumpversion]
current_version = "0.10.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = [
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = "--no-verify"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[tool.mypy]
check_untyped_defs = true
exclude = [
"docs",
"tests",
"migrations",
"venv",
".venv",
"examples",
]
files = [
"fujin",
]
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
ignore_errors = true
module = [
"tests.*",
"docs.*",
]
[tool.uv.workspace]
members = [
"examples/django/bookstore",
]
[tool.git-cliff.changelog]
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
"""
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\n
"""
footer = """
<!-- generated by git-cliff -->
"""
trim = true
[tool.git-cliff.git]
conventional_commits = true
filter_unconventional = true
split_commits = false
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc|^docs", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^build", group = "<!-- 7 -->📦 Build" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 8 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 9 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 10 -->◀️ Revert" },
]
protect_breaking_commits = false
filter_commits = false
topo_order = false
sort_commits = "newest"