kodit 0.1.8__tar.gz → 0.1.9__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.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.1.8 → kodit-0.1.9}/PKG-INFO +1 -1
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/_version.py +2 -2
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/sources/service.py +3 -3
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/sources/test_service.py +10 -0
- {kodit-0.1.8 → kodit-0.1.9}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/workflows/docker.yaml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/workflows/docs.yaml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.github/workflows/test.yaml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.gitignore +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.python-version +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.vscode/launch.json +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/.vscode/settings.json +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/Dockerfile +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/LICENSE +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/README.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/alembic.ini +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/docs/_index.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/docs/developer/index.md +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/pyproject.toml +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/.gitignore +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/README +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/env.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/script.py.mako +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/versions/85155663351e_initial.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/alembic/versions/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/app.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/bm25/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/bm25/bm25.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/cli.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/config.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/database.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/indexing/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/indexing/models.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/indexing/repository.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/indexing/service.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/logging.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/mcp.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/middleware.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/retreival/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/retreival/repository.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/retreival/service.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/languages/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/languages/csharp.scm +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/languages/python.scm +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/method_snippets.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/snippets/snippets.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/sources/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/sources/models.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/src/kodit/sources/repository.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/conftest.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/cli_test.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/e2e.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/indexing/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/indexing/test_service.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/retreival/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/retreival/test_service.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/snippets/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/snippets/csharp.cs +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/snippets/detect_language_test.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/snippets/method_extraction_test.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/snippets/python.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/kodit/sources/__init__.py +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/tests/smoke.sh +0 -0
- {kodit-0.1.8 → kodit-0.1.9}/uv.lock +0 -0
|
@@ -126,13 +126,13 @@ class SourceService:
|
|
|
126
126
|
SourceAlreadyExistsError: If the folder is already added.
|
|
127
127
|
|
|
128
128
|
"""
|
|
129
|
+
# Resolve the directory to an absolute path
|
|
130
|
+
directory = directory.expanduser().resolve()
|
|
131
|
+
|
|
129
132
|
source = await self.repository.get_source_by_uri(directory.as_uri())
|
|
130
133
|
if source:
|
|
131
134
|
self.log.info("Source already exists, reusing...", source_id=source.id)
|
|
132
135
|
else:
|
|
133
|
-
# Resolve the directory to an absolute path
|
|
134
|
-
directory = directory.expanduser().resolve()
|
|
135
|
-
|
|
136
136
|
# Check if the folder exists
|
|
137
137
|
if not directory.exists():
|
|
138
138
|
msg = f"Folder does not exist: {directory}"
|
|
@@ -145,3 +145,13 @@ async def test_create_git_source(service: SourceService, tmp_path: Path) -> None
|
|
|
145
145
|
|
|
146
146
|
# Clean up
|
|
147
147
|
shutil.rmtree(repo_path)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@pytest.mark.asyncio
|
|
151
|
+
async def test_create_source_relative_path(
|
|
152
|
+
service: SourceService, tmp_path: Path
|
|
153
|
+
) -> None:
|
|
154
|
+
"""Test creating a source with a relative path, i.e. the current directory."""
|
|
155
|
+
|
|
156
|
+
# Should not raise an error
|
|
157
|
+
await service.create(".")
|
|
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
|
|
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
|
|
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
|
|
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
|