-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
140 lines (127 loc) · 3.88 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
[tool.poetry]
name = "quke"
version = "0.6.0"
description = "Compare the answering capabilities of different LLMs - for example LlaMa, GPT4o, Mistral, Claude, Cohere, others - against user provided document(s) and questions."
authors = ["Erik Oosterop"]
maintainers = ["Erik Oosterop"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/EJOOSTEROP/quke"
repository = "https://github.com/EJOOSTEROP/quke"
documentation = "https://github.com/EJOOSTEROP/quke"
keywords = ["ML", "LLM", "compare", "chat", "semantic search"]
[tool.poetry.scripts]
quke = "quke.quke:quke"
[tool.poetry.dependencies]
python = "^3.11"
lark = "^1.1.7"
rich = "^13.5.2"
pymupdf = "^1.24.9"
langchain-community = "^0.2.10"
langchain-core = "^0.2.25"
jinja2 = "^3.1.4"
python-dotenv = "^1.0.1"
hydra-core = "^1.3.2"
langchain-chroma = "^0.1.2"
langchain-openai = "^0.1.19"
sentence-transformers = "^3.0.1"
langchain-huggingface = "^0.0.3"
langchain-cohere = "^0.1.9"
replicate = "^0.30.1"
langchain-google-genai = "^1.0.8"
langchain-mistralai = "^0.1.11"
litellm = "^1.42.5"
[tool.poetry.group.dev.dependencies]
pytest-cov = "^4.1.0"
pytest = "^7.4.0"
requests-mock = "^1.11.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
markers = [
"expensive: uses API key and likely paid or at least limited resources (deselect with '-m \"not expensive\"')",
"serial",
]
[tool.ruff]
include = ["*.py", "*.pyi", "**/pyproject.toml"]
line-length = 119
select = [ # https://beta.ruff.rs/docs/rules/
"A", # prevent using keywords that clobber python builtins
"ANN", # type annotation
"ARG", # unused arguments
"B", # bugbear: security warnings
# "BLE", # blind exceptions
"C",
# "COM", # commas
"C4", # comprehension
"C90", # McCabe complexity
"D", # pydocstyle
# "DAR", # darglint, but does not seem to be implemented at the moment
"DTZ", # date timezone
"E", # pycodestyle
"EM", # error messages
"ERA", # eradicate
"EXE", # executables
"F", # pyflakes
"FLY", # f-strings
# "G", # logging format (no f-string)
"I", # isort
"ICN", # import conventions
"INT", # gettext
"ISC", # implicit string concatenation
"N", # pep8 naming
"PERF", # performance lint
"PIE", #
"PT", # pytest style
"PTH", # use pathlib
"Q", # quotes
"RET", # return values
"RSE", # error parenthesis
"RUF", # ruff rules
"S", # Bandit
"SIM", # simplify
"TCH", # type checking
# "TD", # TODO
"TID", # tidy imports
"TRY", # tryceratops
"T20", # print statement
"UP", # alert you when better syntax is available in your python version
"W", # pycodestyle warnings
"RUF", # the ruff developer's own rules
]
ignore = [
"E203", # comments allowed
"E501",
"ANN101", # type annotation for self
]
# fixing is off by default
fix = true
fixable = [
"F401", # Remove unused imports.
"NPY001", # Fix numpy types, which are removed in 1.24.
"RUF100", # Remove unused noqa comments.
"I", # Fix import order
"PTH", # Path.cwd()
]
[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
# at least these three should be fine in tests:
"S101", # asserts allowed in tests...
"ANN", # TODO: do not care about type annotations in tests for now
"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
"D", # no pydocstyle
"N", # Argument, function to lowercase
]
"noxfile.py" = [
"ANN",
"D",
]
[tool.ruff.pydocstyle]
convention = "google"
[tool.mypy]
disallow_incomplete_defs = true