forked from UKGovernmentBEIS/inspect_ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (159 loc) · 4.36 KB
/
Copy pathpyproject.toml
File metadata and controls
179 lines (159 loc) · 4.36 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies.dev = { file = ["requirements-dev.txt"] }
optional-dependencies.doc = { file = ["requirements-doc.txt"] }
optional-dependencies.dist = { file = ["requirements-dist.txt"] }
[tool.setuptools_scm]
git_describe_command = [
'git',
'describe',
'--dirty',
'--tags',
'--long',
'--match',
'[0-9]*.[0-9]*.[0-9]*',
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["inspect_ai*"]
[tool.setuptools.package-data]
inspect_ai = [
"binaries/*",
"tool/_sandbox_tools_utils/sandbox_tools_version.txt",
"**/*.tcss",
"**/*.yml",
"_view/dist/**/*",
"**/*.jsonl",
"_view/log-schema.json",
"py.typed",
]
[tool.ruff]
extend-exclude = ["docs"]
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # flake8
"D", # pydocstyle
"I", # isort
"B", # flake8-bugbear
"SIM101", # duplicate isinstance
# "RET", # flake8-return
# "RUF", # ruff rules
"DTZ",
"TID251", # banned-api
"PLE", # pylint errors
]
ignore = [
"E203",
"E501",
"D10",
"D212",
"D415",
"B006",
"B007",
"B008",
"B009",
"B010",
"B011",
"B017",
"B027",
"B028",
"B039",
"B904",
"B905",
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.TypedDict".msg = "Use typing_extensions.TypedDict (Pydantic requires it on Python < 3.12)"
"typing.is_typeddict".msg = "Use typing_extensions.is_typeddict (typing.is_typeddict doesn't recognize typing_extensions.TypedDict subclasses)"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-rA --doctest-modules --color=yes"
testpaths = ["tests"]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
norecursedirs = [
"tests/test_helpers",
"tests/test_package",
"tests/test_task_list",
]
log_level = "WARNING"
[tool.mypy]
exclude = [
"tests/test_package",
"build",
"(?:^|/)_resources/",
"examples/bridge",
"examples/evals_in_eval",
"examples/hooks",
"examples/http_proxy",
"src/inspect_tool_support",
"src/inspect_sandbox_tools",
]
warn_unused_ignores = true
no_implicit_reexport = true
strict_equality = true
enable_error_code = "possibly-undefined"
warn_redundant_casts = true
warn_unused_configs = true
# This mypy_path config is a bit odd, it's included to get mypy to resolve
# imports correctly in test files. For example, imports such as
# `from test_helpers.utils import ...` fail mypy without this configuration,
# despite actually working when running tests.
#
# Revisit this if it interferes with mypy running on `src` due to name
# conflicts, but that will hopefully be unlikely.
mypy_path = "tests"
[[tool.mypy.overrides]]
module = ["inspect_ai.*"]
warn_return_any = true
disallow_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
extra_checks = true
disable_error_code = "unused-ignore"
[tool.check-wheel-contents]
ignore = ["W002", "W009"]
[project]
name = "inspect_ai"
description = "Framework for large language model evaluations"
authors = [{ name = "UK AI Security Institute" }]
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT License" }
dynamic = ["version", "dependencies", "optional-dependencies"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
"Operating System :: OS Independent",
]
[project.urls]
Documentation = "https://inspect.aisi.org.uk/"
"Source Code" = "https://github.com/UKGovernmentBEIS/inspect_ai"
"Issue Tracker" = "https://github.com/UKGovernmentBEIS/inspect_ai/issues"
[project.scripts]
inspect = "inspect_ai._cli.main:main"
[tool.typos.default.extend-words]
ba = "ba"
lsat = "lsat"
[dependency-groups]
dev = ["inspect_ai[dev]"]
[tool.uv]
cache-keys = [{ git = { commit = true } }, { file = "pyproject.toml" }]
default-groups = ["dev"]