-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
330 lines (309 loc) · 9.43 KB
/
pyproject.toml
File metadata and controls
330 lines (309 loc) · 9.43 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "iterabledata"
description = "Iterable data processing Python library"
dynamic = ["version", "readme"]
requires-python = ">=3.10"
authors = [{name = "Ivan Begtin"}]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development",
"Topic :: Text Processing",
]
keywords = ["json", "jsonl", "csv", "bson", "parquet", "orc", "xml", "xls", "xlsx", "dbf", "dataset", "etl", "data-pipelines"]
dependencies = [
"chardet>=5.0.0",
"tqdm>=4.64.0",
]
[project.optional-dependencies]
# Format / feature extras (kept optional to minimize base install footprint).
compression = [
"lz4>=4.0.0",
"python-snappy>=0.6.0",
"python-lzo>=1.12.0",
"brotli>=1.0.0",
"brotli_file>=1.0.0",
"zstandard>=0.19.0",
]
parquet = ["pyarrow>=10.0.0"]
orc = ["pyorc>=1.6.0"]
excel = ["xlrd>=2.0.0", "openpyxl>=3.0.0"]
xml = ["lxml>=4.9.0"]
bson = ["pymongo>=4.0.0"]
dbf = ["dbfread>=2.0.0"]
warc = ["warcio>=1.7.0"]
duckdb = ["duckdb>=0.9.0"]
stats = ["pyreadstat>=1.2.0"]
protobuf = ["protobuf>=4.0.0"]
ion = ["ion-python>=1.0.0"]
hdf5 = ["h5py>=3.0.0"]
geospatial = ["geojson>=3.0.0", "pyshp>=2.3.0", "fiona>=1.9.0", "mapbox-vector-tile>=1.2.0", "topojson>=1.5.0"]
toml = ["tomli>=2.0.0", "tomli-w>=1.0.0", "toml>=0.10.0"]
msgpack = ["msgpack>=1.0.0"]
yaml = ["pyyaml>=6.0.0"]
pcap = ["dpkt>=1.9.0"]
netcdf = ["netCDF4>=1.6.0"]
mvt = ["mapbox-vector-tile>=1.2.0"]
topojson = ["topojson>=1.5.0"]
feed = ["feedparser>=6.0.0"]
dxf = ["ezdxf>=1.0.0"]
html = ["beautifulsoup4>=4.11.0"]
arff = ["liac-arff>=2.5.0"]
json = ["ijson>=3.2.0"]
vortex = ["vortex-data>=0.56.0"]
pydantic = ["pydantic>=2.0.0"]
dataframes = ["pandas>=1.5.0", "polars>=0.19.0", "dask[dataframe]>=2023.1.0"]
cloud = ["fsspec>=2023.1.0", "s3fs>=2023.1.0", "gcsfs>=2023.1.0", "adlfs>=2023.1.0"]
# AI-powered documentation
ai = ["openai>=1.0.0", "requests>=2.28.0"]
# Database engines (read-only support)
db = [
"psycopg2-binary>=2.9.0", # PostgreSQL
"pymongo>=4.0.0", # MongoDB
"elasticsearch>=8.0.0", # Elasticsearch/OpenSearch
"pymysql>=1.0.0", # MySQL/MariaDB
"pyodbc>=4.0.0", # Microsoft SQL Server
"clickhouse-connect>=0.6.0", # ClickHouse
]
# SQL databases only
db-sql = [
"psycopg2-binary>=2.9.0", # PostgreSQL
"pymysql>=1.0.0", # MySQL/MariaDB
"pyodbc>=4.0.0", # Microsoft SQL Server
"clickhouse-connect>=0.6.0", # ClickHouse
]
# NoSQL databases only
db-nosql = [
"pymongo>=4.0.0", # MongoDB
"elasticsearch>=8.0.0", # Elasticsearch/OpenSearch
]
# Database ingestion (write support - existing)
db-ingest = [
"psycopg[binary]>=3.0.0", # PostgreSQL (psycopg3 for ingestion)
"pymongo>=4.0.0", # MongoDB
"mysql-connector-python>=8.0.0", # MySQL
"elasticsearch>=8.0.0", # Elasticsearch
"duckdb>=0.9.0", # DuckDB (also in duckdb extra)
]
# Convenience group
all = [
"lz4>=4.0.0",
"python-snappy>=0.6.0",
"python-lzo>=1.12.0",
"brotli>=1.0.0",
"brotli_file>=1.0.0",
"zstandard>=0.19.0",
"pyarrow>=10.0.0",
"pyorc>=1.6.0",
"xlrd>=2.0.0",
"openpyxl>=3.0.0",
"lxml>=4.9.0",
"pymongo>=4.0.0",
"dbfread>=2.0.0",
"warcio>=1.7.0",
"duckdb>=0.9.0",
"pyreadstat>=1.2.0",
"protobuf>=4.0.0",
"ion-python>=1.0.0",
"h5py>=3.0.0",
"geojson>=3.0.0",
"pyshp>=2.3.0",
"fiona>=1.9.0",
"tomli>=2.0.0",
"tomli-w>=1.0.0",
"toml>=0.10.0",
"msgpack>=1.0.0",
"pyyaml>=6.0.0",
"dpkt>=1.9.0",
"netCDF4>=1.6.0",
"mapbox-vector-tile>=1.2.0",
"topojson>=1.5.0",
"feedparser>=6.0.0",
"ezdxf>=1.0.0",
"beautifulsoup4>=4.11.0",
"liac-arff>=2.5.0",
"ijson>=3.2.0",
"vortex-data>=0.56.0",
"pydantic>=2.0.0",
"pandas>=1.5.0",
"polars>=0.19.0",
"dask[dataframe]>=2023.1.0",
"fsspec>=2023.1.0",
"s3fs>=2023.1.0",
"gcsfs>=2023.1.0",
"adlfs>=2023.1.0",
# AI and database extras
"openai>=1.0.0",
"requests>=2.28.0",
# Database engines (read-only)
"psycopg2-binary>=2.9.0",
"pymongo>=4.0.0",
"elasticsearch>=8.0.0",
"pymysql>=1.0.0",
"pyodbc>=4.0.0",
"clickhouse-connect>=0.6.0",
# Database ingestion (write support)
"psycopg[binary]>=3.0.0",
"mysql-connector-python>=8.0.0",
]
dev = [
"pytest>=7.0.0",
"pytest-benchmark>=4.0.0",
"pytest-cov>=4.1.0",
"memory-profiler>=0.61.0",
"psutil>=5.9.0",
"pytest-xdist>=3.3.0",
"pytest-timeout>=2.2.0",
"mock>=4.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
# Type stubs for optional dependencies
"types-chardet>=5.0.0",
"types-openpyxl>=3.0.0",
"types-pyyaml>=6.0.0",
"types-requests>=2.31.0",
"types-python-dateutil>=2.8.0",
"types-setuptools>=68.0.0",
# Note: pandas-stubs and pyarrow-stubs are available but not included
# as they are large and pandas/pyarrow are already in dev dependencies
# for testing. Add them if needed for stricter type checking.
"hypothesis>=6.0.0",
"pandas>=1.5.0", # Often used in tests or examples (pandas has built-in type stubs)
# Security tools
"bandit[toml]>=1.7.5",
"pip-audit>=2.6.1",
"safety>=2.3.0",
# Code quality
"vulture>=2.10",
"radon>=6.0.0",
"pydocstyle[toml]>=6.3.0",
# Coverage
"coverage[toml]>=7.3.0",
# Dependency management
"pip-tools>=7.3.0",
"pipdeptree>=2.9.0",
"pip-licenses>=4.3.0",
# Build tools
"build>=1.0.0",
"twine>=4.0.0",
"check-wheel-contents>=0.5.0",
]
[project.urls]
Homepage = "https://github.com/datenoio/iterabledata/"
Repository = "https://github.com/datenoio/iterabledata/"
[tool.setuptools.dynamic]
version = {attr = "iterable.__version__"}
readme = {file = ["README.md"], content-type = "text/markdown"}
[tool.setuptools.packages.find]
exclude = ["tests", "tests.*"]
[tool.setuptools.package-data]
iterable = ["py.typed"]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP"]
ignore = []
[tool.pytest.ini_options]
addopts = "--doctest-modules --verbose --cov=iterable --cov-report=term-missing --cov-report=html --cov-report=xml"
testpaths = ["tests"]
norecursedirs = ["examples", ".git", ".venv", "__pycache__", "*.egg", "build", "dist", "node_modules", "docs"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
timeout = 300
timeout_method = "thread"
markers = [
"stress: marks tests as stress tests (creates large files, may take long time)",
"slow: marks tests as slow running (may take several minutes)",
"benchmark: marks tests as benchmarks (use --benchmark-only to run)",
]
[tool.coverage.run]
source = ["iterable"]
omit = ["*/tests/*", "*/test_*.py", "*/__pycache__/*"]
branch = true
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
fail_under = 75
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.bandit]
exclude_dirs = ["tests", "build", "dist", ".venv", "__pycache__", "examples"]
skips = ["B101"] # Skip assert_used warnings in tests
[tool.pydocstyle]
convention = "google"
match = "(?!test_).*\\.py"
match-dir = "(?!build|dist|tests|__pycache__)"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false # Set to true after fixing all errors
disallow_incomplete_defs = false # Set to true after fixing all errors
check_untyped_defs = true
disallow_untyped_decorators = false # Set to true after fixing all errors
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
show_error_context = true
pretty = true
# Per-module options
[[tool.mypy.overrides]]
module = [
"tests.*",
"examples.*",
"dev.*",
]
disallow_untyped_defs = false
ignore_errors = false
# Ignore missing imports for optional dependencies
# Note: Type stubs are available for many optional dependencies via types-* packages
# (e.g., types-pyyaml, types-requests). These are installed as dev dependencies.
# For packages without type stubs, we use ignore_missing_imports.
[[tool.mypy.overrides]]
module = [
"iterable.datatypes.*",
"iterable.codecs.*",
"iterable.db.*",
"iterable.engines.*",
]
ignore_missing_imports = true # Many formats have optional dependencies without type stubs
# Packages with type stubs available (no ignore_missing_imports needed):
# - pandas (pandas-stubs package available, but not installed by default)
# - pyarrow (pyarrow-stubs package available, but not installed by default)
# - pyyaml (types-pyyaml)
# - requests (types-requests)
# - chardet (types-chardet)
# - openpyxl (types-openpyxl)
# - pydantic (built-in type stubs)
# - duckdb (built-in type stubs)
#
# Packages without type stubs (ignore_missing_imports = true):
# - Most other optional dependencies (pyorc, lxml, pymongo, etc.)