File size: 2,911 Bytes
41788c4
 
 
 
fbf0154
 
41788c4
 
fbf0154
 
 
 
 
41788c4
fbf0154
 
 
80eaaf7
 
 
 
 
 
41788c4
 
80eaaf7
41788c4
 
 
 
 
 
 
80eaaf7
 
41788c4
80eaaf7
 
 
 
fbf0154
41788c4
80eaaf7
fbf0154
41788c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[build-system]
requires = ["poetry-core>=1.6.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "docsifer"
version = "1.1.0"
description = "Convert PDF, PPT, Word, Excel, images, audio, HTML, JSON, CSV, XML, ZIP and more to Markdown — with optional LLM enhancement."
authors = ["Hieu Lam <lamhieu.vk@gmail.com>"]
readme = "README.md"
homepage = "https://github.com/lh0x00/docsifer"
repository = "https://github.com/lh0x00/docsifer"
license = "MIT"
packages = [{ include = "docsifer" }]

[tool.poetry.dependencies]
python = "^3.10"
# Runtime stack aligned with ``lightweight-embeddings`` for clean Gradio /
# FastAPI / Starlette / Pydantic / Jinja2 interop on Hugging Face Spaces.
fastapi = ">=0.115,<0.120"
uvicorn = { version = ">=0.30,<0.40", extras = ["standard"] }
pydantic = ">=2.7,<3.0"
pydantic-settings = ">=2.4,<3.0"
orjson = ">=3.10,<4.0"
python-multipart = ">=0.0.9"
httpx = { version = ">=0.27,<0.30", extras = ["http2"] }
openai = ">=1.40,<2.0"
tiktoken = ">=0.7,<1.0"
markitdown = "0.0.1a3"
selectolax = ">=0.3.21"
python-magic = "0.4.27"
upstash-redis = ">=1.2,<2.0"
cachetools = ">=5.3,<6.0"
psutil = ">=5.9,<8.0"
Pillow = ">=10.3,<12.0"
requests = ">=2.31,<3.0"
# Gradio 5.x is required for compatibility with modern Starlette templating;
# Gradio 4.x calls ``TemplateResponse`` with a deprecated signature.
gradio = { version = ">=5.0,<6.0", optional = true }
pandas = { version = ">=2.0,<3.0", optional = true }

[tool.poetry.extras]
ui = ["gradio", "pandas"]

[tool.poetry.group.dev.dependencies]
pytest = ">=8.0,<9.0"
pytest-asyncio = ">=0.23,<1.0"
ruff = ">=0.6,<1.0"
mypy = ">=1.10,<2.0"
types-requests = "*"
fakeredis = ">=2.23,<3.0"

# ---------------------------------------------------------------------------
# Tooling
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = ["poetry.lock"]

[tool.ruff.lint]
select = [
  "E", "F", "W",  # pycodestyle / pyflakes
  "I",            # isort
  "B",            # flake8-bugbear
  "UP",           # pyupgrade
  "SIM",          # simplify
  "RET",          # flake8-return
  "C4",           # comprehensions
  "ASYNC",        # async best practices
]
ignore = [
  "E501",  # line length handled by formatter
  "B008",  # FastAPI Depends() in defaults is idiomatic
]

[tool.ruff.lint.per-file-ignores]
"tests/**" = ["B011", "S101"]

[tool.ruff.format]
quote-style = "double"

[tool.mypy]
python_version = "3.10"
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = false
ignore_missing_imports = true
files = ["docsifer"]

[[tool.mypy.overrides]]
module = ["docsifer.core.*", "docsifer.analytics.*", "docsifer.safety.*"]
disallow_untyped_defs = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
filterwarnings = [
  "ignore::DeprecationWarning",
]