codespector 0.1.0__tar.gz → 0.1.2__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.
- {codespector-0.1.0 → codespector-0.1.2}/PKG-INFO +1 -1
- {codespector-0.1.0 → codespector-0.1.2}/codespector/local/reviewer.py +2 -3
- {codespector-0.1.0 → codespector-0.1.2}/pyproject.toml +1 -1
- {codespector-0.1.0 → codespector-0.1.2}/tests/unit/test_reviewer.py +1 -1
- {codespector-0.1.0 → codespector-0.1.2}/.github/workflows/build-publish.yml +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/.github/workflows/tests.yml +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/.gitignore +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/LICENSE +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/Makefile +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/README.md +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/__init__.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/clients/__init__.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/clients/codestral.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/controller.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/local/__init__.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/local/main.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/local/prepare.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/codespector/main.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/tests/__init__.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/tests/conftest.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/tests/unit/__init__.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/tests/unit/test_prepare.py +0 -0
- {codespector-0.1.0 → codespector-0.1.2}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: codespector
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Assistant for reviewing your code
|
5
5
|
Project-URL: Repository, https://github.com/Vladimir-Titov/codespector
|
6
6
|
Project-URL: Issues, https://github.com/Vladimir-Titov/codespector/issues
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import os.path
|
2
2
|
from dataclasses import dataclass
|
3
|
-
from typing import Self
|
4
3
|
|
5
4
|
import ujson
|
6
5
|
import requests
|
@@ -22,7 +21,7 @@ class AgentInfo:
|
|
22
21
|
headers: dict
|
23
22
|
|
24
23
|
@classmethod
|
25
|
-
def create(cls, chat_agent: str, chat_token: str, chat_model: str | None = None) ->
|
24
|
+
def create(cls, chat_agent: str, chat_token: str, chat_model: str | None = None) -> 'AgentInfo':
|
26
25
|
url = AGENT_URL_MAPPING[chat_agent]
|
27
26
|
model = chat_model if chat_model else DEFAULT_AGENT_MODEL[chat_agent]
|
28
27
|
headers = {'Authorization': f'Bearer {chat_token}'}
|
@@ -52,7 +51,7 @@ class CodeSpectorReviewer:
|
|
52
51
|
|
53
52
|
self.request_file = 'request.json'
|
54
53
|
self.response_file = 'response.json'
|
55
|
-
self.result_file = 'result.
|
54
|
+
self.result_file = 'result.md'
|
56
55
|
|
57
56
|
def _request_to_chat_agent(self, prompt: str):
|
58
57
|
agent_info = AgentInfo.create(self.chat_agent, self.chat_token, self.chat_model)
|
@@ -65,7 +65,7 @@ def test_send_to_review(reviewer):
|
|
65
65
|
'[\n "file1.py",\n "file2.py"\n]'
|
66
66
|
)
|
67
67
|
mock_file.assert_any_call(os.path.join('test_output', 'response.json'), 'w', encoding='utf-8')
|
68
|
-
mock_file.assert_any_call(os.path.join('test_output', 'result.
|
68
|
+
mock_file.assert_any_call(os.path.join('test_output', 'result.md'), 'w', encoding='utf-8')
|
69
69
|
|
70
70
|
|
71
71
|
def test_start(reviewer):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|