-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
203 lines (166 loc) · 5.65 KB
/
Copy pathpyproject.toml
File metadata and controls
203 lines (166 loc) · 5.65 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
[project]
name = "chunklet-py"
version = "2.3.2"
description = "High-fidelity context-aware chunking and interactive visualization for RAG. Advanced segmentation for code and documents, because your LLM is only as smart as the fragments you feed it."
authors = [
{ name = "speedyk_005", email = "speedy40115719@gmail.com" }
]
license = "MIT"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Text Processing",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules"
]
keywords = [
"nlp", "chunking", "text-splitting", "sentence-splitting", "llm", "rag", "ai", "multilingual",
"text processing", "natural language processing", "data processing",
"information retrieval", "semantic search", "document processing", "document-chunker",
"code chunking", "code-chunker", "source code analysis", "programming languages",
"code structure", "chunk-visualization",
]
dependencies = [
"loguru>=0.7.3,<1.0",
"pysbd>=0.3.4,<1.0",
"sentsplit>=1.0.8,<2.0",
# Rust binding (1.0+) for faster performance on supported platforms, legacy for Android temporarily.
"sentencex<=0.6.1; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'armv7l')",
"sentencex>=1.0.0,<2.0; sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'armv7l')",
"indic-nlp-library>=0.92,<1.0",
"py3langid>=0.3.0,<1.0",
"mpire>=2.10.2,<3.0",
"more-itertools>=10.6.0,<12.0",
"regex>=2025.7.29",
"pydantic>=2.11.0,<3.0",
"typer>=0.19.0,<1.0",
"charset-normalizer>=3.4.2,<4.0",
# sentsplit depends on deprecated pkg_resources removed in setuptools 81.0.0
"setuptools<81",
]
[project.optional-dependencies]
structured-document = [
"pdfminer.six>=20250324",
"python-docx>=1.2.0,<2.0",
"mammoth>=1.9.1,<2.0",
"ebooklib>=0.19,<1.0",
"docutils>=0.21.2,<1.0",
"markdownify>=1.1.0,<2.0",
"striprtf>=0.0.29,<1.0",
# Lastest version of 2.x.x series
"pylatexenc==2.10",
"odfpy>=1.4.1,<2.0",
"openpyxl>=3.1.5,<4.0",
"tabulate2>=1.10.2,<2.0",
]
# Kept for compatibility
document = ["chunklet-py[structured-document]"]
code = [
"defusedxml>=0.7.1,<1.0",
"littletree>=0.8.7,<1.0",
]
visualization = [
"uvicorn>=0.35.0,<1.0",
"fastapi>=0.116.0,<1.0",
"python-multipart>=0.0.20,<1.0",
"msgpack>=1.1.0,<2.0",
# Major changes happens often
"aiofiles==25.1.0",
]
viz = ["chunklet-py[visualization]"]
all = ["chunklet-py[structured-document,code,visualization]"]
dev = [
"pytest>=8.3.5",
"pytest-cov>=6.2.1",
"pytest-mock>=3.14.1",
"pytest-timeout>=2.3.1",
"ruff>=0.14.14",
]
docs = [
"mike>=2.1.2",
"mkdocs-material>=9.6.20",
"mkdocs-api-autonav>=0.4.0",
"mkdocstrings-python>=1.17.0",
"pymdown-extensions>=10.16.1",
]
dev-all = ["chunklet-py[dev,docs,structured-document,code,visualization]"]
[project.urls]
Homepage = "https://github.com/speedyk-005/chunklet-py"
Repository = "https://github.com/speedyk-005/chunklet-py"
Documentation = "https://speedyk-005.github.io/chunklet-py/"
Issues = "https://github.com/speedyk-005/chunklet-py/issues"
Changelog = "https://github.com/speedyk-005/chunklet-py/blob/main/CHANGELOG.md"
[project.scripts]
chunklet = "chunklet.cli:app"
[build-system]
requires = [
"setuptools>=64",
"wheel", # Essential for building dependencies that use legacy setup.py (like odfpy)
]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = { "" = "src" }
packages = [
"chunklet",
"chunklet.common",
"chunklet.document_chunker",
"chunklet.document_chunker.converters",
"chunklet.document_chunker.processors",
"chunklet.code_chunker",
"chunklet.sentence_splitter",
"chunklet.visualizer",
]
include-package-data = true
[tool.setuptools.package-data]
chunklet = ["visualizer/static/**/*"]
[tool.pytest.ini_options]
minversion = "7.4"
filterwarnings = [
"ignore::DeprecationWarning:websockets.*",
"ignore::DeprecationWarning:pkg_resources.*",
]
# disable coverage report to prevent racing with multiprocessing
# addopts = "--cov=chunklet --cov-report=term-missing:skip-covered --durations=10"
addopts = "--doctest-modules --timeout=60"
testpaths = ["tests", "src/chunklet/common/dotdict.py"]
python_files = "test_*.py"
[tool.coverage.run]
omit = [
"src/chunklet/cli.py",
"src/chunklet/common/logging_utils.py",
"src/chunklet/base_chunker.py",
"src/chunklet/**/__init__.py",
]
[tool.ruff]
target-version = "py310"
line-length = 88
[tool.ruff.lint]
# E, W (Flake8), F (Pyflakes), I (Isort), B (Bugbear)
select = ["E", "F", "I", "W", "B"]
ignore = ["E501", "E203"]
[tool.ruff.lint.per-file-ignores]
# Ignore unused imports in all __init__.py files
"src/chunklet/**/__init__.py" = ["F401", "F403"]
# Disable all linting for the heavy regex file
"src/chunklet/code_chunker/patterns.py" = ["ALL"]
# Ignore warnings about typer.Option(...)
"src/chunklet/cli.py" = ["B008"]
# Ignore warnings about File(...)
"src/chunklet/visualizer/visualizer.py" = ["B008"]
# Ignore E402 - warnings.filterwarnings() must be called before imports to suppress pkg_resources
"src/chunklet/sentence_splitter/sentence_splitter.py" = ["E402"]
[tool.ruff.format]
# Replaces Black exclude logic
exclude = [
".git", ".venv", "build", "dist",
"src/chunklet/code_chunker/patterns.py"
]