-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (144 loc) · 3.98 KB
/
pyproject.toml
File metadata and controls
159 lines (144 loc) · 3.98 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
[project]
name = "markdown-lab"
version = "1.0.0"
description = "HTML to Markdown converter with support for multiple output formats"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"requests>=2.31.0",
"beautifulsoup4>=4.12.2",
"aiofiles>=24.1.0",
"psutil>=5.9.5;platform_system!='Linux'",
"typer>=0.9.0",
"rich>=13.0.0",
"textual>=3.0.0",
"click>=8.0.0",
"maturin>=1.9.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.4.0",
"black>=25.1.0",
"ruff>=0.11.13",
"mypy>=1.10.0",
"isort>=6.0.1",
"pylint>=3.3.7",
"pytest-benchmark>=4.0.0",
"sourcery>=1.37.0",
"types-requests>=2.32.0.20250301",
"types-PyYAML>=6.0.12",
"types-aiofiles>=24.1.0.20240524",
"types-psutil>=5.9.5.20240516",
]
test = ["pytest>=8.4.0", "pytest-benchmark>=4.0.0"]
js = ["playwright>=1.37.0"]
[project.scripts]
markdown-lab = "markdown_lab.__main__:main"
mlab = "markdown_lab.cli:cli_main"
mlab-tui = "markdown_lab.tui:main"
mlab-legacy = "markdown_lab.core.scraper:main"
[project.urls]
Homepage = "https://github.com/ursisterbtw/markdown-lab"
Documentation = "https://github.com/ursisterbtw/markdown-lab#readme"
Issues = "https://github.com/ursisterbtw/markdown-lab/issues"
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"benchmark: marks tests as benchmarks",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
addopts = "-v --strict-markers --tb=short"
[tool.pytest-benchmark]
min_rounds = 5
max_time = 1.0
save = true
save_data = true
group_by = "group"
sort = "name"
columns = [
"min",
"max",
"mean",
"stddev",
"median",
"iqr",
"outliers",
"rounds",
"iterations",
]
timer = "time.perf_counter"
disable_gc = true
warmup = true
skip = false
only = false
max_iterations = 100000
min_time = 0.000005
[tool.black]
line-length = 88
target-version = ["py312"]
[tool.isort]
profile = "black"
line_length = 88
[tool.ruff]
target-version = "py312"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "B", "C4", "SIM", "T20", "RET", "ERA", "PL"]
ignore = [
"E203", "E501",
"PLC0415", # allow imports outside top-level for conditional imports
"PLR0913", # allow many arguments for CLI functions
"PLW0603", # allow global statements for CLI state
"PLR2004", # allow magic values in tests and CLI
"PLR0911", # allow many return statements in complex functions
"PLR0912", # allow many branches in complex functions
"PLR0915", # allow many statements in complex functions
"SIM102", # allow nested if statements for clarity
"SIM117", # allow nested with statements for clarity
"SIM118", # allow .keys() for explicit dictionary key iteration
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = [
"F401", # allow unused imports in tests
"ERA001", # allow commented-out code in tests
"SIM105", # allow try-except-pass patterns in tests
"B017", # allow general exception assertions in tests
]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
strict_optional = true
# reduce noise from optional UI/CLI modules and runtime-bound integrations
[[tool.mypy.overrides]]
module = [
"markdown_lab.cli",
"markdown_lab.tui",
"markdown_lab.core.async_cache",
"markdown_lab.core.scraper",
"markdown_lab.core.cleanup",
"markdown_lab.utils.thread_pool",
"markdown_lab.utils.version",
]
ignore_errors = true
[build-system]
requires = ["wheel", "setuptools", "maturin>=1.6,<2.0"]
build-backend = "maturin"
[dependency-groups]
dev = [
"maturin>=1.9.0",
"mypy>=1.16.0",
"pytest>=8.4.0",
"pytest-benchmark>=5.1.0",
"pytest-cov>=6.2.1",
"ruff>=0.11.13",
]
[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "markdown_lab.markdown_lab_rs" # adjust if your Rust module name is different in lib.rs