-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
259 lines (235 loc) · 6.77 KB
/
pyproject.toml
File metadata and controls
259 lines (235 loc) · 6.77 KB
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
[project]
name = "artefactual"
version = "2026.03.1"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Hicham Randrianarivo", email = "hicham.randrianarivo@artefact.com" },
{ name = "Gauthier Jeannin", email = "gauthier.jeannin@artefact.com" },
{ name = "Charles Moslonka", email = "charles.moslonka@artefact.com" },
]
license = "MIT"
license-files = ["LICEN[CS]E*"]
requires-python = ">=3.10,<3.14"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"absl-py>=2.1.0",
"beartype>=0.19.0",
"pydantic>=2.12.5",
"numpy>=1.24.0",
]
[project.urls]
Homepage = "https://github.com/artefactory/artefactual"
Repository = "https://github.com/artefactory/artefactual"
Issues = "https://github.com/artefactory/artefactual/issues"
[project.optional-dependencies]
hub = ["huggingface-hub>=0.27.0", "keras-hub>=0.18.1", "safetensors>=0.4.5"]
test = ["hypothesis>=6.127.8", "pytest>=8.0.0", "pytest-cov>=6.0.0"]
calibration = [
"scikit-learn>=1.6.0",
"ray>=2.50.1",
"matplotlib>=3.9.0",
"vllm>=0.12.0 ; sys_platform != 'darwin'",
"torch>=2.9.0",
]
docs = [
"myst-parser~=4.0.1",
"nbsphinx~=0.9.8",
"pydata-sphinx-theme~=0.16.1",
"sphinx~=8.1.3",
"sphinx-autodoc-typehints~=3.0.1",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"datasets>=3.2.0",
"einops>=0.8.0",
"faiss-cpu>=1.9.0.post1",
"fastembed>=0.4.2 ; sys_platform == 'darwin'",
"grain>=0.2.3",
"ipython>=8.31.0",
"jinja2>=3.1.5",
"jupytext>=1.16.6",
"plum-dispatch>=2.5.7",
"scikeras>=0.13.0",
"toolz>=1.0.0",
"wandb>=0.19.4",
"lm-eval[vllm]>=0.4.7 ; sys_platform != 'darwin'",
"mlcroissant>=1.0.12",
"polars>=1.21.0",
"orjson>=3.10.15",
"tokenizers>=0.21.0",
"transformers>=4.48.1",
"outlines>=0.1.11",
"pudb>=2024.1.3",
"pydantic>=2.10.6",
"jupyterlab>=4.3.5",
"hypothesis>=6.127.8",
"ruff>=0.14.8",
"ty>=0.0.1a32",
"pre-commit>=4.0.0",
"bump-my-version>=0.28.0",
"git-cliff>=2.12.0",
]
[tool.codespell]
ignore-words-list = "rouge,ans"
[tool.ruff]
preview = true
target-version = "py310"
line-length = 120
output-format = "concise"
extend-exclude = [
"demo_uncertainty_notebook.ipynb",
"demo.ipynb",
"demo_uncertainty.py",
"scripts/**/*",
]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint]
select = [
"A", # builtins abuse (pep8-naming + flake8-builtins)
"ARG", # unused arguments
"B", # bugbear correctness warnings
"BLE", # blind/overbroad excepts
"C", # complexity checks
"DTZ", # naive datetime usage
"E", # pycodestyle errors
"EM", # error message construction
"F", # pyflakes correctness
"FBT", # boolean traps
"I", # import sorting
"ICN", # import conventions
"ISC", # implicit string concatenation
"LOG", # logging format/usage
"N", # naming
"PTH", # prefer pathlib over os.path
"PLE", # pylint errors
"PIE", # pie comprehensions / misc correctness
"RET", # return statement consistency
"RUF", # Ruff-specific rules
"S", # security (bandit)
"SIM", # simplify overcomplicated code
"SLF", # private/protected member access
"T", # type hints
"T10", # debug statements
"T20", # print statements
"TID", # tidy imports
"TRY", # safer exception handling
"UP", # pyupgrade
"W", # pycodestyle warnings
"FURB",# refurb refactors
]
extend-select = [
"ANN201", # public functions must have return type
"ANN205", # staticmethod must have return type
"ANN206", # classmethod must have return type
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0915", # too many statements
"PLR1722", # consider using sys.exit over exit/quit
]
ignore = [
"ISC001",
"F811",
"SIM117", # low-signal simplify cases
"SIM300", # low-signal simplify cases
"RUF009", # docstring param order (style)
# Formatter conflicts (Ruff docs)
"W191", # tab indentation
"E111", # indentation with invalid multiple
"E114", # indentation with invalid multiple (comment)
"E117", # over-indented
"ISC002", # multi-line implicit string concat (formatter handles)
# Bandit: keep only Jinja-template-related ignores
"S701", "S702", "S704",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"**/scripts/*" = [
"INP001",
"T201",
"T20",
"PLR0917",
"PLR0913",
"RUF009",
"FBT003",
"E501",
"PLR0914",
"A004",
]
"**/tests/**/*" = [
"PLC1901",
"PLR2004",
"PLR6301",
"S",
"TID252",
"ANN", # allow untyped returns in tests
]
"docs/notebooks/**/*" = ["INP001", "T201", "A004", "E501"]
"**/*.ipynb" = [
"T201", # print statements allowed in notebooks
"T203", # pprint statements allowed in notebooks
"ANN", # type annotations not required in notebooks
"B905", # zip() without strict is fine in notebooks
"E501", # line length relaxed in notebooks
"PLR2004", # magic values allowed in notebooks
"S101", # assert allowed in notebooks
"ERA001", # commented-out code allowed in notebooks
"F401", # unused imports allowed (often for demo/exploration)
"INP001", # implicit namespace package
]
[tool.ruff.lint.isort]
known-first-party = ["artefactual"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.jupytext]
cell_markers = '"""'
[tool.ty]
[tool.ty.terminal]
output-format = "concise"
[tool.ty.src]
exclude = ["tests/", "scripts", "examples"]
[tool.ty.rules]
unresolved-import = "ignore"
[tool.bumpversion]
current_version = "2026.03.1"
parse = """(?x)
(?P<release>
(?:[1-9][0-9]{3})\\. # YYYY.
(?:1[0-2]|0[1-9]) # 0M
)
\\.(?P<patch>\\d+) # .patch
"""
serialize = ["{release}.{patch}"]
commit = true
tag = true
tag_name = "v{new_version}"
[tool.bumpversion.parts.release]
calver_format = "{YYYY}.{0M}"
[tool.bumpversion.parts.patch]
first_value = "0"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[[tool.bumpversion.files]]
filename = "src/artefactual/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'