-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
168 lines (149 loc) · 3.83 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
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "intelligence-layer"
version = "9.1.0"
description = ""
authors = ["Aleph Alpha Engineering <[email protected]>"]
readme = "README.md"
license = "Aleph Alpha Licensed"
packages = [{ include = "intelligence_layer", from = "src" }]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
pydantic = "2.10.*"
aleph-alpha-client = ">=7.1.0"
python-dotenv = "*"
semantic-text-splitter = "^0.22.0"
qdrant-client = { version = "1.13.2", extras = ["fastembed"] }
rich = "^13.9.4"
datasets = "^3.2.0"
requests = "^2.32.3"
pycountry = "24.6.1"
opentelemetry-api = "^1.29.0"
opentelemetry-sdk = "^1.29.0"
huggingface-hub = "^0.27.1"
opentelemetry-exporter-otlp-proto-http = "1.29.0"
# summary grader
rouge-score = "^0.1.2"
sacrebleu = "^2.5.1"
lingua-language-detector = "^2.0.2"
argilla = "^2.4.0"
dict-hash = "^1.3.6"
sqlalchemy = "^2.0.37"
psycopg2-binary = "^2.9.9"
aiohttp = "^3.11.11"
[tool.poetry.group.dev.dependencies]
# lint & format
mypy = "^1.13.0"
nbqa = "^1.9.1"
ruff = "^0.9.3"
pre-commit = "^4.1.0"
# tests
pytest = "^8.3"
pytest-xdist = "^3.6.1"
nbconvert = "^7.16.5"
# typing
httpx = "*"
types-Pygments = "*"
types-colorama = "*"
types-docutils = "*"
types-setuptools = "*"
types-decorator = "*"
types-requests = "*"
types-tqdm = "*"
pandas-stubs = "^2.2.3.241126"
# docs
sphinx-rtd-theme = "^3.0.2"
sphinx = "^8.1.3"
matplotlib = "^3.10.0"
pytest-asyncio = "^0.25.3"
[tool.poetry.group.docs.dependencies]
fastapi = "^0.115.8"
uvicorn = "^0.34.0"
hypercorn = "^0.17.3"
jupyter = "^1.1.1"
# [tool.poetry.extras]
# argilla = ["argilla"]
# grader = ["rouge-score", "sacrebleu"]
# language-detection = ["lingua-language-detector", "pycountry"]
[tool.poetry.group.extras.dependencies]
pytest = "^8.3.4"
asyncio = "^3.4.3"
[tool.mypy]
files = "src,tests"
strict = "True"
[tool.pytest.ini_options]
verbosity_assertions = 1
markers = [
"internal: marks tests as internal (deselect with '-k \"not internal\"')",
"docker: the test depends on having a docker container running.",
"document_index: tests for the document index client and the async document index client",
]
addopts = "--capture=tee-sys"
filterwarnings = [ #ignore: message : warning : location ?
'ignore:.*\`general_plain_validator_function\` is deprecated.*',
'ignore::DeprecationWarning:.*importlib._bootstrap.*',
]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
[tool.ruff]
target-version = "py310"
extend-include = ["*.ipynb"]
[tool.ruff.lint]
# defaults: ["E4", "E7", "E9", "F"]
# check https://docs.astral.sh/ruff/rules/ for more info
select = [
"E4",
"E7",
"E9",
"F",
"W",
# isort
"I",
# simplify
"SIM",
# pathlib, small but may be nice
"PTH",
# update to newer python versions (mostly typing)
"UP",
# ruff dependent checks
"RUF",
# bugbear
"B",
# pydocstring
"D",
]
# Did not seem so useful: PD, T20(not yet), C90(eventually), PT (too opinionated)
ignore = [
# Line too long
"E501",
# X | Y for hinting over optional
"UP007",
# next() instead of [0],
"RUF015",
# unusual unicodes
"RUF001",
# warnings should be self explanatory
"B028",
# we do not docstring everything
"D1",
]
extend-safe-fixes = ["D415"]
[tool.ruff.lint.isort]
known-first-party = ["intelligence_layer", "documentation"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pydoclint]
style = 'google'
exclude = '\.git|tests'
quiet = true
require-return-section-when-returning-nothing = false
check-return-types = false
require-yield-section-when-yielding-nothing = false
check-yield-types = false
arg-type-hints-in-docstring = false
allow-init-docstring = true
skip-checking-raises = true
# this does not work well with type definitions in class attributes
check-class-attributes = false