-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (129 loc) · 3.77 KB
/
pyproject.toml
File metadata and controls
148 lines (129 loc) · 3.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
[tool.poetry]
name = "model-registry"
version = "0.3.9"
description = "Client for Kubeflow Model Registry"
authors = ["Isabella Basso do Amaral <idoamara@redhat.com>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/kubeflow/model-registry"
packages = [
{ include = "model_registry", from = "src" },
{ include = "mr_openapi", from = "src" },
]
[tool.poetry.urls]
"Issues" = "https://github.com/kubeflow/model-registry/issues"
[tool.poetry.dependencies]
python = ">= 3.10, < 4.0"
typing-extensions = "^4.8"
pydantic = "^2.7.4"
python-dateutil = "^2.9.0.post0"
aiohttp = "^3.9.5"
aiohttp-retry = "^2.8.3"
# allows for reentrant event loops (used for sync client) - Python 3.14 compatible
nest-asyncio2 = "^1.7.1"
huggingface-hub = { version = ">=0.20.1,<1.10.0", optional = true }
olot = { version = "^0.1.17", optional = true }
boto3 = { version = "^1.37.34", optional = true }
rh-model-signing = { version = "0.1.0", optional = true }
platformdirs = { version = "^4.0.0", optional = true }
[tool.poetry.extras]
hf = ["huggingface-hub"]
boto3 = ["boto3"]
olot = ["olot"]
signing = ["rh-model-signing", "platformdirs"]
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = ">=7.2.6,<9.0.0"
furo = ">=2023.9.10,<2026.0.0"
myst-parser = { extras = ["linkify"], version = ">=2,<5" }
sphinx-autobuild = ">=2021.3.14,<2025.0.0"
[tool.poetry.group.dev.dependencies]
pytest = ">=7.4.2,<10.0.0"
coverage = { extras = ["toml"], version = "^7.3.2" }
pytest-cov = ">=4.1,<8.0"
pytest-mock = ">=3.7.0"
pytest-xdist = "^3.5.0"
ruff = ">=0.5.2,<0.16.0"
mypy = "^1.7.0"
# E2E test using Ray in compatible py environments:
# TODO: add back ray for 3.14 once https://github.com/ray-project/ray/issues/56434 is resolved
ray = {version = "^2.52.1", python = "<3.14"}
uvloop = ">=0.21,<0.23"
pytest-asyncio = "^1.1.0"
requests = "^2.32.2"
types-python-dateutil = "^2.9.0.20240906"
pytest-html = "^4.1.1"
schemathesis = ">=4.0.3,<=4.15.0"
[tool.coverage.run]
branch = true
source = ["model_registry"]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.report]
show_missing = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
"e2e: end-to-end testing",
"fuzz: mark a test as a fuzzing (property-based or randomized) test"
]
# Note: Parallel execution is enabled in noxfile.py for fuzz tests via "-n auto"
# To run fuzz tests manually in parallel: pytest tests/fuzz_api --fuzz -n auto
addopts = "--tb=short --strict-markers"
[tool.ruff]
target-version = "py310"
respect-gitignore = true
line-length = 119
extend-exclude = ["src/mr_openapi/"]
[tool.ruff.lint]
select = [
"F", # pyflakes
# pycodestyle
"W", # warnings
"E", # errors
"C90", # mccabe
"B", # bugbear
"S", # flake8-bandit
"C4", # flake8-comprehensions
"D", # pydocstyle
"EM", # flake8-errmsg
"I", # isort
"PT", # pytest
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"UP", # pyupgrade
]
ignore = [
"D105", # missing docstring in magic method
"E501", # line too long
"S101", # use of assert detected
]
mccabe.max-complexity = 8
per-file-ignores = { "tests/**/*.py" = [
"D", # missing docstring in public module
] }
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.10"
strict = false
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
ignore_missing_imports = true
check_untyped_defs = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
exclude_gitignore = true
[[tool.mypy.overrides]]
module = "mr_openapi.*"
ignore_errors = true