-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
273 lines (239 loc) · 6.03 KB
/
pyproject.toml
File metadata and controls
273 lines (239 loc) · 6.03 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
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
262
263
264
265
266
267
268
269
270
271
272
273
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "borgitory"
version = "1.0.0"
description = "A comprehensive web-based management interface for BorgBackup repositories with real-time monitoring, automated scheduling, and cloud synchronization capabilities."
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{name = "mlapaglia", email = "[email protected]"},
]
keywords = ["borgbackup", "backup", "web-interface", "scheduling", "cloud-sync", "archive-management"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: System :: Archiving :: Backup",
"Topic :: System :: Systems Administration",
]
requires-python = ">=3.14"
dependencies = [
"aiofiles>=25.1.0",
"aiohttp>=3.13.3",
"aiosqlite>=0.21.0",
"alembic>=1.18.2",
"apscheduler>=3.11.2",
"bcrypt>=5.0.0",
"cron-descriptor>=2.0.6",
"cryptography>=46.0.5",
"docker>=7.1.0",
"fastapi>=0.128.4",
"jinja2>=3.1.6",
"pydantic>=2.12.5",
"python-dotenv>=1.2.1",
"python-multipart>=0.0.22",
"sqlalchemy>=2.0.46",
"sse-starlette>=3.2.0",
"urllib3>=2.6.3",
"uvicorn[standard]>=0.40.0",
]
[project.optional-dependencies]
dev = [
"debugpy>=1.8.20",
"djlint>=1.36.4",
"httpx>=0.28.1",
"mypy>=1.19.1",
"pre-commit>=4.5.1",
"pytest>=9.0.2",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"pytest-playwright>=0.7.2",
"ruff>=0.15.0",
"sqlalchemy[mypy]>=2.0.46",
"types-python-dateutil>=2.9.0.20260124",
"types-aiofiles>=25.1.0.20251011",
]
[project.urls]
Homepage = "https://borgitory.com"
Repository = "https://github.com/mlapaglia/Borgitory"
Issues = "https://github.com/mlapaglia/Borgitory/issues"
[project.scripts]
borgitory = "borgitory.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/borgitory"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/README.md",
"/LICENSE",
"/pyproject.toml"
]
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.14+.
target-version = "py314"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Force LF line endings on all platforms.
line-ending = "lf"
[tool.pytest.ini_options]
# Test discovery configuration
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-p no:playwright -m 'not e2e'"
# asyncio plugin configuration
asyncio_mode = "auto"
# Custom markers
markers = [
"integration: marks tests as integration tests (may require external dependencies)",
"e2e: marks tests as end-to-end browser tests (requires playwright)",
]
[tool.coverage.run]
concurrency = ["thread"]
source = ["src/borgitory"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/migrations/*",
"*/alembic/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[tool.mypy]
# Basic settings
python_version = "3.14"
strict = true
# Display options
pretty = true
show_column_numbers = true
show_error_codes = true
# Any-related rules
disallow_any_explicit = false
disallow_any_unimported = true
warn_return_any = true
# Other strict rules
implicit_reexport = false
namespace_packages = true
strict_concatenate = true
warn_incomplete_stub = true
# File configuration
exclude = [
"^alembic/",
"^htmlcov/",
"^\\.",
]
files = ["src"]
# Plugins
plugins = [
"pydantic.mypy",
"sqlalchemy.ext.mypy.plugin",
]
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[[tool.mypy.overrides]]
module = [
"aiofiles.*",
"aiohttp.*",
"alembic.*",
"apscheduler.*",
"bcrypt.*",
"cron_descriptor.*",
"cryptography.*",
"docker.*",
"sqlalchemy.*",
"sse_starlette.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_decorators = false
disallow_any_unimported = false
warn_return_any = false
[tool.djlint]
profile = "jinja"
indent = 4
max_line_length = 88
per_file_ignores = [
"src/borgitory/templates/partials/archives/directory_contents.html:J018",
"src/borgitory/templates/partials/auth/login_form_active.html:J018",
"src/borgitory/templates/partials/auth/register_form_active.html:J018",
"src/borgitory/templates/partials/repositories/modal/details_modal.html:J018",
"src/borgitory/templates/base.html:J004",
]
ignore="H021,J004,J018"
[tool.pyright]
include = ["src", "tests"]
extraPaths = ["src"]
pythonVersion = "3.14"
pythonPlatform = "All"
[dependency-groups]
dev = [
"httpx>=0.28.1",
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
]