-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
200 lines (172 loc) · 5.03 KB
/
pyproject.toml
File metadata and controls
200 lines (172 loc) · 5.03 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
[project]
name = "dreadnode"
version = "1.17.1"
description = "Dreadnode SDK"
authors = [{ name = "Nick Landers", email = "monoxgas@gmail.com" }]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.10,<3.14"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = [
"pydantic>=2.9.2,<3.0.0",
"httpx>=0.28.0,<1.0.0",
"logfire>=3.5.3,<=3.20.0",
"python-ulid>=3.0.0,<4.0.0",
"coolname>=2.2.0,<3.0.0",
"pandas>=2.2.3,<3.0.0",
"fsspec[s3]>=2023.1.0,<=2025.12.0",
"optuna>=4.5.0,<5.0.0",
"numpy<=2.3.5", # 3.10 support was dropped in 2.3.0
"universal-pathlib>=0.3.3,<0.4.0",
"loguru>=0.7.3",
"python-jsonpath>=2.0.1",
"pyyaml>=6.0.2",
"cyclopts>=4.2.0",
"aiofiles>=24.1.0,<25.0.0",
"rigging>=3.3.4",
]
[project.optional-dependencies]
training = [
"transformers>=5.0.0,<5.1.0",
"datasets>=4.0.0,<5.0.0",
"pyarrow>=22.0.0,<22.1.0",
]
multimodal = [
"pillow>=11.2.1,<12.0.0",
"soundfile>=0.13.1,<1.0.0",
"moviepy>=2.1.2,<3.0.0",
]
scoring = [
"sentence-transformers>=5.1.0,<6.0.0",
"rapidfuzz>=3.14.1",
"presidio-analyzer>=2.2.359,<3.0.0",
"scikit-learn>=1.7.1,<2.0.0",
"confusables>=1.2.0,<2.0.0",
"nltk>=3.9.1,<4.0.0",
"textblob>=0.19.0,<1.0.0",
"textstat>=0.7.10,<1.0.0",
]
transforms = ["art>=6.5,<7.0.0"]
all = ["dreadnode[training,multimodal,scoring]"]
[dependency-groups]
dev = [
"mypy>=1.8.0,<2.0.0",
"ruff>=0.11.6,<1.0.0",
"pre-commit>=4.0.0,<5.0.0",
"pytest>=8.3.3,<9.0.0",
"pytest-asyncio>=1.3.0,<1.4.0",
"types-protobuf>=5.29.1.20250208",
"pandas-stubs>=2.2.3.250308",
"types-requests>=2.32.0.20250306",
"ipykernel>=7.1.0,<7.2.0",
"ipywidgets>=8.1.7,<9.0.0",
"types-pyyaml>=6.0.12.20250822",
]
[project.scripts]
dreadnode = "dreadnode.__main__:run"
dn = "dreadnode.__main__:run"
[tool.poetry.plugins."pipx.run"]
dreadnode = 'dreadnode.__main__:run'
[project.urls]
Homepage = "https://github.com/dreadnode/sdk"
Repository = "https://github.com/dreadnode/sdk"
Documentation = "https://docs.dreadnode.io"
# Build
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["dreadnode"]
[tool.hatch.build.targets.sdist]
include = ["/dreadnode", "/tests", "/examples", "/README.md", "/LICENSE"]
# Dev
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.mypy]
strict = true
python_version = "3.10"
exclude = "tests"
[[tool.mypy.overrides]]
module = [
"dreadnode.data_types.*",
"dreadnode.scorers.*",
"dreadnode.transforms.*",
]
disable_error_code = ["unused-ignore", "import-untyped", "import-not-found"]
[tool.pyright]
typeCheckingMode = "off" # we prefer mypy and don't want to deal with small differences
[tool.ty.environment]
python-version = "3.10"
[tool.ty.src]
exclude = [".hooks", "tests"]
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101"]
[tool.coverage.run]
branch = true
source = ["scripts"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[tool.ruff]
target-version = "py310"
line-length = 100
extend-exclude = [
"*.ipynb", # jupyter notebooks
]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"E501", # line too long (we make best effort)
"TRY003", # long messages in exception classes
"EM", # picky message construction for exceptions
"C90", # mccabe complexity
"A002", # shadowing built-in
"D", # docstrings
"ANN", # annotations (handled by mypy)
"PLR0913", # too many arguments
"ERA001", # commented out code
"FIX002", # contains todo, consider fixing
"COM812", # disabled for formatting
"ISC001", # disabled for formatting
"PLC0415", # import should be at the top of the file
"TD003", # missing issue link on todos
"PLR2004", # magic values - too many false positives
]
[tool.ruff.format]
skip-magic-trailing-comma = false
[tool.ruff.lint.extend-per-file-ignores]
".hooks/**/*.py" = [
"ARG001", # temporary for rigging decorators
"T201", # printing is fine for hooks
]
"tests/**/*.py" = [
"INP001", # namespace not required for pytest
"SLF001", # allow access to private members
"PLR2004", # magic values
"S1", # security issues in tests are not relevant
"PERF", # performance issues in tests are not relevant
]
"dreadnode/transforms/language.py" = [
"RUF001", # intentional use of ambiguous unicode characters for airt
]
"dreadnode/agent/tools/interaction.py" = [
"T201", # print required for user interaction
]
"dreadnode/agent/hooks/notification.py" = [
"T201", # print required for terminal notifications
]