Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (120 loc) · 3.67 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (120 loc) · 3.67 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
[project]
name = "mirrorneuron-api"
dynamic = ["version"]
description = "MirrorNeuron REST API"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
classifiers = [
"Programming Language :: Python :: 3",
]
dependencies = [
"mirrorneuron-python-sdk[local-source]>=1.3.58.dev83,<2.0",
"mn-python-sdk-common>=1.3.58.dev0,<2.0",
"mn-python-sdk-web-ui>=1.3.58.dev0,<2.0",
"mn-python-sdk-mcp>=1.2,<2.0",
"fastapi>=0.100.0",
"mcp>=2.2,<3",
"python-multipart>=0.0.9",
"uvicorn>=0.23.0",
"websockets>=14,<16"
]
[project.optional-dependencies]
test = [
"httpx>=0.27.0",
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
]
[project.scripts]
mn-api = "mn_api.main:start"
mn-web-ui-server = "mn_api.web_ui_server:start"
[build-system]
requires = ["setuptools>=77", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
fallback_version = "0.0.0"
local_scheme = "no-local-version"
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F"]
[tool.ruff.lint.per-file-ignores]
"mn_api/blueprints.py" = ["F401", "F841"]
"mn_api/config.py" = ["E402"]
"mn_api/path_utils.py" = ["E402", "F401"]
"mn_api/state.py" = ["E402"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-config",
"--strict-markers",
"--cov=mn_api",
"--cov-report=term-missing:skip-covered",
"--cov-report=xml",
"--cov-fail-under=85",
]
[tool.coverage.run]
branch = true
source = ["mn_api"]
omit = [
# These are internal runtime projection engines retained while their pure
# service helpers are extracted from the retired HTTP routers. Canonical
# REST behavior is measured through routes/v1 and contract tests.
"mn_api/routes/blueprints.py",
"mn_api/routes/jobs.py",
"mn_api/routes/models.py",
"mn_api/routes/runs.py",
"mn_api/routes/system.py",
# Large non-HTTP blueprint/runtime projection engines have their own
# focused helper suites. The REST gate measures the canonical boundary.
"mn_api/blueprints.py",
"mn_api/agent_graph.py",
"mn_api/job_activity.py",
]
[tool.coverage.report]
precision = 1
show_missing = true
skip_covered = true
exclude_also = [
"if __name__ == .__main__.:",
"def start\\(",
"def run_git\\(",
"def clone_git_blueprint_repo\\(",
"def run_mn_blueprint_validate\\(",
"def run_mn_blueprint_run\\(",
"def run_blueprint_launch\\(",
"def run_blueprint_record\\(",
"def run_launch_preflight\\(",
"def prepare_openshell_custom_images\\(",
"def build_openshell_sandbox_image\\(",
"def start_blueprint_pre_launch_hook\\(",
"def register_post_launch_hook\\(",
"def wait_for_pre_launch_ready\\(",
"def apply_pre_launch_ready_metadata\\(",
"def terminate_pre_launch_process\\(",
"def process_group_id_for_pid\\(",
"def process_session_id_for_pid\\(",
"def process_group_exists\\(",
"def pid_exists\\(",
"def wait_until_gone\\(",
"def reap_child_pid\\(",
"def wait_for_pid_exit\\(",
"def terminate_process_group\\(",
"def terminate_pid\\(",
"def cleanup_run_process\\(",
"def command_for_pid\\(",
"def listener_pids_for_port\\(",
"def cleanup_owned_port_listeners\\(",
"def port_listener_is_cleanup_owned\\(",
"def cleanup_post_launch_hook\\(",
"def cleanup_blueprint_run_processes\\(",
"def start_background_event_relay_if_needed\\(",
"def stream_job_workflow_progress\\(",
"async def websocket_job_workflow_progress\\(",
"async def websocket_runs_monitor\\(",
"def stream_run_observability\\(",
"async def websocket_run_stream\\(",
"def stream_run_resources\\(",
"async def websocket_run_resources\\(",
]