forked from rocketride-org/rocketride-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (121 loc) · 4.55 KB
/
Copy pathpyproject.toml
File metadata and controls
135 lines (121 loc) · 4.55 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
# =============================================================================
# MIT License
# Copyright (c) 2026 Aparavi Software AG
#
# This file contains shared Python tooling configuration for the monorepo.
# Individual packages may extend or override these settings.
# =============================================================================
[tool.ruff]
# Line length disabled - set high to avoid enforcement
line-length = 120
# Target Python version
target-version = "py310"
# Directories to exclude from linting.
# force-exclude makes the list apply even when paths are passed explicitly
# (lefthook's `ruff check {staged_files}`), which is what keeps the vendored
# ANTLR-generated parsers out of lint.
force-exclude = true
exclude = [
".git",
".venv",
"venv",
"__pycache__",
"build",
"dist",
"node_modules",
".eggs",
"*.egg-info",
# Vendored third-party code (Apache-2.0) incl. ANTLR-generated parsers —
# not held to local style; provenance in ai/common/graph/age/README.md
"packages/ai/src/ai/common/graph/age/_agtype",
"packages/ai/src/ai/common/graph/age/_cypher",
]
[tool.ruff.format]
# Use single quotes for strings (except docstrings)
quote-style = "single"
# Format docstrings
docstring-code-format = true
# Line ending style
line-ending = "auto"
[tool.ruff.lint]
# Enable general linting, quote rules, and docstyle (matching engine.3.00)
select = ["E", "F", "Q", "D"]
# Allow Ruff to auto-fix docstring and quote issues
fixable = ["D", "Q"]
# Rules to ignore
# D100 Ignore no public module docstring
# D101 Ignore no public class docstring
# D102 Ignore no public method docstring
# D103 Ignore no public function docstring
# D104 Ignore no public package docstring
# D105 Ignore undocumented magic method
# D106 Ignore undocumented public nested class
# D107 Ignore undocumented public __init__
# D200 Ignore single line docstring
# D205 1 blank line required between summary line and description
# D301 Use `r"""` if any backslashes in a docstring
# D400 First line should end with a period
# D401 First line should be in imperative mood
# E203 Ignore whitespace before ':' - ruff puts it there and then produces an error on it
# E402 Ignore missing module level docstring - we need depends first
# E501 Line too long
ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D200", "D205", "D301", "D400", "D401", "E203", "E402", "E501"]
[tool.ruff.lint.flake8-quotes]
# Enforce single quotes for inline strings
inline-quotes = "single"
[tool.ruff.lint.pydocstyle]
# Use PEP 257 docstring conventions
convention = "pep257"
[tool.pytest.ini_options]
# Pytest configuration
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Default per-test timeout (seconds). Prevents individual tests from hanging
# indefinitely when the server is unresponsive or a connection leaks.
# Override per-test with @pytest.mark.timeout(seconds).
timeout = 600
addopts = [
"-v",
"-ra", # summary section reports reasons for skipped/xfailed/failed tests
"--tb=short",
"--strict-markers",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]
filterwarnings = [
# starlette deprecates its httpx-based testclient at fastapi.testclient
# IMPORT time, so every suite importing fastapi's TestClient trips it.
# The real fix is moving the test dependency to httpx2 — a constraints
# decision owned by the engine's dependency set, not something a test can
# address. Until that upgrade lands, silence exactly this message.
"ignore:Using `httpx` with `starlette\\.testclient` is deprecated",
]
asyncio_mode = "auto"
# =============================================================================
# Coverage configuration (consumed by pytest-cov / coverage.py)
#
# Source path is NOT set here. It is passed on the command line in
# packages/ai/scripts/tasks.js as an absolute filesystem path
# (packages/ai/src/ai). Two copies of the ai package live on disk
# (packages/ai/src/ai and dist/server/ai) and the package-name form
# (`source = ["ai"]`) resolves to the wrong copy at startup, producing 0 %
# coverage. The absolute-path form bypasses that resolution.
# =============================================================================
[tool.coverage.run]
branch = true
omit = [
"*/tests/*",
"*/__init__.py",
]
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]