-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
161 lines (150 loc) · 5.98 KB
/
pyproject.toml
File metadata and controls
161 lines (150 loc) · 5.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
160
161
[project]
name = "pdfrest"
version = "1.0.3"
description = "Python client library for interacting with the pdfRest API"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "Datalogics"},
]
maintainers = [
{name = "Datalogics"},
]
keywords = [
"api",
"document-processing",
"pdf",
"pdfrest",
"sdk",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10"
dependencies = [
"exceptiongroup>=1.3.0",
"httpx>=0.28.1",
"langcodes>=3.4.0",
"pydantic>=2.12.0",
]
[project.urls]
Homepage = "https://pdfrest.com/"
Documentation = "https://python.pdfrest.com/"
Source = "https://github.com/pdfrest/pdfrest-python"
[build-system]
requires = ["uv_build>=0.8.22,<0.10.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"pre-commit>=3.7.0",
"ruff>=0.6.9",
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"pip-audit>=2.7.3",
"pytest-md>=0.2.0",
"pytest-emoji>=0.2.0",
"pytest-dotenv>=0.5.2",
"pytest-asyncio>=1.2.0",
"pytest-rerunfailures>=16.0.1",
"pytest-xdist>=3.8.0",
"nox>=2025.5.1",
"basedpyright>=1.34.0",
"python-dotenv>=1.0.1",
"diff-cover>=10.2.0",
"rich>=14.1.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.7.1",
"mkdocstrings[python]>=1.0.3",
]
[tool.pytest.ini_options]
minversion = "7.4"
testpaths = ["tests"]
addopts = "-ra"
markers = [
"live: tests that call the live pdfRest service",
]
[tool.ruff]
extend-include = ["*.ipynb"]
target-version = "py310"
[tool.ruff.lint]
# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
# Rules cribbed from the PDM sources themselves.
extend-select = [
# If you're doing a project of any substantial size, or anything that runs on a server,
# use logging instead of printing. To check this, uncomment the next line.
# "T20", # print https://docs.astral.sh/ruff/rules/#flake8-print-t20 don't print, use logging
"I", # isort https://beta.ruff.rs/docs/rules/#isort-i
"B", # flake8-bugbear https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
"C4", # flake8-comprehensions https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
"PGH", # pygrep-hooks https://beta.ruff.rs/docs/rules/#pygrep-hooks-pgh
"RUF", # ruff https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf
"W", # pycodestyle https://beta.ruff.rs/docs/rules/#warning-w
"YTT", # flake8-2020 https://beta.ruff.rs/docs/rules/#flake8-2020-ytt
"UP", # pyupgrade https://beta.ruff.rs/docs/rules/#pyupgrade-up
"N", # naming https://beta.ruff.rs/docs/rules/#pep8-naming-n
"PT", # pytest https://beta.ruff.rs/docs/rules/#flake8-pytest-style-pt
# https://dev.to/aws-builders/deploy-to-aws-with-github-actions-and-aws-cdk-4m1e suggests
# complexity checks with radon/xenon, but McCabe complexity is available in ruff and
# the cost/benefit of using radon/xenon can be discussed later.
"C90", # mccabe https://beta.ruff.rs/docs/rules/#mccabe-c90
"FURB", # refurb https://beta.ruff.rs/docs/rules/#refurb-furb
"S", # bandit https://docs.astral.sh/ruff/rules/#flake8-bandit-s ...secure code
"BLE", # blind-except https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
"EM", # errmsg https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
"G", # logging-format https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
"RET", # return https://docs.astral.sh/ruff/rules/#flake8-return-ret
"DTZ", # datetimez https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"SIM", # simplify https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"ARG", # unused arguments https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
"PTH", # use pathlib https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"RSE", # raise https://docs.astral.sh/ruff/rules/#flake8-raise-rse
"TRY", # tryceratops https://docs.astral.sh/ruff/rules/#tryceratops-try exception antipatterns
"COM818", # prohibit trailing bare commas making tuples, see https://docs.astral.sh/ruff/rules/trailing-comma-on-bare-tuple/
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
"D417", # undocumented-param https://docs.astral.sh/ruff/rules/undocumented-param/
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
ignore = []
unfixable = []
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["pdfrest"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
# From https://github.com/astral-sh/ruff/issues/4368#issue-1705468153
# at least this three should be fine in tests:
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
"scripts/**/*.py" = [
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
"examples/**/*.py" = [
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
"noxfile.py" = [
"D", # pydocstyle https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
[tool.ruff.lint.pydocstyle]
convention = "google" # https://docs.astral.sh/ruff/settings/#lint_pydocstyle_convention
[tool.tomlsort]
sort_first = ["project", "build-system"]
spaces_before_inline_comment = 2
spaces_indent_inline_array = 4
trailing_comma_inline_array = true
[tool.uv]
keyring-provider = "subprocess"
no-binary-package = ["pdfrest"]