Skip to content

Commit b3c07bb

Browse files
committed
chore(deps): add pyatr (ATR rail) as optional extra + dev dependency
Installs pyatr so tests/test_atr_rail.py runs in CI (previously ModuleNotFoundError: No module named 'pyatr'). Mirrors the yara-python jailbreak-rail pattern: optional dependency, atr extra, included in all, and dev group. Signed-off-by: eeee2345 <217509886+eeee2345@users.noreply.github.com>
1 parent 97f3bfd commit b3c07bb

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

poetry.lock

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ chainlit = { version = "^2.11.0", optional = true }
114114
transformers = { version = ">=4.35.0", optional = true }
115115
torch = { version = ">=2.0.0", optional = true }
116116

117+
# agent threat rules (ATR) detection rail
118+
pyatr = { version = ">=0.2.6", optional = true }
119+
117120
[tool.poetry.extras]
118121
sdd = ["presidio-analyzer", "presidio-anonymizer"]
119122
eval = ["tqdm", "numpy", "streamlit", "tornado"]
@@ -124,6 +127,7 @@ multilingual = ["fast-langdetect"]
124127
server = ["aiofiles", "openai", "fastapi", "starlette", "uvicorn", "watchdog"]
125128
chat-ui = ["chainlit"]
126129
hf-classifier = ["transformers", "torch"]
130+
atr = ["pyatr"]
127131
# Poetry does not support recursive dependencies, so we need to add all the dependencies here.
128132
# I also support their decision. There is no PEP for recursive dependencies, but it has been supported in pip since version 21.2.
129133
# It is here for backward compatibility.
@@ -146,6 +150,7 @@ all = [
146150
"chainlit",
147151
"transformers",
148152
"torch",
153+
"pyatr",
149154
]
150155

151156
[tool.poetry.group.dev]
@@ -166,6 +171,7 @@ yara-python = "^4.5.1"
166171
opentelemetry-api = "^1.34.1"
167172
opentelemetry-sdk = "^1.34.1"
168173
fast-langdetect = ">=1.0.0"
174+
pyatr = ">=0.2.6"
169175
openai = ">=1.0.0,<3.0.0"
170176
# server (optional at runtime, required for tests/server/)
171177
fastapi = ">=0.103.0"

0 commit comments

Comments
 (0)