Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
47 lines (42 loc) · 1.62 KB
/
Copy pathpyproject.toml
File metadata and controls
47 lines (42 loc) · 1.62 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
[project]
name = "malvis-backend"
version = "0.1.0"
description = "Backend API for MalVis — explainable malware detection dashboard"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "Md. Rakibul Hasan" }]
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = ["notebooks", "artifacts", "frontend"]
[tool.ruff.lint]
# E,F = pyflakes/pycodestyle, I = isort, B = bugbear, UP = pyupgrade,
# S = bandit-lite, RUF = ruff's own, SIM = simplify, PT = pytest-style
select = ["E", "F", "I", "B", "UP", "S", "RUF", "SIM", "PT"]
ignore = [
"E501", # handled by formatter
"B008", # FastAPI uses Depends() in defaults — this is the framework idiom
"S101", # asserts are fine in tests
]
[tool.ruff.lint.per-file-ignores]
# S101 asserts | S105/S106 hard-coded passwords | S301/S403 pickle (fabricating
# fake artifacts) | S603 subprocess calls (worker harness in test_extractor)
"backend/tests/**" = ["S101", "S105", "S106", "S301", "S403", "S603"]
[tool.black]
line-length = 100
target-version = ["py311"]
extend-exclude = "notebooks|artifacts|frontend"
[tool.pytest.ini_options]
testpaths = ["backend/tests"]
# Put `backend/` on sys.path so `from app.main import app` works whether
# pytest is invoked from the repo root (CI) or from `backend/` (local
# `cd backend && pytest`). Without this, the import resolves only when
# the cwd is `backend/`.
pythonpath = ["backend"]
python_files = ["test_*.py"]
addopts = "-ra --strict-markers"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: tests that hit a real model or external service",
]