-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (109 loc) · 3.63 KB
/
pyproject.toml
File metadata and controls
122 lines (109 loc) · 3.63 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "telegram-archive"
version = "7.6.4"
description = "Automated Telegram backup with Docker. Performs incremental backups of messages and media on a configurable schedule."
readme = "README.md"
requires-python = ">=3.14"
license = {text = "GPL-3.0-or-later"}
authors = [
{name = "Sergio Fernández", email = "sergio@geiser.cloud"}
]
keywords = ["telegram", "backup", "archive", "docker", "telethon"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Communications :: Chat",
"Topic :: System :: Archiving :: Backup",
]
dependencies = [
"telethon>=1.37.0",
"python-socks[asyncio]>=2.7.1",
"APScheduler>=3.10.4",
"python-dotenv>=1.0.1",
"cryptg>=0.4.0",
"fastapi>=0.135.3",
"uvicorn>=0.32.0",
"jinja2>=3.1.4",
"httpx>=0.28.1",
"websockets>=16.0",
"sqlalchemy[asyncio]>=2.0.36",
"aiosqlite>=0.20.0",
"asyncpg>=0.31.0",
"psycopg2-binary>=2.9.9",
"alembic>=1.14.0",
"greenlet>=3.4.0",
"beautifulsoup4>=4.12.0",
]
[project.optional-dependencies]
viewer = [
"Pillow>=10.4.0", # v7.2.0: thumbnail generation
]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.26.0",
"pytest-cov>=7.1.0",
"ruff>=0.15.10",
"pre-commit>=4.5.1",
]
[project.urls]
Homepage = "https://github.com/GeiserX/Telegram-Archive"
Repository = "https://github.com/GeiserX/Telegram-Archive"
Issues = "https://github.com/GeiserX/Telegram-Archive/issues"
Changelog = "https://github.com/GeiserX/Telegram-Archive/blob/master/docs/CHANGELOG.md"
[project.scripts]
telegram-archive = "src.__main__:main"
[tool.setuptools]
packages = ["src"]
[tool.setuptools.package-data]
src = ["web/templates/**/*", "web/static/**/*"]
[tool.ruff]
target-version = "py314"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"E711", # none-comparison (SQLAlchemy uses == None idiom)
"E721", # type-comparison (existing pattern)
"E722", # bare-except (TODO: fix incrementally, widespread in codebase)
"B008", # do not perform function calls in argument defaults (FastAPI depends on this)
"B904", # raise-without-from-inside-except (TODO: fix incrementally)
"SIM102", # collapsible-if (readability preference, existing code)
"SIM103", # needless-bool (existing code patterns)
"SIM105", # suppressible-exception (existing code patterns)
"SIM108", # use ternary operator (readability preference)
"UP042", # replace-str-enum (keep existing pattern for consistency)
]
[tool.ruff.lint.per-file-ignores]
# Scripts and migrations have less strict requirements
"scripts/*" = ["F841", "B007"]
# Argparse subparsers are assigned for side effects
"src/__main__.py" = ["F841"]
# Core backup has intentional variable assignments and zip patterns
"src/telegram_backup.py" = ["F841", "B905"]
# Test mocks are assigned for patching side effects
"tests/*" = ["F841"]
# Alembic migrations use dialect variable for inspection
"alembic/*" = ["F841"]
[tool.ruff.lint.isort]
known-first-party = ["src"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]