|
[build-system] |
|
requires = ["hatchling"] |
|
build-backend = "hatchling.build" |
|
|
|
[tool.hatch.version] |
|
path = "src/pdf2u/__init__.py" |
|
|
|
|
|
[tool.hatch.build.targets.wheel] |
|
packages = ["src/pdf2u"] |
|
|
|
|
|
[project] |
|
name = "pdf2u" |
|
version = "0.0.4" |
|
description = "Yet Another Document Translator" |
|
classifiers = [ |
|
"License :: OSI Approved :: MIT License", |
|
"Programming Language :: Python", |
|
"Programming Language :: Python :: 3 :: Only", |
|
"Programming Language :: Python :: 3.10", |
|
"Programming Language :: Python :: 3.11", |
|
"Programming Language :: Python :: 3.11", |
|
"Programming Language :: Python :: 3.12", |
|
"Programming Language :: Python :: 3.13", |
|
] |
|
readme = "README.md" |
|
requires-python = ">=3.10,<3.13" |
|
license = { file = "LICENSE" } |
|
authors = [{ name = "A.J.Zeller", email = "[email protected]" }] |
|
maintainers = [{ name = "A.J.Zeller", email = "[email protected]" }] |
|
|
|
dependencies = [ |
|
"bitstring>=4.3.0", |
|
"configargparse>=1.7", |
|
"httpx[socks]>=0.27.0", |
|
"huggingface-hub>=0.27.0", |
|
"numpy>=2.0.2", |
|
"onnx>=1.17.0", |
|
"onnxruntime>=1.16.1", |
|
"openai>=1.59.3", |
|
"opencv-python>=4.10.0.84", |
|
"orjson>=3.10.14", |
|
"pdfminer-six>=20240706", |
|
"peewee>=3.17.8", |
|
"rich>=13.9.4", |
|
"toml>=0.10.2", |
|
"tqdm>=4.67.1", |
|
"xsdata[cli,lxml,soap]>=24.12", |
|
"msgpack>=1.1.0", |
|
"typer>=0.15.1", |
|
"pymupdf==1.24.5", |
|
] |
|
|
|
[project.urls] |
|
Homepage = "https://github.com/atticuszeller/pdf2u" |
|
Issues = "https://github.com/atticuszeller/pdf2u/issues" |
|
|
|
[project.scripts] |
|
pdf2u = "pdf2u.main:app" |
|
|
|
|
|
[project.optional-dependencies] |
|
gui = ["pypdf2>=3.0.1", "streamlit>=1.42.2", "streamlit-pdf-viewer>=0.0.21"] |
|
|
|
|
|
[dependency-groups] |
|
dev = [ |
|
"ruff>=0.6.3", |
|
"mypy>=1.11.2", |
|
"pre-commit>=3.8.0", |
|
"pytest>=8.3.2", |
|
"pytest-sugar>=1.0.0", |
|
"coverage>=7.6.1", |
|
"git-cliff>=2.6.1", |
|
"bump-my-version>=0.28.0", |
|
"typos>=1.26.8", |
|
"fonttools>=4.56.0", |
|
] |
|
|
|
|
|
[tool.mypy] |
|
strict = true |
|
exclude = ["venv", ".venv"] |
|
|
|
[tool.pytest.ini_options] |
|
|
|
|
|
addopts = "-rXs --strict-config --strict-markers --tb=long" |
|
xfail_strict = true |
|
filterwarnings = ["error"] |
|
pythonpath = "src/pdf2u/" |
|
|
|
[tool.coverage.run] |
|
branch = true |
|
|
|
[tool.coverage.report] |
|
skip_covered = true |
|
show_missing = true |
|
precision = 2 |
|
exclude_lines = [ |
|
'def __repr__', |
|
'pragma= no cover', |
|
'raise NotImplementedError', |
|
'if TYPE_CHECKING=', |
|
'if typing.TYPE_CHECKING=', |
|
'@overload', |
|
'@typing.overload', |
|
'\(Protocol\)=$', |
|
'typing.assert_never', |
|
'assert_never', |
|
'if __name__ == .__main__.=', |
|
] |
|
|
|
|
|
[tool.ruff] |
|
|
|
extend-exclude = [""] |
|
target-version = "py310" |
|
|
|
[tool.ruff.lint] |
|
select = [ |
|
"E", |
|
"W", |
|
"F", |
|
"I", |
|
"B", |
|
"C4", |
|
"UP", |
|
"ARG001", |
|
] |
|
|
|
isort = { combine-as-imports = true, split-on-trailing-comma = false } |
|
|
|
|
|
unfixable = ["B"] |
|
|
|
[tool.ruff.format] |
|
docstring-code-format = true |
|
skip-magic-trailing-comma = true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[tool.git-cliff.remote.github] |
|
owner = "atticuszeller" |
|
repo = "python-uv-package" |
|
|
|
[tool.git-cliff.changelog] |
|
|
|
header = """ |
|
# Changelog\n |
|
All notable changes to this project will be documented in this file.\n |
|
""" |
|
|
|
|
|
body = """ |
|
{% if version %}\ |
|
## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }} |
|
{% else %}\ |
|
## unreleased |
|
{% endif %}\ |
|
{% for group, commits in commits | group_by(attribute="group") %} |
|
### {{ group | striptags | trim | upper_first }} |
|
{% for commit in commits| unique(attribute="message") %} |
|
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ |
|
{% if commit.breaking %}[**breaking**] {% endif %}\ |
|
{{ commit.message | upper_first }}\ |
|
{% if commit.remote.pr_number %} in #{{ commit.remote.pr_number }}{%- endif %}\ |
|
{% endfor %} |
|
{% endfor %}\n |
|
""" |
|
|
|
footer = """ |
|
<!-- generated by git-cliff --> |
|
""" |
|
|
|
trim = true |
|
|
|
|
|
|
|
|
|
|
|
render_always = true |
|
|
|
output = "CHANGELOG.md" |
|
|
|
[tool.git-cliff.git] |
|
|
|
conventional_commits = true |
|
|
|
filter_unconventional = true |
|
|
|
split_commits = false |
|
|
|
commit_preprocessors = [ |
|
|
|
{ pattern = '.*', replace_command = 'typos --write-changes -' }, |
|
] |
|
|
|
commit_parsers = [ |
|
{ message = "^feat", group = "<!-- 0 -->π Features" }, |
|
{ message = "^fix", group = "<!-- 1 -->π Bug Fixes" }, |
|
{ message = "^doc", group = "<!-- 3 -->π Documentation" }, |
|
{ message = "^perf", group = "<!-- 4 -->β‘ Performance" }, |
|
{ message = "^refactor", group = "<!-- 2 -->π Refactor" }, |
|
{ message = "^style", group = "<!-- 5 -->π¨ Styling" }, |
|
{ message = "^test", group = "<!-- 6 -->π§ͺ Testing" }, |
|
{ message = "^chore\\(release\\)", skip = true }, |
|
{ message = "^chore\\(deps.*\\)", skip = true }, |
|
{ message = "^chore\\(pr\\)", skip = true }, |
|
{ message = "^chore\\(pull\\)", skip = true }, |
|
{ message = "^chore|^ci", group = "<!-- 7 -->βοΈ Miscellaneous Tasks" }, |
|
{ body = ".*security", group = "<!-- 8 -->π‘οΈ Security" }, |
|
{ message = "^revert", group = "<!-- 9 -->βοΈ Revert" }, |
|
] |
|
|
|
filter_commits = false |
|
|
|
topo_order = false |
|
|
|
sort_commits = "oldest" |
|
|
|
[tool.bumpversion] |
|
current_version = "0.0.4" |
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)" |
|
serialize = ["{major}.{minor}.{patch}"] |
|
search = "{current_version}" |
|
replace = "{new_version}" |
|
regex = false |
|
ignore_missing_version = false |
|
ignore_missing_files = false |
|
tag = true |
|
sign_tags = false |
|
tag_name = "v{new_version}" |
|
tag_message = "chore(release): {current_version} β {new_version}" |
|
allow_dirty = true |
|
commit = true |
|
message = "chore(release): {current_version} β {new_version}" |
|
commit_args = "" |
|
setup_hooks = [] |
|
pre_commit_hooks = [] |
|
post_commit_hooks = [] |
|
|
|
[[tool.bumpversion.files]] |
|
filename = "src/pdf2u/__init__.py" |
|
|
|
[[tool.bumpversion.files]] |
|
filename = "pyproject.toml" |
|
search = "version = \"{current_version}\"" |
|
replace = "version = \"{new_version}\"" |
|
|
|
[[tool.bumpversion.files]] |
|
filename = "CHANGELOG.md" |
|
search = "unreleased" |
|
replace = "{new_version} - {now:%Y-%m-%d}" |
|
|
|
|
|
|