-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
208 lines (189 loc) · 5.67 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
[build-system]
requires = [
"Cython>=3.0.0",
"numpy>=1.26.4",
"poetry-core>=1.0.0",
"poetry-dynamic-versioning>=1.0.1",
"python-dotenv>=1.0.1",
"setuptools>=61.0",
]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poe]
[tool.poe.tasks.build]
cmd = "python build.py --inplace --verbose -- ${file}"
help = "Build a file for rapid development."
[[tool.poe.tasks.build.args]]
name = "file"
help = "Name of the file to build."
required = true
[tool.poe.tasks.clean]
sequence = [
"find . -name '*.c' -delete",
"find . -name '*.cpp' -delete",
"find . -name '*.dylib' -delete",
"find . -name '*.html' -delete",
"find . -name '*.pyc' -delete",
"find . -name '*.pyd' -delete",
"find . -name '*.so' -delete",
"find . -name '__pycache__' -delete",
"rm -rf build dist src/*.egg-info",
]
help = "Clean all build and built files."
default_item_type = "cmd"
[tool.poe.tasks.test]
sequence = ["pytest tests"]
help = "Test all code."
default_item_type = "cmd"
[tool.poe.tasks.lint]
sequence = [
"flake8 .",
"cython-lint .",
"black --check .",
"ruff check --preview .",
"mypy src",
]
help = "Lint all code."
default_item_type = "cmd"
[tool.poe.tasks.format]
sequence = [
"autopep8 .",
"isort .",
"black .",
"ruff format .",
"mdformat doc",
]
help = "Format all code."
default_item_type = "cmd"
[tool.poetry]
authors = ["Mauko Quiroga-Alvarado <mauko@redte.ch>"]
description = ""
include = ["src/**/*.so", "src/**/*.pyd", "src/**/*.dylib"]
license = "APGL-3.0"
name = "retrievalist"
readme = "README.md"
version = "0.0.0-post.22+7cefc52"
packages = [
{ include = "docs", from = "src" },
]
[tool.poetry.dependencies]
python = "^3.11 || ^3.12"
chromadb = "0.4.24" # VectorDB
cryptography = "42.0.5" # For PDFs with passwords
langchain = "0.1.9" # LLM tools
langchain-community = "0.0.24" # LLM tools community
msgspec = "^0.18.6" # Fast JSON/MsgPack encoding/decoding/parsing
poethepoet = "^0.25.0" # CLI tools
pymupdf = "^1.23.26" # PDF parsing
python-dotenv = "1.0.1" # Environment variables # TODO: Replace / remove
rich = "^13.7.1" # Pretty printing
sqlmodel = "^0.0.16"
[tool.poetry.group.dev.dependencies]
Cython = "3.0.8" # C/C++ compiling
autopep8 = "^2.0.4" # Code formatting
black = "24.2.0" # Code formatting
cython-lint = "0.16.0" # Cython linting
flake8 = "^7.0.0" # Linting
ipython = "8.22.1" # Interactive shell
isort = "^5.13.2" # Import sorting
mdformat = "^0.7.17" # Markdown formatting
mypy = "1.8.0" # Type checking
pytest = "^8.0.2" # Testing
pytest-clarity = "^1.0.1" # Simpler test output
pytest-randomly = "^3.15.0" # Test randomization
ruff = "^0.3.0" # Linting
[tool.poetry.build]
script = 'build.py'
generate-setup-file = false
[tool.poetry.scripts]
zotero = "cli.__main__:main"
[tool.mypy]
python_version = "3.11"
allow_redefinition = false
check_untyped_defs = true
files = ["src/**/*.py", "src/**/*.pyx", "src/**/*.pyd"]
ignore_errors = false
ignore_missing_imports = false
implicit_reexport = false
local_partial_types = true
no_implicit_optional = true
strict = true
strict_optional = true
warn_no_return = true
warn_unreachable = true
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config --capture=fd --quiet"
empty_parameter_set_mark = "fail_at_collect"
testpaths = ["tests"]
xfail_strict = true
filterwarnings = [
"ignore::pytest.PytestCollectionWarning",
"ignore::RuntimeWarning",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
[tool.poetry-dynamic-versioning]
enable = false
vcs = "git"
style = "semver"
[tool.isort]
profile = "black"
py_version=311
[tool.black]
target-version = ["py311"]
[tool.ruff]
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
# pyflakes
"F",
# pycodestyle
"E", "W",
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# flake8-debugger
"T10",
# flake8-gettext
"INT",
# pylint
"PL",
# flake8-pytest-style
"PT",
# misc lints
"PIE",
# flake8-pyi
"PYI",
# tidy imports
"TID",
# implicit string concatenation
"ISC",
# type-checking imports
"TCH",
# comprehensions
"C4",
# pygrep-hooks
"PGH",
# Ruff-specific rules
"RUF",
# flake8-bandit: exec-builtin
"S102",
# numpy-legacy-random
"NPY002",
# Perflint
"PERF",
# flynt
"FLY",
# flake8-logging-format
"G",
# flake8-future-annotations
"FA",
]
ignore = ["ISC001"]