-
Notifications
You must be signed in to change notification settings - Fork 134
/
pyproject.toml
156 lines (131 loc) · 3.76 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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "chat_with_mlx"
version = "0.2.2"
description = "A Retrieval-augmented Generation (RAG) chat interface with support for multiple open-source models, designed to run natively on MacOS and Apple Silicon with MLX."
readme = "README.md"
keywords = ["mlx","chat","chatbot","chat_with_mlx","chat_with_mlx"]
authors = [
{ name = "Quan Nguyen", email = "[email protected]" },
]
license = {text = "MIT License"}
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">= 3.8"
dependencies = [
"mlx-lm==0.14.3",
"gradio==4.29.0",
"tiktoken==0.7.0",
"langchain==0.1.16",
"langchain-community>=0.0.25",
"langchain-core==0.1.45",
"sentence-transformers==3.0.1",
"einops==0.8.0",
"chromadb==0.5.0",
"pypdf==4.2.0",
"youtube-transcript-api==0.6.2",
"sentencepiece==0.2.0",
"docx2txt==0.8"
]
[project.optional-dependencies]
dev = [
"pre-commit",
"ruff",
"build",
"twine",
"wheel",
"setuptools",
"tox",
"bandit",
]
[tool.isort]
line_length = 88
profile = "black"
[tool.bandit]
target = ["chat_with_mlx"]
tests = ["B201", "B301", "B318", "B314", "B303", "B413", "B412", "B410"]
[tool.autoflake]
check = true
imports = ["chat_with_mlx"]
[tool.ruff]
target-version = "py38"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"yarn-error.log",
"yarn.lock",
"docs",
]
line-length = 88
indent-width = 4
[tool.ruff.lint]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
pylint.max-args = 20
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402","F401"]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 20
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.setuptools]
package-dir = {"chat_with_mlx" = "chat_with_mlx"}
include-package-data = true
license-files = ["LICENSE"]
zip-safe = true
[tool.setuptools.packages.find]
include = ["chat_with_mlx*"]
exclude = ["docs*", "tests*","third_party*","assets*", "chat_with_mlx/models/*"]
[project.scripts]
chat-with-mlx = "chat_with_mlx.app:main"