forked from Giskard-AI/giskard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
266 lines (243 loc) · 7.25 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
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
260
261
262
263
264
265
266
[build-system]
requires = ["setuptools>=61", "wheel", "grpcio-tools", "protobuf<=3.20.3"]
build-backend = "setuptools.build_meta"
[[tool.pdm.source]]
type = "find_links"
url = "https://download.pytorch.org/whl/cpu/torch_stable.html"
name = "torch"
[tool.pdm.scripts]
proto = "setup.py grpc"
# add "-n auto" to the pytest command to parallelize the execution
test.cmd = "pytest -c pyproject.toml tests --cov=giskard --cov-report=xml --disable-warnings"
test.env = { GSK_DISABLE_ANALYTICS = "True"}
# for some reason github runners don't work when calling 'pdm test -m "not slow"'
test-fast.cmd = "pytest -n auto -m 'not slow' -c pyproject.toml tests --cov=giskard --cov-report=xml --disable-warnings"
test-fast.env = { GSK_DISABLE_ANALYTICS = "True"}
lint = "ruff giskard tests"
doc = "python -m sphinx_autobuild docs docs/_build/html"
[tool.pdm.dev-dependencies]
dev = [
"typing-extensions>=4.5.0",
"black>=23.3.0",
"bandit>=1.7.4",
"darglint>=1.8.1",
"jupyter>=1.0.0",
"jupyterlab>=3.4.2",
"pre-commit>=2.19.0",
"pydocstyle>=6.1.1",
"pylint>=2.13.9",
"pyupgrade>=2.32.1",
"safety>=1.10.3",
"mypy>=0.982",
"deptry>=0.5.13",
"httpretty>=1.1.4",
"isort[colors]>=5.12.0",
"pip>=23.1.2",
"langchain>=0.0.187",
"nltk>=3.8.1",
"xgboost>=1.7.5",
"lightgbm>=3.3.5",
"imbalanced-learn>=0.10.1",
"pytest-xdist>=3.3.1",
"ruff>=0.0.271",
]
proto = [
"grpcio-tools>=1.46.3",
"mypy-protobuf>=3.2.0",
"mypy-extensions>=0.4.3",
]
test = [
"pytest-cov>=4.0.0",
"pytest>=7.1.2",
"catboost>=1.1.1",
"requests-mock>=1.10.0",
"tensorflow-hub>=0.12.0",
"transformers>=4.27.4, <4.30",
"torch>=2.0.0",
"torchdata>=0.6.0",
"torchtext>=0.15.1",
"portalocker>=2.0.0",
"scikit-learn==1.0.2",
"tensorflow-macos>=2.8.0, <2.10; sys_platform == 'darwin' and platform_machine == 'arm64'",
"tensorflow>=2.8.0, <2.10; sys_platform != 'darwin' or platform_machine != 'arm64'",
"tensorflow-text>=2.8.0, <2.10; sys_platform != 'darwin' or platform_machine != 'arm64'",
]
doc = [
"furo>=2023.5.20",
"myst-parser>=1.0.0",
"sphinx-autobuild>=2021.3.14",
"sphinx>=6.1.3",
"sphinxcontrib-napoleon>=0.7",
"sphinx-autoapi>=2.1.0",
"sphinx-rtd-theme>=1.2.0",
"sphinx-tabs>=3.4.1",
"sphinx-design>=0.4.1",
"sphinx-copybutton>=0.5.2",
"sphinx-click>=4.4.0",
"nbsphinx>=0.9.2",
"sphinx-favicon>=1.0.1",
]
[tool.setuptools.packages.find]
include = ["giskard*"]
exclude = ["docs*", "tests*"]
[tool.setuptools.package-data]
giskard = ["**/*.html", "**/*.css", "**/*.js", "**/*.json", "**/*titanic.csv"]
[project.scripts]
giskard = "giskard.cli:cli"
[project.urls]
"Homepage" = "https://giskard.ai"
"Source Code" = "https://github.com/Giskard-AI/giskard"
"Bug Tracker" = "https://github.com/Giskard-AI/giskard/issues"
"Documentation" = "https://docs.giskard.ai/"
"Discord" = "https://discord.gg/ABvfpbu69R"
"Linkedin" = "https://www.linkedin.com/company/giskard-ai"
"Mastodon" = "https://fosstodon.org/@Giskard"
"Twitter" = "https://twitter.com/giskard_ai"
[project]
name = "giskard"
readme = "README.md"
license = { text = "Apache Software License 2.0" }
version = "2.0.0b6"
description = "The testing framework dedicated to ML models, from tabular to LLMs"
authors = [
{ name = "Giskard AI", email = "hello@giskard.ai" },
]
keywords = [
"Artificial Intelligence",
"Machine Learning",
"Quality",
"MLOps"
]
# Pypi classifiers: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
requires-python = ">=3.8.1,<3.11"
dependencies = [
"cloudpickle>=1.1.1",
"zstandard>=0.10.0 ",
"mlflow-skinny>=2",
"numpy>=1.22.0,<1.24.0", # shap doesn't work with numpy>1.24.0: module 'numpy' has no attribute 'int'
"scikit-learn>=1.0",
"scipy>=1.7.3,<1.9", # eli5 doesn't work with scipy>=1.9: cannot import name 'itemfreq' from 'scipy.stats'
"mixpanel>=4.4.0",
"requests>=2.19",
"pydantic>=1.7",
"tqdm>=4.42.0",
"setuptools>=39.1.0,<68.0.0",
"pandas>=1.3.4,<2",
"xxhash>=3.2.0",
"langdetect>=1.0.9",
"chardet", # text metadata
"jinja2>=3", # scan template (temporary)
"requests-toolbelt>=0.9.1",
]
[project.optional-dependencies]
llm = [
"transformers",
"torch",
"langchain",
"datasets",
"evaluate",
"bert_score",
]
server = [
"tenacity>=4.11.0",
"psutil>=5.4.6",
"click>=7.0",
"docker>=6.0.0",
"shap>=0.41.0",
"eli5>=0.12.0",
"ipython", # eli5.show_prediction doesn't work without ipython
"grpcio>=1.39.0,<=1.51.1",
"grpcio-status>=1.16.0,<=1.51.1",
"lockfile>=0.12.2",
"protobuf<=3.20.3",
"python-daemon>=2.2.2,<3",
"pycryptodome>=3.6.1",
"pyngrok>=6.0.0",
]
[tool.ruff]
line-length = 120
ignore = ["E501"]
[tool.black]
# https://github.com/psf/black
target-version = ['py38', 'py39', 'py310']
line-length = 120
color = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| env
| venv
| giskard/ml_worker/generated
)/
'''
[tool.isort]
# https://github.com/timothycrosley/isort/
py_version = 38
line_length = 100
known_typing = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
sections = ["FUTURE", "TYPING", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
profile = "black"
multi_line_output = 3
indent = 4
color_output = true
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
python_version = 3.8
pretty = true
show_traceback = true
color_output = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
plugins = ["pydantic.mypy"]
allow_redefinition = false
check_untyped_defs = false # TODO: Andrey: fix it gradually
disallow_untyped_defs = false # TODO: Andrey: fix it gradually
disallow_any_generics = false # TODO: Andrey: fix it gradually
disallow_incomplete_defs = false # TODO: Andrey: fix it gradually
ignore_missing_imports = true
implicit_reexport = false
no_implicit_optional = false # TODO: Andrey: fix it gradually
strict_equality = false # TODO: Andrey: fix it gradually
strict_optional = false # TODO: Andrey: fix it gradually
warn_no_return = false
warn_redundant_casts = true
warn_return_any = false
warn_unreachable = true
warn_unused_configs = false
warn_unused_ignores = false
[tool.pytest.ini_options]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs = ["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
doctest_optionflags = ["NUMBER", "NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
# Extra options:
addopts = [
"--strict-markers",
"--tb=short",
"--doctest-modules",
"--doctest-continue-on-failure",
]