Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
83 lines (74 loc) · 2.17 KB
/
Copy pathpyproject.toml
File metadata and controls
83 lines (74 loc) · 2.17 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
[project]
name = "openrange"
version = "0.1.0"
description = "Open-source cyber range platform (workspace root)"
requires-python = ">=3.12"
[dependency-groups]
dev = [
"pytest>=8.3",
"pytest-asyncio>=0.25",
"ruff>=0.8.4",
"mypy>=1.14",
"pre-commit>=4.0",
"bandit>=1.8",
"pip-audit>=2.8",
]
[tool.uv.workspace]
members = ["apps/*", "packages/*"]
# Node-based packages/apps are pnpm workspace members, not uv members.
exclude = [
"apps/web",
"apps/worker",
"packages/ui",
"packages/contracts",
"packages/tsconfig",
]
[tool.uv.sources]
openrange-config = { workspace = true }
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["apps", "packages", "tests"]
extend-exclude = ["rooms", "platform"] # frozen legacy baseline; see docs/legacy/migration-inventory.md
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # import order
"B", # bugbear
"UP", # pyupgrade
"S", # bandit
"ASYNC", # async hygiene
"RUF",
]
ignore = [
"S101", # assert is how tests work; bandit rule stays for non-test code via per-file-ignores
]
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = ["S101", "S105", "S106"]
"**/solver/**" = ["S101"]
"content/rooms/**" = ["S101", "S105", "S106"]
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
plugins = []
files = ["apps/api/src/openrange", "packages/config/src/openrange"]
mypy_path = "apps/api/src:packages/config/src"
namespace_packages = true
explicit_package_bases = true
[[tool.mypy.overrides]]
module = ["celery.*", "meilisearch.*", "boto3.*", "botocore.*", "docker.*", "pyotp.*", "webauthn.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
# apps/lab-gateway is excluded from the uv workspace (own lockfile), so its
# tests only run in their own environment, not in the root one.
testpaths = ["tests", "apps/api/tests", "apps/lab-runner/tests", "packages/*/tests"]
addopts = "-q --strict-markers"
asyncio_mode = "auto"
markers = [
"integration: requires backing services (postgres/redis/minio/meilisearch)",
"content: content bundle validation and solvers",
"e2e: browser end-to-end journeys",
"slow: long-running verification",
]