-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
396 lines (355 loc) · 11.1 KB
/
pyproject.toml
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
[dependency-groups]
ai-apps = [
"ell-ai>=0.0.15",
"langchain>=0.3.12",
"megaparse>=0.0.45",
]
ai-train = [
"datasets>=3.1.0",
"einops>=0.8.0",
"jaxtyping>=0.2.36",
"nnsight>=0.3.7",
"onnx>=1.17.0",
"pytorch-lightning>=2.4.0",
"ray[tune]>=2.40.0",
"safetensors>=0.4.5",
"scikit-learn>=1.6.0",
"shap>=0.46.0",
"torch>=2.5.1",
"transformers>=4.47.0",
"umap-learn>=0.5.7",
"wandb>=0.19.1",
]
async = [
"uvloop>=0.21.0",
]
cli = [
"typer>=0.15.1",
]
cloud = [
"ansible>=11.1.0",
"boto3>=1.35.81",
]
config = [
"cookiecutter>=2.6.0",
"gin-config>=0.5.0",
"jinja2>=3.1.4",
]
data = [
"dagster>=1.9.5",
"duckdb>=1.1.3",
"lancedb>=0.17.0",
"networkx>=3.4.2",
"numpy>=1.26.4",
"orjson>=3.10.12",
"pillow>=10.4.0",
"polars>=1.17.0",
"pygwalker>=0.4.9.13",
"sqlmodel>=0.0.22",
"tomli>=2.0.1",
]
dev = [
"bandit>=1.8.0",
"better-exceptions>=0.3.3",
"cruft>=2.15.0",
"faker>=33.1.0",
"hypothesis>=6.122.3",
"pip>=24.3.1",
"polyfactory>=2.18.1",
"pydoclint>=0.5.11",
"pyinstrument>=5.0.0",
"pyprojectsort>=0.3.0",
"pyright>=1.1.390",
"pytest-cases>=3.8.6",
"pytest-cov>=6.0.0",
"pytest-icdiff>=0.9",
"pytest-mock>=3.14.0",
"pytest-playwright>=0.6.2",
"pytest-profiling>=1.8.1",
"pytest-random-order>=1.1.1",
"pytest-shutil>=1.8.1",
"pytest-split>=0.10.0",
"pytest-sugar>=1.0.0",
"pytest-timeout>=2.3.1",
"pytest>=8.3.4",
"ruff>=0.8.3",
"taplo>=0.9.3",
"tox>=4.23.2",
"uv>=0.5.7",
]
dev-doc = [
"mdformat>=0.7.19",
"mkdocs-material>=9.5.48",
"mkdocs>=1.6.1",
]
dev-nb = [
"jupyter-book>=1.0.3",
"nbformat>=5.10.4",
"nbqa>=1.9.1",
"testbook>=0.4.2",
]
gui = [
"streamlit>=1.41.1",
]
misc = [
"boltons>=24.1.0",
"cachetools>=5.5.0",
"wrapt>=1.17.0",
]
nb = [
"chime>=0.7.0",
"ipykernel>=6.29.5",
"ipython>=7.34.0",
"ipywidgets>=8.1.5",
"jupyterlab>=4.3.3",
]
web = [
"beautifulsoup4>=4.12.3",
"fastapi>=0.115.6",
"playwright>=1.49.1",
"requests>=2.32.3",
"scrapy>=2.12.0",
"uvicorn>=0.33.0",
"zrok>=0.4.42",
]
[project]
authors = [
]
classifiers = [
"Development Status :: 1 - Planning",
"Natural Language :: English",
"Operating System :: OS Independent",
"Private :: Do Not Upload",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"loguru-config>=0.1.0",
"loguru>=0.7.3",
"plotly>=5.24.1",
"pydantic>=2.10.3",
"rich>=13.9.4",
"tokenize-rt",
"polars>=1.17.0",
"ipykernel>=6.29.5",
"jsonlines>=4.0.0",
"orjson>=3.10.12",
"numpy>=1.26.4",
"safetensors>=0.4.5",
]
description = "A final project for MIT's Deep Learning class"
keywords = []
name = "embedding-translation"
requires-python = ">=3.11,<3.13"
version = "0.1.0"
[project.license]
content-type = "text/markdown"
file = "LICENSE.md"
<<<<<<< HEAD
[project.readme]
content-type = "text/markdown"
file = "README.md"
=======
[tool.poetry.dependencies]
python = ">=3.11,<3.13"
# === Core Framework Dependencies ===
typer = "^0.15.1" # Modern CLI framework (built on Click/Pydantic)
rich = "^13.9.4" # Terminal formatting and styling
pydantic = ">=1.10.8" # Data validation using type annotations
typeguard = "^4.2.1" # Runtime type checking
wrapt = "^1.17.0" # Advanced Python decorators
# might need this https://pypi.org/project/absl-py/
# or pip install google-re2
# google-re2 = "^1.1.20240702" not working for me
# absl-py = "^2.1.0"
# === Web & API ===
# fastapi = "^0.115.6" # Fast modern web framework for building APIs
# playwright = "^1.49.0" # Modern browser automation and testing
# zrok = "^0.4.42" # Self-hosted ngrok alternative for local development
# beautifulsoup4 = "^4.12.3" # HTML parsing and web scraping
# requests = "^2.31.0" # HTTP client library (recommended for its simplicity)
# === Data & Scientific Computing ===
numpy = "<2.0.0" # Scientific computing and array operations
networkx = "^3.4.2" # Graph/network analysis and visualization
polars = "^1.16.0" # Fast DataFrame library (recommended over pandas for performance)
orjson = "^3.10.12" # High-performance JSON parser (recommended for data processing)
# === Development Tools ===
# -- Interactive Computing --
ipython = "^8.10.0" # Enhanced Python REPL
ipykernel = "^6.29.5" # Jupyter kernel
ipywidgets = "^8.1.5" # Interactive Jupyter widgets
# -- Templating --
# Jinja2 = "^3.1.4" # Template engine
# cookiecutter = "^2.6.0" # Project scaffolding
# -- Workflow Management --
# apache-airflow = "^2.10.3" # Workflow orchestration (not working for me)
# -- Logging --
loguru = "^0.7.3" # Enhanced logging
loguru-config = "^0.1.0"
# -- Config --
gin-config = "^0.5.0" # EXPERIMENTAL: configuration library
# === Task Running ===
poethepoet = "*" # Task runner for Poetry projects (similar to npm scripts)
# === Optional Dependencies ===
# -- Data Processing --
tomli = "*" # TOML parser (only needed for Python <3.11)
# -- HTTP & Networking --
# requests = "^2.31.0" # Industry-standard HTTP client library
# -- AI/ML Stack --
# langchain = "^0.3.9" # Framework for LLM application development
transformers = "^4.47.0" # HuggingFace's state-of-the-art ML models
# torch = "^2.5.1" # Deep learning framework (CPU/GPU)
datasets = "^3.1.0" # HuggingFace's dataset management
jaxtyping = "^0.2.36" # Type hints for numerical arrays
einops = "^0.8.0" # Einstein-inspired array operations
# ell-ai = "^0.0.15" # Toolkit for LLM prompt engineering
# megaparse = "^0.0.48" # Document parsing and extraction
chime = "^0.7.0" # Audio notifications for long-running tasks
# -- Data Visualization --
plotly = "^5.24.1" # Interactive visualization library
# pip install kaleido good for static images with plotly
# dash = "^2.18.2" # Web-based analytics applications
# jupyterlab = "^4.3.2" # Modern notebook interface and IDE
[tool.poetry.dev-dependencies]
# === Testing Framework ===
pytest = "^8.1" # Testing foundation
pytest-mock = "^3.14.0" # Mocking support
pytest-random-order = "^1.1.1" # Randomized test ordering
pytest-cov = "^6.0.0" # Coverage reporting
pytest-timeout = "^2.3.1" # Test timeout control
pytest-profiling = "^1.8.1" # Performance profiling
pytest-shutil = "^1.8.1" # Filesystem utilities
pytest-sugar = "^1.0.0" # Enhanced test output
pytest-icdiff = "^0.9" # Improved diff output
pytest-split = "^0.10.0" # Parallel test execution
pytest-cases = "^3.8.6" # Better parameterization
pytest-playwright = "^0.6.2" # Browser testing
# === Code Quality ===
ruff = "*" # Fast linter & formatter
pyright = "^1.1.390" # Static type checker
bandit = "^1.8.0" # Security Linter
pydoclint = "*" # Docstring linter
hypothesis = "^6.122.1" # Property-based testing
pyinstrument = "*" # Profiling tool with GUI and well maintained
taplo = "^0.9.3" # TOML linting and formatting
# === Documentation ===
mkdocs = "^1.6.1" # Documentation generator
mkdocs-material = "^9.5.47" # Material theme
mdformat = "^0.7.19" # Markdown formatter
# === Build & Distribution ===
# pyinstaller = "*" # Executable creation
poethepoet = "*" # Task running
# === Notebook Tools ===
nbqa = "^1.9.1" # Notebook code quality
jupyter-book = "^1.0.3" # Notebook publishing
testbook = "^0.4.2" # Notebook testing
# %pip install gdown
[tool.poe.tasks]
check = { help = "All checks", sequence = [
"check-lock",
"docstring-lint",
"format",
"lint",
"test",
"typecheck",
], ignore_fail = false }
format = { cmd = "ruff format .", help = "Format code (with autofix)" }
lint = { cmd = "ruff check . --fix", help = "Lint (with autofix)" }
docstring-lint = { cmd = "pydoclint .", help = "Lint docstrings" }
test = { cmd = "pytest", help = "Run tests" }
typecheck = { cmd = "pyright", help = "Typecheck" }
>>>>>>> origin/main
[project.urls]
Repository = "https://github.com/GatlenCulp/embedding_translation"
[tool.poetry.scripts]
embedding_tranlation = "src:main"
[tool.pydoclint]
allow-init-docstring = true
arg-type-hints-in-docstring = false
check-return-types = false
exclude = "\\.venv"
style = "google"
[tool.pyright]
include = [
".",
]
reportMissingTypeStubs = false
reportUnknownArgumentType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
[tool.pytest.ini_options]
addopts = "--show-capture=no\n--code-highlight=yes\n--tb=long\n-rA\n-x\n--doctest-modules\n--cov=src\n--cov-report=html\n--cov-report=term-missing:skip-covered\n--no-cov-on-fail\n"
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::UserWarning",
"ignore::pydantic.warnings.PydanticDeprecatedSince20",
]
markers = [
"potentially_harmful: mark test as potentially harmful to the system (uninstalls, etc.)",
]
pythonpath = [
"src",
]
testpaths = [
"tests",
]
[tool.uv]
default-groups = [
"dev",
]
[tool.ruff]
cache-dir = ".cache/ruff"
line-length = 100
# Doesn't work, this is a bug with ruff.
# https://github.com/astral-sh/ruff/issues/9381
# exclude = ["*/{{{{ cookiecutter.repo_name }}}}/*"]
exclude = [
"*cookiecutter*",
"tests/test-linting/*"
]
[tool.ruff.lint]
# TODO: Different groups of linting styles depending on code use.
select = ["ALL"]
ignore = [
"FIX002", # Allow TODOs
"TD003" # Allow TODO to not have link to issue
]
[tool.ruff.lint.isort]
known-first-party = ["{{ cookiecutter.module_name }}"]
force-sort-within-sections = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
"tests/**/*.py" = [
# 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()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"ANN001", "ANN201", # Allow for non-typed functions
"RET503", # Allow for implicit ignores
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pycodestyle]
max-doc-length = 99
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.gitleaks]
allowlist = [
# Standard Author-Year-ID format
{ description = "Citation keys in Distill.pub HTML", regex = '''key="[A-Za-z-]+[0-9]{4}(-[a-z]{2})?"\s*''' },
# D-cite tags with standard format
{ description = "D-cite tags in Distill.pub HTML", regex = '''<d-cite key="[A-Za-z-]+[0-9]{4}(-[a-z]{2})?"\s*''' },
# Conference paper citations (like NEURIPS2020_XXXX)
{ description = "Conference paper citations", regex = '''key="[A-Z]+[0-9]{4}_[0-9]+"\s*''' },
# Citations within text
{ description = "In-text citations", regex = '''<d-cite key="[A-Za-z0-9_-]+[0-9]{4}(-[a-z]{2})?"\s*''' }
]