-
-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathpyproject.toml
More file actions
231 lines (210 loc) · 5.46 KB
/
pyproject.toml
File metadata and controls
231 lines (210 loc) · 5.46 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
[project]
readme = "README.md"
name = "ai-marketplace-monitor"
version = "0.10.2"
description = "An AI-based tool for monitoring facebook marketplace"
authors = [{ name = "Bo Peng", email = "ben.bob@gmail.com" }]
requires-python = ">=3.10"
keywords = ["ai-marketplace-monitor"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"typer>=0.15.1,<0.26.0",
"playwright>=1.41.0",
"rich>=13.7.0",
"pushbullet.py>=0.12.0",
"diskcache>=5.6.3",
"watchdog>=4.0.0",
"openai>=1.24.0",
"anthropic>=0.39.0",
"parsedatetime>=2.5",
"humanize>=4.0.0",
"schedule>=1.2.2",
"inflect>=7.0.0",
"pillow>=10.0.0",
"jinja2>=3.0.0",
"pyparsing>=3.1.0",
"requests>=2.30.0",
"CurrencyConverter>=0.18.0",
"tomli==2.2.1; python_version < '3.11'",
"safety>=3.5.2",
"pip-audit>=2.9.0",
"python-telegram-bot>=22.3",
"fastapi>=0.110",
"uvicorn[standard]>=0.27",
"itsdangerous>=2.1",
"bcrypt>=4.0",
"python-multipart>=0.0.9",
]
[project.urls]
Homepage = "https://github.com/BoPeng/ai-marketplace-monitor"
Repository = "https://github.com/BoPeng/ai-marketplace-monitor"
Documentation = "https://ai-marketplace-monitor.readthedocs.io"
"Bug Tracker" = "https://github.com/BoPeng/ai-marketplace-monitor/issues"
[project.scripts]
ai-marketplace-monitor = "ai_marketplace_monitor.cli:app"
aimm = "ai_marketplace_monitor.cli:app"
[project.optional-dependencies]
pynput = ["pynput>=1.7.0"]
dev = [
"pre-commit>=4.0.1",
"invoke>=2.2.0",
"bump2version>=1.0.1",
"watchdog[watchmedo]>=6.0.0",
"pip-audit>=2.9.0",
"build>=1.0.0",
"twine>=5.0.0",
]
test = [
"pytest>=8.3.3",
"xdoctest>=1.2.0",
"coverage[toml]>=7.6.7",
"pytest-cov>=6.0.0",
"pytest-playwright>=0.7.0",
]
linters = ["isort>=5.13.2,<7.0.0", "black>=24.10,<27.0", "ruff>=0.9.2,<0.16.0"]
security = ["safety>=3.2.11"]
typing = ["mypy>=1.13.0"]
docs = [
"sphinx>=8.1.3",
"furo>=2024.1.29",
"myst-parser>=3.0.0",
"sphinx-copybutton>=0.5.2",
"sphinxext-opengraph>=0.9.0",
"linkify-it-py>=2.0.0",
]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
source = ["ai_marketplace_monitor"]
[tool.coverage.report]
fail_under = 100
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug",
"if settings.DEBUG:",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == __main__:",
]
show_missing = true
[tool.coverage.html]
directory = "htmlcov"
[tool.pytest.ini_options]
asyncio_mode = "auto"
filterwarnings = [
# Suppress AsyncMock coroutine warnings in Telegram notification tests
# These warnings occur when testing sync methods that wrap async operations with asyncio.run()
# The coroutines are properly handled by asyncio.run() but pytest's garbage collection
# triggers warnings for the mock coroutines that were never directly awaited
"ignore::RuntimeWarning:_pytest.unraisableexception",
"ignore:coroutine.*was never awaited:RuntimeWarning",
]
[tool.ruff]
target-version = "py39"
output-format = "full"
line-length = 99
fix = true
extend-exclude = ["docs/*"]
[tool.ruff.lint]
ignore = [
"ANN202", # **kwargs: Any
"ANN401",
"ANN002",
"ANN003",
"E722",
"G004",
"S311",
"B017",
"S105", # hardcoded passwords (false positives in test data)
"S106",
"G003",
"S101", # use of assert
"BLE001", # blank exception
"C901", # too complex (function name too long etc)
"D100", # docstring
"D101", # docstring
"D102", # docstring
"D103", # docstring
"D107", # docstring
"D415", # docstring
"ERA001", # commented code
"S108", # use of /tmp
"S603", # subprocess.run security
"S607", # subprocess.run with relative path
"E501", # line too long
"S112", # logging try/except/continue
]
select = [
"E",
"F",
"W", # flake8
"C", # mccabe
"I", # isort
"N", # pep8-naming
"D", # flake8-docstrings
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"G", # flake8-logging-format
"ERA", # eradicate
"ISC", # flake8-implicit-str-concat
"RUF", # Ruff-specific rules
]
unfixable = [
"ERA", # Don't remove commented-out code
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = ["ai_marketplace_monitor"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 99
known_third_party = ["invoke", "nox"]
[tool.black]
line-length = 99
target-version = ["py39"]
[tool.mypy]
warn_return_any = false
warn_unused_configs = true
[[tool.mypy.overrides]]
module = ["pytest.*", "invoke.*", "nox.*"]
allow_redefinition = false
check_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
implicit_reexport = true
local_partial_types = true
strict_optional = true
strict_equality = true
no_implicit_optional = true
warn_unused_ignores = true
warn_unreachable = true
warn_no_return = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = ["pytest-asyncio>=1.1.0"]
test = ["pytest-asyncio>=1.1.0"]