-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (119 loc) · 3.72 KB
/
pyproject.toml
File metadata and controls
137 lines (119 loc) · 3.72 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
[project]
name = "inscriptis"
version = "2.7.1"
description = "inscriptis - HTML to text converter."
license = "Apache-2.0"
readme = "README.rst"
requires-python = ">=3.10,<3.15"
authors = [
{ name = "Albert Weichselbraun", email = "albert.weichselbraun@fhgr.ch" },
{ name = "Fabian Odoni", email = "fabian.odoni@fhgr.ch" }
]
keywords = ["HTML", "converter", "text"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Text Processing",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"requests>=2.32.3,<3.0.0",
"lxml>=5.4.0,<6.1.0",
]
[project.urls]
Homepage = "https://github.com/weblyzard/inscriptis"
Repository = "https://github.com/weblyzard/inscriptis"
Documentation = "https://inscriptis.readthedocs.io/en/latest/"
[project.scripts]
inscript = "inscriptis.cli.inscript:cli"
inscriptis-api = "inscriptis.service.web:start"
[project.optional-dependencies]
web-service = [
"fastapi>=0.115.11,<1.0.0",
"uvicorn>=0.34.0,<1.0.0"
]
[dependency-groups]
dev = [
"pytest>=9.0.1",
"fastapi>=0.115.11,<1.0.0",
"ruff>=0.14.5",
"httpx>=0.28.1",
"uvicorn>=0.38.0",
"ty>=0.0.1a26",
"pytest-cov>=7.0.0",
"safety>=3.7.0",
"tox>=4.23.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
sources = ["src"]
# code formatting with ruff
[tool.ruff]
line-length = 120
target-version = "py311" # adjust as needed
extend-exclude = ["*.html", "*.json", "*.txt", "/a", "/b", "docs/conf.py"]
src = ["src", "tests", "benchmarking", "examples"]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"COM", # flake8-commas - trailing commas
"BLE", # flake8-blind-except - avoid bare except
"D", # flake8-docstrings
"C4", # flake8-comprehensions
"E", # pycodestyle
"EM", # flake8-errmsg
"F", # Pyflakes
"FA", # flake8-future-annotations - use modern annotations
"ICN", # flake8-import-conventions - standard import aliases
"PIE", # flake8-pie
"PLE", # pylint equivalents
"PLW", # pylint equivalents
"PTH", # flake8-use-pathlib - prefer pathlib over os.path
"PYI", # flake8-pyi
"Q", # flake8-quotes
"N", # flake8-naming
"SIM", # flake8-simplify
"I", # isort
"RET", # flake8-return
"RSE", "SLOT", "TID", "TC", "C90", "PERF", "E", "W",
"FURB", "RUF", "TRY", "YTT",
"TCH", # flake8-type-checking - optimize type checking imports
"S", # flake8-bandit (security) — replaces dlint/bandit
"UP", # pyupgrade
]
ignore = [
"D102", # missing docstring in public method
"D105", # missing docstring in magic method
"D107", # missing docstring in __init__
"D203", # incorrect-blank-line-before-class
"D213", # multi-line-summary-second-line
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # allow asserts
"D", # no dockstring checks
"S310", # allow URLs
"PTH", # prefer pathlib
]
"benchmarking/*.py" = [
"S310", # allow URLs
"S603", # call: check for execution of untrusted input
"PTH", # prefer pathlib
]
[tool.ty.src]
root="./src"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=inscriptis --cov-report=term-missing"