Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (103 loc) · 3.02 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (103 loc) · 3.02 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
[build-system]
requires = ["setuptools>=42", "wheel", "build"]
build-backend = "setuptools.build_meta"
[project]
name = "mistral_common"
version = "1.12.0"
description = "Mistral-common is a library of common utilities for Mistral AI."
authors = [{name = "Mistral AI", email = "oss@mistral.ai"}]
license = "Apache-2.0"
license-files = ["LICENSE"]
readme = "README.md"
requires-python = ">=3.10.0,<3.16"
dependencies = [
"pydantic>=2.7,<3.0; python_version <= '3.13'",
"pydantic>=2.12,<3.0; python_version >= '3.14'",
"jsonschema>=4.21.1",
"typing-extensions>=4.11.0",
"tiktoken>=0.7.0; python_version <= '3.13'",
"tiktoken>=0.12.0; python_version >= '3.14'",
"pillow>=10.3.0",
"requests>=2.0.0",
"numpy>=1.25,<2.4; python_version <= '3.12'",
"numpy>=1.25; python_version > '3.12'",
"pydantic-extra-types[pycountry]>=2.10.5",
]
[project.optional-dependencies]
opencv = ["opencv-python-headless>=4.0.0"]
sentencepiece = ["sentencepiece>=0.2.0"]
soundfile = ["soundfile>=0.12.1"]
soxr = ["soxr>=0.5.0"]
audio = ["mistral_common[soundfile]", "mistral_common[soxr]"]
image = ["mistral_common[opencv]"]
guidance = ["llguidance>=1.3.0,<1.4.0", "jinja2>=3.1.0"]
hf-hub = ["huggingface-hub>=1.31.0"]
server = [
"fastapi[standard]>=0.118.3",
"pydantic-settings >= 2.9.1",
"click>=8.1.0",
"uvloop>=0.22.1; python_version >= '3.14'"
]
all = [
"mistral_common[opencv,sentencepiece,audio,image,guidance,hf-hub,server]"
]
[project.scripts]
mistral_common = "mistral_common.experimental.app.main:cli"
[dependency-groups]
dev = [
"types-jsonschema>=4.21.0.20240118",
"types-protobuf>=4.24.0.20240129",
"mypy-protobuf>=3.5.0",
"pytest>=7.4.4",
"ruff>=0.2.2",
"mypy>=1.8.0",
"pytest-cov>=4.1.0",
"pytest-xdist>=3.8.0",
"diff-cover>=8.0.3",
"types-Pillow>=10.2.0",
"types-requests>=2.32",
"coverage[toml]>=7.4.4",
"openai>=1.84.0",
"pre-commit>=4.0.0",
]
docs = [
"zensical==0.0.62",
"mkdocstrings>=1.0",
"mkdocstrings-python>=2.0",
"mkdocs-literate-nav",
"pyyaml>=6.0.3"
]
test-integrations = [
"transformers>=5.0.0",
"regex>=2025.10.22",
]
[tool.uv]
required-version = "==0.12.6"
exclude-newer = "7 days"
[tool.ruff]
lint.select = ["E", "F", "W", "Q", "I"]
lint.ignore = ["E203"]
lint.fixable = ["ALL"]
lint.unfixable = []
line-length = 120
exclude = ["*.md", "docs", "build"]
[tool.mypy]
disallow_untyped_defs = true
show_error_codes = true
no_implicit_optional = true
warn_return_any = true
warn_unused_ignores = true
exclude = ["docs", "tools", "build"]
[[tool.mypy.overrides]]
module = ["sentencepiece.*", "cv2", "cv2.*","soxr", "soundfile", "llguidance", "llguidance.*", "jinja2", "jinja2.*", "tokenizers", "tokenizers.*", "transformers", "transformers.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["./tests"]
[tool.coverage.run]
omit = ["tests", "*src/mistral_common/data*"]
[tool.coverage.report]
skip_covered = true
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]