victor-coding 0.5.6__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {victor_coding-0.5.6 → victor_coding-0.7.1}/PKG-INFO +18 -5
- victor_coding-0.7.1/pyproject.toml +200 -0
- victor_coding-0.7.1/tests/test_api_router_provider.py +46 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/tests/test_coding_vertical_rl.py +3 -3
- {victor_coding-0.5.6 → victor_coding-0.7.1}/tests/test_coding_vertical_teams.py +4 -7
- {victor_coding-0.5.6 → victor_coding-0.7.1}/tests/test_coding_vertical_workflows.py +6 -6
- victor_coding-0.7.1/tests/test_enhanced_integration.py +426 -0
- victor_coding-0.7.1/tests/test_extension_cache.py +799 -0
- victor_coding-0.7.1/victor_coding/__init__.py +117 -0
- victor_coding-0.7.1/victor_coding/api/__init__.py +11 -0
- victor_coding-0.7.1/victor_coding/api/router_provider.py +113 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/assistant.py +104 -22
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/capabilities.py +28 -25
- victor_coding-0.7.1/victor_coding/codebase/__init__.py +20 -0
- victor_coding-0.7.1/victor_coding/codebase/architecture_analyzer.py +384 -0
- victor_coding-0.7.1/victor_coding/codebase/ccg_builder.py +1194 -0
- victor_coding-0.7.1/victor_coding/codebase/chunker.py +1496 -0
- victor_coding-0.7.1/victor_coding/codebase/ignore_patterns.py +134 -0
- victor_coding-0.7.1/victor_coding/codebase/indexer.py +3411 -0
- victor_coding-0.7.1/victor_coding/codebase/query_expander.py +374 -0
- victor_coding-0.7.1/victor_coding/codebase/symbol_extractor.py +238 -0
- victor_coding-0.7.1/victor_coding/codebase/symbol_resolver.py +43 -0
- victor_coding-0.7.1/victor_coding/codebase/symbol_store.py +1497 -0
- victor_coding-0.7.1/victor_coding/codebase/tree_sitter_analysis.py +460 -0
- victor_coding-0.7.1/victor_coding/codebase/tree_sitter_extractor.py +684 -0
- victor_coding-0.7.1/victor_coding/codebase/tree_sitter_manager.py +102 -0
- victor_coding-0.7.1/victor_coding/codebase/tree_sitter_service.py +339 -0
- victor_coding-0.7.1/victor_coding/codebase/unified_extractor.py +419 -0
- victor_coding-0.7.1/victor_coding/codebase_analyzer.py +3468 -0
- victor_coding-0.7.1/victor_coding/completion/__init__.py +119 -0
- victor_coding-0.7.1/victor_coding/completion/manager.py +511 -0
- victor_coding-0.7.1/victor_coding/completion/protocol.py +51 -0
- victor_coding-0.7.1/victor_coding/completion/provider.py +363 -0
- victor_coding-0.7.1/victor_coding/completion/registry.py +305 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/composed_chains.py +3 -10
- victor_coding-0.7.1/victor_coding/conversation_enhanced.py +397 -0
- victor_coding-0.7.1/victor_coding/coverage/__init__.py +77 -0
- victor_coding-0.7.1/victor_coding/coverage/manager.py +538 -0
- victor_coding-0.7.1/victor_coding/coverage/parser.py +572 -0
- victor_coding-0.7.1/victor_coding/coverage/protocol.py +383 -0
- victor_coding-0.7.1/victor_coding/coverage/visualizer.py +635 -0
- victor_coding-0.7.1/victor_coding/docgen/__init__.py +115 -0
- victor_coding-0.7.1/victor_coding/docgen/formatter.py +629 -0
- victor_coding-0.7.1/victor_coding/docgen/manager.py +445 -0
- victor_coding-0.7.1/victor_coding/docgen/parser.py +784 -0
- victor_coding-0.7.1/victor_coding/docgen/protocol.py +209 -0
- victor_coding-0.7.1/victor_coding/editing/__init__.py +27 -0
- victor_coding-0.7.1/victor_coding/editing/editor.py +591 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/enrichment.py +6 -3
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/escape_hatches.py +1 -1
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/handlers.py +21 -16
- victor_coding-0.7.1/victor_coding/languages/__init__.py +96 -0
- victor_coding-0.7.1/victor_coding/languages/base.py +738 -0
- victor_coding-0.7.1/victor_coding/languages/manager.py +397 -0
- victor_coding-0.7.1/victor_coding/languages/registry.py +384 -0
- victor_coding-0.7.1/victor_coding/languages/tiers.py +446 -0
- victor_coding-0.7.1/victor_coding/lsp/__init__.py +82 -0
- victor_coding-0.7.1/victor_coding/lsp/client.py +561 -0
- victor_coding-0.7.1/victor_coding/lsp/config.py +283 -0
- victor_coding-0.7.1/victor_coding/lsp/manager.py +482 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/middleware.py +6 -6
- victor_coding-0.7.1/victor_coding/mode_config.py +128 -0
- victor_coding-0.7.1/victor_coding/plugin.py +101 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/prompts.py +1 -1
- victor_coding-0.7.1/victor_coding/protocols.py +669 -0
- victor_coding-0.7.1/victor_coding/refactor/__init__.py +121 -0
- victor_coding-0.7.1/victor_coding/refactor/analyzer.py +553 -0
- victor_coding-0.7.1/victor_coding/refactor/manager.py +549 -0
- victor_coding-0.7.1/victor_coding/refactor/protocol.py +256 -0
- victor_coding-0.7.1/victor_coding/review/__init__.py +124 -0
- victor_coding-0.7.1/victor_coding/review/analyzers.py +944 -0
- victor_coding-0.7.1/victor_coding/review/manager.py +463 -0
- victor_coding-0.7.1/victor_coding/review/protocol.py +262 -0
- victor_coding-0.7.1/victor_coding/review/rules.py +517 -0
- victor_coding-0.7.1/victor_coding/rl/__init__.py +60 -0
- victor_coding-0.7.1/victor_coding/rl/config.py +195 -0
- victor_coding-0.7.1/victor_coding/rl/hooks.py +393 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/safety.py +12 -13
- victor_coding-0.7.1/victor_coding/safety_enhanced.py +384 -0
- victor_coding-0.7.1/victor_coding/service_provider.py +137 -0
- victor_coding-0.7.1/victor_coding/skills.py +122 -0
- victor_coding-0.7.1/victor_coding/teams/__init__.py +186 -0
- victor_coding-0.7.1/victor_coding/teams/personas.py +846 -0
- victor_coding-0.7.1/victor_coding/teams/specs.py +718 -0
- victor_coding-0.7.1/victor_coding/testgen/__init__.py +112 -0
- victor_coding-0.7.1/victor_coding/testgen/analyzer.py +341 -0
- victor_coding-0.7.1/victor_coding/testgen/generator.py +849 -0
- victor_coding-0.7.1/victor_coding/testgen/manager.py +408 -0
- victor_coding-0.7.1/victor_coding/testgen/protocol.py +182 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding/tool_dependencies.py +36 -4
- victor_coding-0.7.1/victor_coding/tools/__init__.py +0 -0
- victor_coding-0.7.1/victor_coding/tools/code_executor_tool.py +600 -0
- victor_coding-0.7.1/victor_coding/tools/code_intelligence_tool.py +370 -0
- victor_coding-0.7.1/victor_coding/tools/code_search_tool.py +3939 -0
- victor_coding-0.7.1/victor_coding/tools/graph_tool.py +4062 -0
- victor_coding-0.7.1/victor_coding/workflows/__init__.py +99 -0
- victor_coding-0.7.1/victor_coding/workflows/bugfix.py +203 -0
- victor_coding-0.7.1/victor_coding/workflows/feature.py +215 -0
- victor_coding-0.7.1/victor_coding/workflows/provider.py +159 -0
- victor_coding-0.7.1/victor_coding/workflows/review.py +280 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding.egg-info/PKG-INFO +18 -5
- victor_coding-0.7.1/victor_coding.egg-info/SOURCES.txt +108 -0
- victor_coding-0.7.1/victor_coding.egg-info/entry_points.txt +55 -0
- victor_coding-0.7.1/victor_coding.egg-info/requires.txt +28 -0
- victor_coding-0.5.6/pyproject.toml +0 -86
- victor_coding-0.5.6/victor_coding/__init__.py +0 -84
- victor_coding-0.5.6/victor_coding/mode_config.py +0 -191
- victor_coding-0.5.6/victor_coding/service_provider.py +0 -231
- victor_coding-0.5.6/victor_coding.egg-info/SOURCES.txt +0 -26
- victor_coding-0.5.6/victor_coding.egg-info/entry_points.txt +0 -2
- victor_coding-0.5.6/victor_coding.egg-info/requires.txt +0 -9
- {victor_coding-0.5.6 → victor_coding-0.7.1}/LICENSE +0 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/README.md +0 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/setup.cfg +0 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/tests/test_coding_capabilities.py +0 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding.egg-info/dependency_links.txt +0 -0
- {victor_coding-0.5.6 → victor_coding-0.7.1}/victor_coding.egg-info/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: victor-coding
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Coding vertical for Victor AI - Software development, debugging, and code generation
|
|
5
5
|
Author-email: Vijaykumar Singh <singhvjd@gmail.com>
|
|
6
6
|
Maintainer-email: Vijaykumar Singh <singhvjd@gmail.com>
|
|
7
|
-
License
|
|
7
|
+
License: Apache-2.0
|
|
8
8
|
Project-URL: Homepage, https://github.com/vjsingh1984/victor-coding
|
|
9
9
|
Project-URL: Repository, https://github.com/vjsingh1984/victor-coding
|
|
10
10
|
Project-URL: Documentation, https://docs.victor.dev/verticals/coding
|
|
@@ -13,21 +13,34 @@ Keywords: victor,vertical,coding,development,debugging,refactoring
|
|
|
13
13
|
Classifier: Development Status :: 4 - Beta
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Topic :: Software Development
|
|
20
|
-
Requires-Python: >=3.
|
|
19
|
+
Requires-Python: >=3.11
|
|
21
20
|
Description-Content-Type: text/markdown
|
|
22
21
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: victor-
|
|
22
|
+
Requires-Dist: victor-contracts[yaml]<1.0,>=0.6.0
|
|
23
|
+
Requires-Dist: numpy<2.3,>=1.24
|
|
24
|
+
Requires-Dist: victor-codegraph[treesitter]>=0.1.0
|
|
25
|
+
Requires-Dist: defusedxml<1.0,>=0.7
|
|
26
|
+
Provides-Extra: runtime
|
|
27
|
+
Requires-Dist: victor-ai<1.0,>=0.6.0; extra == "runtime"
|
|
28
|
+
Provides-Extra: native
|
|
29
|
+
Provides-Extra: proximadb
|
|
30
|
+
Requires-Dist: proximadb<0.3,>=0.2; extra == "proximadb"
|
|
31
|
+
Provides-Extra: codegraph
|
|
32
|
+
Requires-Dist: victor-codegraph<1.0,>=0.1.0; extra == "codegraph"
|
|
24
33
|
Provides-Extra: dev
|
|
25
34
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
26
35
|
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
27
36
|
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-benchmark>=5.0; extra == "dev"
|
|
28
39
|
Requires-Dist: black==26.1.0; extra == "dev"
|
|
29
40
|
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
30
41
|
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
42
|
+
Provides-Extra: native-dev
|
|
43
|
+
Requires-Dist: maturin<2.0,>=1.0; extra == "native-dev"
|
|
31
44
|
Dynamic: license-file
|
|
32
45
|
|
|
33
46
|
# victor-coding
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=61.0",
|
|
4
|
+
"wheel",
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "victor-coding"
|
|
10
|
+
version = "0.7.1"
|
|
11
|
+
description = "Coding vertical for Victor AI - Software development, debugging, and code generation"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
|
+
license = {text = "Apache-2.0"}
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "Vijaykumar Singh", email = "singhvjd@gmail.com" },
|
|
17
|
+
]
|
|
18
|
+
maintainers = [
|
|
19
|
+
{ name = "Vijaykumar Singh", email = "singhvjd@gmail.com" },
|
|
20
|
+
]
|
|
21
|
+
keywords = [
|
|
22
|
+
"victor",
|
|
23
|
+
"vertical",
|
|
24
|
+
"coding",
|
|
25
|
+
"development",
|
|
26
|
+
"debugging",
|
|
27
|
+
"refactoring",
|
|
28
|
+
]
|
|
29
|
+
classifiers = [
|
|
30
|
+
"Development Status :: 4 - Beta",
|
|
31
|
+
"Intended Audience :: Developers",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Topic :: Software Development",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"victor-contracts[yaml]>=0.6.0,<1.0", # Definition-layer contract for external verticals
|
|
39
|
+
"numpy>=1.24,<2.3", # Required by victor.storage.embeddings; numba-compatible
|
|
40
|
+
"victor-codegraph[treesitter]>=0.1.0", # Shared code->CPG chunker (ADR-014); [treesitter] supplies the grammars the delegation parses JS/Go/TS/Rust with
|
|
41
|
+
"defusedxml>=0.7,<1.0", # XXE-hardened XML parsing for coverage reports
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.optional-dependencies]
|
|
45
|
+
runtime = [
|
|
46
|
+
"victor-ai>=0.6.0,<1.0", # Runtime support - optional, contract-first architecture
|
|
47
|
+
]
|
|
48
|
+
native = [
|
|
49
|
+
# Native extensions are handled by maturin
|
|
50
|
+
# Install with: pip install -e .[native]
|
|
51
|
+
# or build with: maturin develop --release
|
|
52
|
+
]
|
|
53
|
+
# ProximaDB embedding provider (optional backend).
|
|
54
|
+
# Imported lazily with graceful ImportError fallback in
|
|
55
|
+
# victor_coding/codebase/embeddings/proximadb_provider.py. Pin kept identical
|
|
56
|
+
# to victor-ai's proximadb extra so the backend version stays aligned.
|
|
57
|
+
proximadb = [
|
|
58
|
+
"proximadb>=0.2,<0.3",
|
|
59
|
+
]
|
|
60
|
+
# Shared code->CPG chunker (ADR-014). Opt-in: when installed AND
|
|
61
|
+
# VICTOR_CODING_USE_CODEGRAPH=1, CodeChunker delegates to it. Published on PyPI
|
|
62
|
+
# (`pip install victor-codegraph`); for local source work: pip install -e ../../victor-codegraph
|
|
63
|
+
codegraph = [
|
|
64
|
+
"victor-codegraph>=0.1.0,<1.0",
|
|
65
|
+
]
|
|
66
|
+
dev = [
|
|
67
|
+
"pytest>=8.0",
|
|
68
|
+
"pytest-asyncio>=0.23",
|
|
69
|
+
"pytest-cov>=4.1",
|
|
70
|
+
"pytest-xdist>=3.0",
|
|
71
|
+
"pytest-benchmark>=5.0",
|
|
72
|
+
"black==26.1.0",
|
|
73
|
+
"ruff>=0.5",
|
|
74
|
+
"mypy>=1.10",
|
|
75
|
+
]
|
|
76
|
+
native-dev = [
|
|
77
|
+
"maturin>=1.0,<2.0", # Build Rust extensions
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
[project.urls]
|
|
81
|
+
Homepage = "https://github.com/vjsingh1984/victor-coding"
|
|
82
|
+
Repository = "https://github.com/vjsingh1984/victor-coding"
|
|
83
|
+
Documentation = "https://docs.victor.dev/verticals/coding"
|
|
84
|
+
Issues = "https://github.com/vjsingh1984/victor-coding/issues"
|
|
85
|
+
|
|
86
|
+
[project.entry-points."victor.plugins"]
|
|
87
|
+
coding = "victor_coding.plugin:plugin"
|
|
88
|
+
|
|
89
|
+
[project.entry-points."victor.tool_dependencies"]
|
|
90
|
+
coding = "victor_coding.tool_dependencies:get_provider"
|
|
91
|
+
|
|
92
|
+
[project.entry-points."victor.safety_rules"]
|
|
93
|
+
coding = "victor_coding.safety:create_all_coding_safety_rules"
|
|
94
|
+
|
|
95
|
+
[project.entry-points."victor.api_routers"]
|
|
96
|
+
coding = "victor_coding.api.router_provider:get_fastapi_router_provider"
|
|
97
|
+
|
|
98
|
+
[project.entry-points."victor.prompt_contributors"]
|
|
99
|
+
coding = "victor_coding.prompts:CodingPromptContributor"
|
|
100
|
+
|
|
101
|
+
[project.entry-points."victor.mode_configs"]
|
|
102
|
+
coding = "victor_coding.mode_config:CodingModeConfigProvider"
|
|
103
|
+
|
|
104
|
+
[project.entry-points."victor.workflow_providers"]
|
|
105
|
+
coding = "victor_coding.workflows.provider:CodingWorkflowProvider"
|
|
106
|
+
|
|
107
|
+
[project.entry-points."victor.capability_providers"]
|
|
108
|
+
coding = "victor_coding.capabilities:CodingCapabilityProvider"
|
|
109
|
+
|
|
110
|
+
[project.entry-points."victor.service_providers"]
|
|
111
|
+
coding = "victor_coding.service_provider:CodingServiceProvider"
|
|
112
|
+
coding-performance = "victor_coding.performance.service_provider:PerformanceServiceProvider"
|
|
113
|
+
|
|
114
|
+
[project.entry-points."victor.team_spec_providers"]
|
|
115
|
+
coding = "victor_coding.teams:CodingTeamSpecProvider"
|
|
116
|
+
|
|
117
|
+
# Victor extension protocol implementations
|
|
118
|
+
[project.entry-points."victor.extension.protocols"]
|
|
119
|
+
coding-tools = "victor_coding.protocols:CodingToolProvider"
|
|
120
|
+
coding-safety = "victor_coding.protocols:CodingSafetyProvider"
|
|
121
|
+
coding-prompts = "victor_coding.protocols:CodingPromptProvider"
|
|
122
|
+
coding-workflows = "victor_coding.protocols:CodingWorkflowProvider"
|
|
123
|
+
|
|
124
|
+
# Victor extension capability providers
|
|
125
|
+
[project.entry-points."victor.extension.capabilities"]
|
|
126
|
+
coding-lsp = "victor_coding.protocols:LSPCapabilityProvider"
|
|
127
|
+
coding-git = "victor_coding.protocols:GitCapabilityProvider"
|
|
128
|
+
coding-style = "victor_coding.protocols:CodeStyleCapabilityProvider"
|
|
129
|
+
coding-test = "victor_coding.protocols:TestingCapabilityProvider"
|
|
130
|
+
coding-refactor = "victor_coding.protocols:RefactoringCapabilityProvider"
|
|
131
|
+
|
|
132
|
+
# Extended providers: sandbox isolation, permission hierarchy, hooks, compaction
|
|
133
|
+
[project.entry-points."victor.sandbox.providers"]
|
|
134
|
+
coding-sandbox = "victor_coding.protocols:CodingSandboxProvider"
|
|
135
|
+
|
|
136
|
+
[project.entry-points."victor.permission.providers"]
|
|
137
|
+
coding-permissions = "victor_coding.protocols:CodingPermissionProvider"
|
|
138
|
+
|
|
139
|
+
[project.entry-points."victor.hook.providers"]
|
|
140
|
+
coding-hooks = "victor_coding.protocols:CodingHookProvider"
|
|
141
|
+
|
|
142
|
+
[project.entry-points."victor.compaction.providers"]
|
|
143
|
+
coding-compaction = "victor_coding.protocols:CodingCompactionProvider"
|
|
144
|
+
|
|
145
|
+
[tool.setuptools]
|
|
146
|
+
packages = [
|
|
147
|
+
"victor_coding",
|
|
148
|
+
"victor_coding.api",
|
|
149
|
+
"victor_coding.codebase",
|
|
150
|
+
"victor_coding.completion",
|
|
151
|
+
"victor_coding.coverage",
|
|
152
|
+
"victor_coding.docgen",
|
|
153
|
+
"victor_coding.editing",
|
|
154
|
+
"victor_coding.languages",
|
|
155
|
+
"victor_coding.lsp",
|
|
156
|
+
"victor_coding.refactor",
|
|
157
|
+
"victor_coding.review",
|
|
158
|
+
"victor_coding.rl",
|
|
159
|
+
"victor_coding.teams",
|
|
160
|
+
"victor_coding.testgen",
|
|
161
|
+
"victor_coding.tools",
|
|
162
|
+
"victor_coding.workflows",
|
|
163
|
+
]
|
|
164
|
+
|
|
165
|
+
[tool.black]
|
|
166
|
+
line-length = 100
|
|
167
|
+
target-version = [
|
|
168
|
+
"py311",
|
|
169
|
+
"py312",
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
[tool.ruff]
|
|
173
|
+
line-length = 100
|
|
174
|
+
target-version = "py311"
|
|
175
|
+
|
|
176
|
+
[tool.ruff.lint]
|
|
177
|
+
select = ["E", "W", "F", "B", "C4"]
|
|
178
|
+
ignore = [
|
|
179
|
+
"E501", # line too long (handled by formatter)
|
|
180
|
+
"E402", # module level import not at top of file (sometimes necessary)
|
|
181
|
+
"F401", # unused imports (often intentional re-exports)
|
|
182
|
+
"F811", # redefined while unused (type imports shadowing runtime)
|
|
183
|
+
"B007", # loop control variable not used within loop body
|
|
184
|
+
"B008", # do not perform function calls in argument defaults
|
|
185
|
+
"B019", # lru_cache on methods (valid pattern for class methods)
|
|
186
|
+
"B023", # function uses loop variable (common pattern)
|
|
187
|
+
"B024", # abstract class with no abstract methods (valid for protocols)
|
|
188
|
+
"B025", # try-except with empty except clause (handled elsewhere)
|
|
189
|
+
"B904", # allow broad raising for now
|
|
190
|
+
"B905", # zip() without strict= parameter (not critical)
|
|
191
|
+
"C401", # unnecessary generator (minor optimization)
|
|
192
|
+
"C414", # unnecessary list/set call (minor optimization)
|
|
193
|
+
]
|
|
194
|
+
|
|
195
|
+
[tool.ruff.lint.per-file-ignores]
|
|
196
|
+
"__init__.py" = ["F401"]
|
|
197
|
+
"tests/**/*.py" = ["B017", "B018", "E741", "F841"]
|
|
198
|
+
[tool.mypy]
|
|
199
|
+
python_version = "3.11"
|
|
200
|
+
warn_return_any = true
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Tests for victor-coding FastAPI router provider."""
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
# Check if FastAPI is available
|
|
6
|
+
try:
|
|
7
|
+
import fastapi # noqa: F401
|
|
8
|
+
|
|
9
|
+
FASTAPI_AVAILABLE = True
|
|
10
|
+
except ImportError:
|
|
11
|
+
FASTAPI_AVAILABLE = False
|
|
12
|
+
|
|
13
|
+
# Only import if FastAPI is available
|
|
14
|
+
if FASTAPI_AVAILABLE:
|
|
15
|
+
from victor_coding.api.router_provider import (
|
|
16
|
+
create_coding_lsp_router,
|
|
17
|
+
get_fastapi_router_provider,
|
|
18
|
+
)
|
|
19
|
+
else:
|
|
20
|
+
# Create dummy imports for pytestmark
|
|
21
|
+
create_coding_lsp_router = None
|
|
22
|
+
get_fastapi_router_provider = None
|
|
23
|
+
|
|
24
|
+
pytestmark = pytest.mark.skipif(
|
|
25
|
+
not FASTAPI_AVAILABLE, reason="FastAPI not installed. Install with: pip install fastapi"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _route_paths(app) -> set[str]:
|
|
30
|
+
return {getattr(route, "path", "") for route in app.routes}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_create_coding_lsp_router_registers_expected_routes() -> None:
|
|
34
|
+
router = create_coding_lsp_router()
|
|
35
|
+
paths = _route_paths(router)
|
|
36
|
+
|
|
37
|
+
assert "/lsp/completions" in paths
|
|
38
|
+
assert "/lsp/hover" in paths
|
|
39
|
+
assert "/lsp/definition" in paths
|
|
40
|
+
assert "/lsp/references" in paths
|
|
41
|
+
assert "/lsp/diagnostics" in paths
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_entry_point_provider_returns_router() -> None:
|
|
45
|
+
router = get_fastapi_router_provider(workspace_root="/tmp")
|
|
46
|
+
assert "/lsp/completions" in _route_paths(router)
|
|
@@ -47,7 +47,7 @@ class TestCodingRLConfig:
|
|
|
47
47
|
assert "feature" in config.task_type_mappings
|
|
48
48
|
|
|
49
49
|
# Check tools are lists
|
|
50
|
-
for
|
|
50
|
+
for _task_type, tools in config.task_type_mappings.items():
|
|
51
51
|
assert isinstance(tools, list)
|
|
52
52
|
assert len(tools) > 0
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ class TestCodingRLConfig:
|
|
|
55
55
|
"""Test quality thresholds are reasonable."""
|
|
56
56
|
config = CodingRLConfig()
|
|
57
57
|
|
|
58
|
-
for
|
|
58
|
+
for _task_type, threshold in config.quality_thresholds.items():
|
|
59
59
|
assert 0.0 <= threshold <= 1.0
|
|
60
60
|
|
|
61
61
|
# Refactoring should have highest threshold
|
|
@@ -69,7 +69,7 @@ class TestCodingRLConfig:
|
|
|
69
69
|
config = CodingRLConfig()
|
|
70
70
|
|
|
71
71
|
# All patience values should be positive
|
|
72
|
-
for
|
|
72
|
+
for _provider, patience in config.default_patience.items():
|
|
73
73
|
assert patience > 0
|
|
74
74
|
|
|
75
75
|
# Local models should have more patience
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
"""Tests for coding vertical teams integration."""
|
|
16
16
|
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
from victor.framework.teams import TeamFormation
|
|
20
|
-
from victor.framework.team_schema import TeamSpec
|
|
17
|
+
from victor_contracts.team_schema import TeamFormation, TeamSpec
|
|
21
18
|
from victor_coding.teams import (
|
|
22
19
|
CodingRoleConfig,
|
|
23
20
|
CODING_ROLES,
|
|
@@ -43,7 +40,7 @@ class TestCodingRoles:
|
|
|
43
40
|
|
|
44
41
|
def test_role_config_structure(self):
|
|
45
42
|
"""Test role configurations have required fields."""
|
|
46
|
-
for
|
|
43
|
+
for _name, config in CODING_ROLES.items():
|
|
47
44
|
assert isinstance(config, CodingRoleConfig)
|
|
48
45
|
assert config.base_role in ["researcher", "planner", "executor", "reviewer"]
|
|
49
46
|
assert isinstance(config.tools, list)
|
|
@@ -81,7 +78,7 @@ class TestCodingTeamSpecs:
|
|
|
81
78
|
|
|
82
79
|
def test_team_spec_structure(self):
|
|
83
80
|
"""Test team specs have required fields."""
|
|
84
|
-
for
|
|
81
|
+
for _name, spec in CODING_TEAM_SPECS.items():
|
|
85
82
|
assert isinstance(spec, TeamSpec)
|
|
86
83
|
assert spec.name
|
|
87
84
|
assert spec.description
|
|
@@ -194,7 +191,7 @@ class TestTeamMemberSpecs:
|
|
|
194
191
|
|
|
195
192
|
def test_member_budgets_reasonable(self):
|
|
196
193
|
"""Test member tool budgets are reasonable."""
|
|
197
|
-
for
|
|
194
|
+
for _name, spec in CODING_TEAM_SPECS.items():
|
|
198
195
|
total_member_budget = sum(m.tool_budget or 0 for m in spec.members)
|
|
199
196
|
# Individual budgets should sum to around team total
|
|
200
197
|
# (allow some flexibility)
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import pytest
|
|
18
18
|
|
|
19
19
|
from victor_coding.workflows import CodingWorkflowProvider
|
|
20
|
-
from victor.
|
|
20
|
+
from victor.framework.extensions import (
|
|
21
21
|
AgentNode,
|
|
22
22
|
ConditionNode,
|
|
23
23
|
ParallelNode,
|
|
@@ -208,7 +208,7 @@ class TestBugFixWorkflow:
|
|
|
208
208
|
wf = bug_fix_workflow
|
|
209
209
|
|
|
210
210
|
# Check for condition node (workflow may have varying structures)
|
|
211
|
-
|
|
211
|
+
any(isinstance(node, ConditionNode) for node in wf.nodes.values())
|
|
212
212
|
# Some bug fix workflows use simple linear flow
|
|
213
213
|
assert len(wf.nodes) >= 3 # At minimum has investigate, fix, verify
|
|
214
214
|
|
|
@@ -228,7 +228,7 @@ class TestCodeReviewWorkflow:
|
|
|
228
228
|
wf = code_review_workflow
|
|
229
229
|
|
|
230
230
|
# Check for parallel node (some workflows may use sequential)
|
|
231
|
-
|
|
231
|
+
any(isinstance(node, ParallelNode) for node in wf.nodes.values())
|
|
232
232
|
# Parallel is optional - workflow may use sequential reviews
|
|
233
233
|
assert len(wf.nodes) >= 2
|
|
234
234
|
|
|
@@ -268,7 +268,7 @@ class TestWorkflowIntegration:
|
|
|
268
268
|
provider = CodingWorkflowProvider()
|
|
269
269
|
workflows = provider.get_workflows()
|
|
270
270
|
|
|
271
|
-
for
|
|
271
|
+
for _name, wf in workflows.items():
|
|
272
272
|
d = wf.to_dict()
|
|
273
273
|
assert d["name"] == wf.name
|
|
274
274
|
assert "nodes" in d
|
|
@@ -279,8 +279,8 @@ class TestWorkflowIntegration:
|
|
|
279
279
|
provider = CodingWorkflowProvider()
|
|
280
280
|
workflows = provider.get_workflows()
|
|
281
281
|
|
|
282
|
-
for
|
|
283
|
-
for
|
|
282
|
+
for _name, wf in workflows.items():
|
|
283
|
+
for _node_id, node in wf.nodes.items():
|
|
284
284
|
if isinstance(node, AgentNode):
|
|
285
285
|
# Most agent nodes should have allowed_tools
|
|
286
286
|
# (not all require it, but most do)
|