forked from Flexget/Flexget
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (197 loc) · 5.75 KB
/
pyproject.toml
File metadata and controls
213 lines (197 loc) · 5.75 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
## Build settings
[project]
name = "flexget"
description = """\
FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from \
different sources like RSS-feeds, html-pages, various sites and more.\
"""
readme = "README.rst"
requires-python = ">=3.9"
authors = [
{ name = "Marko Koivusalo", email = "marko.koivusalo@gmail.com" },
{ name = "Chase Sterling", email = "chase.sterling@gmail.com" },
]
license = { file = "LICENSE" }
dynamic = ["version", "optional-dependencies"]
dependencies = [
"apscheduler ~=3.11",
"beautifulsoup4 ~=4.12",
"feedparser ~=6.0",
"guessit ~=3.8",
"html5lib ~=1.1",
"importlib-metadata ~=8.5; python_version <'3.10'", # TODO: remove this after we drop python3.9
"jinja2 ~=3.1",
"jsonschema ~=4.23",
"loguru ~=0.7.3",
"packaging ~=24.2",
"pendulum ~=3.0",
"psutil ~=7.0",
"pynzb ~=0.1.0",
"pyrss2gen ~=1.1",
"python-dateutil ~=2.9",
"pyyaml ~=6.0",
"rebulk ~=3.2",
"requests ~=2.32",
"rich ~=13.9",
"rpyc ~=6.0",
"sqlalchemy ~=2.0",
# TODO: urllib3 >=2 has changes that require vcr cassettes to be upgraded. Requirements of some of our deps (boto?)
# require urllib3 <2 on python < 3.10. In order to not be running different versions of urllib on different
# versions of python, this is pinned in our deps. This can be removed completely if the issue gets solved.
# https://github.com/kevin1024/vcrpy/issues/719
"urllib3 ~=1.26",
# WebUI/API Deps
"cherrypy ~=18.10",
"flask-compress ~=1.17",
"flask-cors ~=5.0",
"flask-login ~=0.6.3",
"flask-restx ~=1.3",
"flask ~=3.1",
"pyparsing ~=3.2",
"werkzeug ~=3.1",
"zxcvbn ~=4.4",
]
[dependency-groups]
dev = [
"pre-commit ~=4.0",
"pytest ~=8.3",
"pytest-xdist ~=3.6",
"ruff ~=0.9.0",
"vcrpy ~=7.0",
]
plugin-test = [
# These are optional dependencies for plugins that have tests in the test suite
# Tests that need these must add the `require_optional_deps` pytest mark
"boto3 ~=1.35",
"pillow~=11.0",
"plexapi ~=4.16",
"pysftp ~=0.2.9",
'rarfile~=4.0',
"subliminal ~= 2.1",
{ include-group = "all" }
]
deluge = ['deluge-client~=1.10']
qbittorrent = ['qbittorrent-api~=2025.2']
telegram = ['python-telegram-bot[http2,socks]~=21.9']
transmission = ['transmission-rpc~=7.0']
# This is all our optional deps installable via extras. Not actually 'all'
all = [
{ include-group = "deluge" },
{ include-group = "qbittorrent" },
{ include-group = "telegram" },
{ include-group = "transmission" }
]
[project.urls]
"Homepage" = "https://flexget.com"
"Issue Tracker" = "https://github.com/Flexget/Flexget/issues"
"Repository" = "https://github.com/Flexget/Flexget"
"Forum" = "https://github.com/Flexget/Flexget/discussions"
[project.scripts]
flexget = "flexget:main"
[project.gui-scripts]
flexget-headless = "flexget:main" # This is useful on Windows to avoid a cmd popup
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.custom]
# Extras with locked dependencies will be generated if BUILD_LOCKED env variable is specified
path = "scripts/build_locked_extras.py"
locked-groups = ["deluge", "qbittorrent", "telegram", "transmission", "all"]
[tool.hatch.version]
path = "flexget/_version.py"
[tool.hatch.build]
skip-excluded-dirs = true
[tool.hatch.build.targets.sdist]
include = [
"/flexget",
"/scripts/build_locked_extras.py",
"/scripts/bundle_webui.py"
]
[tool.hatch.build.targets.wheel.hooks.custom]
# The webui will be bundled when the BUNDLE_WEBUI env variable is defined
path = "scripts/bundle_webui.py"
[tool.hatch.build.targets.wheel]
include = [
"/flexget"
]
## Other tool settings
[tool.pytest.ini_options]
addopts = '-p no:legacypath --strict-markers'
markers = [
'filecopy(src, dst): mark test to copy a file from `src` to `dst` before running',
'online: mark test that goes online. VCR will automatically be used.',
'require_optional_deps: mark test as requiring additional dependencies'
]
testpaths = ["tests"]
[tool.ruff]
line-length = 99
extend-exclude = ["flexget/ui"]
[tool.ruff.lint]
select = [
"ASYNC",
"B",
"C4",
"D",
"E",
"EXE",
"F",
"FLY",
"FURB",
"G",
"I",
"ICN",
"ISC",
"LOG",
"N",
"PERF",
"PGH",
"PIE",
"PL",
"PT",
"PYI",
"RET",
"RSE",
"RUF",
"SIM",
"SLOT",
"T10",
"TC",
"TD",
"TID",
"TRY",
"UP",
"W",
"YTT",
]
ignore = [
"B904", # TODO: enable this rule (requires a lot of manual work)
"D1", # Missing docstring
"D203", # incorrect-blank-line-before-class
"D213", # multi-line-summary-second-line
"E501", # TODO: enable this rule (requires a lot of manual work)
"N817", # camelcase-imported-as-acronym
"N818", # error-suffix-on-exception-name
"PERF203", # TODO: remove this after Python 3.10 is dropped
"PLE1205", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/13390
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR1704", # redefined-argument-from-local
"PLR2004", # magic-value-comparison
"PLW0603", # global-statement
"PLW0642", # self-or-cls-assignment
"PLW2901", # redefined-loop-name
"PTH119", # TODO
"RUF012", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/5243
"TD002", # missing-todo-author
"TD003", # missing-todo-link
"TRY003", # raise-vanilla-args
"TRY400", # error-instead-of-exception
]
[tool.ruff.lint.flake8-type-checking]
quote-annotations = true
[tool.ruff.lint.isort]
known-first-party = ['flexget']
[tool.ruff.format]
quote-style = "single"