-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (118 loc) · 4.06 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (118 loc) · 4.06 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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "RAMPART"
version = "0.1.1.dev0"
description = "A pytest-native safety testing framework for agentic AI applications"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "Microsoft AI Red Team", email = "airedteam@microsoft.com" },
]
keywords = ["ai", "red-teaming", "safety", "security", "testing", "pytest", "agentic"]
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Security",
"Topic :: Software Development :: Testing",
]
dependencies = [
"jinja2>=3.1.6",
"pyrit==0.13.0",
"pytest>=9.0.3",
"pytest-asyncio>=1.3.0",
"pyyaml>=6.0.3",
]
[project.optional-dependencies]
onedrive = [
"msgraph-sdk>=1.57.0",
"azure-identity>=1.25.3"
]
[dependency-groups]
dev = [
"pre-commit>=4.5.1",
"pytest-cov>=6.1.0",
"pytest-xdist[psutil]>=3.8.0",
"ruff>=0.15.10",
"ty>=0.0.49",
]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocs-git-revision-date-localized-plugin>=1.5.2",
"mkdocstrings[python]>=1.0.4",
]
[project.urls]
Homepage = "https://github.com/microsoft/RAMPART"
Repository = "https://github.com/microsoft/RAMPART"
Issues = "https://github.com/microsoft/RAMPART/issues"
[project.entry-points.pytest11]
rampart = "rampart.pytest_plugin.plugin"
[tool.setuptools.packages.find]
exclude = ["site*", "docs*", "tests*", "scripts*"]
[tool.setuptools.package-data]
rampart = [
"drivers/prompts/*.yaml",
"evaluators/prompts/*.yaml",
]
[tool.coverage.run]
source = ["rampart"]
omit = ["tests/*"]
[tool.coverage.report]
fail_under = 80
show_missing = true
skip_empty = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
markers = [
"harm(*categories): categorize test by harm type",
"trial(n=, threshold=): statistical repetition of a test",
"slow: marks tests that spawn subprocess pytest runs; deselect with -m 'not slow'",
]
filterwarnings = [
"ignore:.*invalid escape sequence:DeprecationWarning:.*confusables.*",
"ignore:.*invalid escape sequence:SyntaxWarning:.*confusables.*",
]
[tool.ruff.lint]
select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"S101", # assert is pytest's API
"D100", "D101", "D102", "D104", "D107", # no docstrings needed
"ANN001", "ANN201", "ANN202", "ANN401", # no type annotations needed
"PLR2004", # magic values in assertions are fine
"ARG001", "ARG002", # unused args (fixtures, stubs)
"PLC0415", # imports inside functions for isolation
"SLF001", # testing private members is valid
"TRY003", "EM101", "EM102", # exception message style
"BLE001", # catching Exception in tests
"TRY301", # raise in try blocks
"S108", # /tmp usage
"PT017", "PT018", # assertion style
"ASYNC240", # pathlib in async tests
"PERF401", "RUF015", "PTH123", # micro-optimizations / style
]
[tool.ruff.lint.flake8-copyright]
notice-rgx = "Copyright \\(c\\) Microsoft Corporation\\.\\s*\\n.*Licensed under the MIT license"
[tool.ruff.lint.isort]
known-first-party = ["rampart"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 10
[tool.ty.environment]
python-version = "3.11"
[tool.ty.src]
include = ["rampart", "tests"]
[tool.uv.sources]
pyrit = { git = "https://github.com/microsoft/PyRIT", rev = "6dc8b94139757390286bbce7d53c1f7e58e66e29" } # v0.13.0