shotgun-sh 0.1.14.dev1__py3-none-any.whl → 0.1.14.dev2__py3-none-any.whl
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 shotgun-sh might be problematic. Click here for more details.
- shotgun/codebase/core/manager.py +11 -21
- {shotgun_sh-0.1.14.dev1.dist-info → shotgun_sh-0.1.14.dev2.dist-info}/METADATA +1 -1
- {shotgun_sh-0.1.14.dev1.dist-info → shotgun_sh-0.1.14.dev2.dist-info}/RECORD +6 -6
- {shotgun_sh-0.1.14.dev1.dist-info → shotgun_sh-0.1.14.dev2.dist-info}/WHEEL +0 -0
- {shotgun_sh-0.1.14.dev1.dist-info → shotgun_sh-0.1.14.dev2.dist-info}/entry_points.txt +0 -0
- {shotgun_sh-0.1.14.dev1.dist-info → shotgun_sh-0.1.14.dev2.dist-info}/licenses/LICENSE +0 -0
shotgun/codebase/core/manager.py
CHANGED
|
@@ -1221,26 +1221,11 @@ class CodebaseGraphManager:
|
|
|
1221
1221
|
|
|
1222
1222
|
removed_graphs = []
|
|
1223
1223
|
|
|
1224
|
-
# Find all .kuzu
|
|
1224
|
+
# Find all .kuzu databases (files in v0.11.2, directories in newer versions)
|
|
1225
1225
|
for path in self.storage_dir.glob("*.kuzu"):
|
|
1226
1226
|
graph_id = path.stem
|
|
1227
1227
|
|
|
1228
|
-
#
|
|
1229
|
-
# Valid Kuzu databases are always directories
|
|
1230
|
-
if path.is_file():
|
|
1231
|
-
logger.warning(
|
|
1232
|
-
f"Detected corrupted database file (should be directory) at {path}, removing it"
|
|
1233
|
-
)
|
|
1234
|
-
try:
|
|
1235
|
-
await anyio.to_thread.run_sync(path.unlink)
|
|
1236
|
-
removed_graphs.append(graph_id)
|
|
1237
|
-
logger.info(f"Removed corrupted database file: {graph_id}")
|
|
1238
|
-
except Exception as e:
|
|
1239
|
-
logger.error(
|
|
1240
|
-
f"Failed to remove corrupted database file {graph_id}: {e}"
|
|
1241
|
-
)
|
|
1242
|
-
continue
|
|
1243
|
-
|
|
1228
|
+
# Try to open and validate the database
|
|
1244
1229
|
try:
|
|
1245
1230
|
# Try to open the database with a timeout to prevent hanging
|
|
1246
1231
|
async def try_open_database(
|
|
@@ -1346,7 +1331,7 @@ class CodebaseGraphManager:
|
|
|
1346
1331
|
"""
|
|
1347
1332
|
graphs = []
|
|
1348
1333
|
|
|
1349
|
-
# Find all .kuzu files
|
|
1334
|
+
# Find all .kuzu database files (Kuzu v0.11.2 creates files, not directories)
|
|
1350
1335
|
for path in self.storage_dir.glob("*.kuzu"):
|
|
1351
1336
|
if path.is_file():
|
|
1352
1337
|
graph_id = path.stem
|
|
@@ -1439,6 +1424,8 @@ class CodebaseGraphManager:
|
|
|
1439
1424
|
Args:
|
|
1440
1425
|
graph_id: Graph to delete
|
|
1441
1426
|
"""
|
|
1427
|
+
import shutil
|
|
1428
|
+
|
|
1442
1429
|
# Stop watcher if running
|
|
1443
1430
|
if graph_id in self._watchers:
|
|
1444
1431
|
await self.stop_watcher(graph_id)
|
|
@@ -1453,11 +1440,14 @@ class CodebaseGraphManager:
|
|
|
1453
1440
|
self._databases[graph_id].close()
|
|
1454
1441
|
del self._databases[graph_id]
|
|
1455
1442
|
|
|
1456
|
-
# Delete files
|
|
1443
|
+
# Delete database (files in v0.11.2, directories in newer versions)
|
|
1457
1444
|
graph_path = self.storage_dir / f"{graph_id}.kuzu"
|
|
1458
1445
|
if graph_path.exists():
|
|
1459
|
-
|
|
1460
|
-
|
|
1446
|
+
if graph_path.is_dir():
|
|
1447
|
+
await anyio.to_thread.run_sync(shutil.rmtree, graph_path)
|
|
1448
|
+
else:
|
|
1449
|
+
# File-based database (Kuzu v0.11.2)
|
|
1450
|
+
await anyio.to_thread.run_sync(graph_path.unlink)
|
|
1461
1451
|
|
|
1462
1452
|
# Also delete the WAL file if it exists
|
|
1463
1453
|
wal_path = self.storage_dir / f"{graph_id}.kuzu.wal"
|
|
@@ -69,7 +69,7 @@ shotgun/codebase/core/code_retrieval.py,sha256=_JVyyQKHDFm3dxOOua1mw9eIIOHIVz3-I
|
|
|
69
69
|
shotgun/codebase/core/cypher_models.py,sha256=Yfysfa9lLguILftkmtuJCN3kLBFIo7WW7NigM-Zr-W4,1735
|
|
70
70
|
shotgun/codebase/core/ingestor.py,sha256=yh6BEIuUUfXU3dVpP0Llk19SrxA-uo3pdGnfcQsDsSo,63368
|
|
71
71
|
shotgun/codebase/core/language_config.py,sha256=vsqHyuFnumRPRBV1lMOxWKNOIiClO6FyfKQR0fGrtl4,8934
|
|
72
|
-
shotgun/codebase/core/manager.py,sha256=
|
|
72
|
+
shotgun/codebase/core/manager.py,sha256=USGLBdDUoFtq6fMFWRtUu2HBC_FI8d6lWcAV4l6fcvk,66000
|
|
73
73
|
shotgun/codebase/core/nl_query.py,sha256=kPoSJXBlm5rLhzOofZhqPVMJ_Lj3rV2H6sld6BwtMdg,16115
|
|
74
74
|
shotgun/codebase/core/parser_loader.py,sha256=LZRrDS8Sp518jIu3tQW-BxdwJ86lnsTteI478ER9Td8,4278
|
|
75
75
|
shotgun/prompts/__init__.py,sha256=RswUm0HMdfm2m2YKUwUsEdRIwoczdbI7zlucoEvHYRo,132
|
|
@@ -126,8 +126,8 @@ shotgun/utils/env_utils.py,sha256=8QK5aw_f_V2AVTleQQlcL0RnD4sPJWXlDG46fsHu0d8,10
|
|
|
126
126
|
shotgun/utils/file_system_utils.py,sha256=l-0p1bEHF34OU19MahnRFdClHufThfGAjQ431teAIp0,1004
|
|
127
127
|
shotgun/utils/source_detection.py,sha256=Co6Q03R3fT771TF3RzB-70stfjNP2S4F_ArZKibwzm8,454
|
|
128
128
|
shotgun/utils/update_checker.py,sha256=IgzPHRhS1ETH7PnJR_dIx6lxgr1qHpCkMTgzUxvGjhI,7586
|
|
129
|
-
shotgun_sh-0.1.14.
|
|
130
|
-
shotgun_sh-0.1.14.
|
|
131
|
-
shotgun_sh-0.1.14.
|
|
132
|
-
shotgun_sh-0.1.14.
|
|
133
|
-
shotgun_sh-0.1.14.
|
|
129
|
+
shotgun_sh-0.1.14.dev2.dist-info/METADATA,sha256=KwTyS3Cfs7Ub8QGkPGOsV2T0Q3Szwi7s0Vg2wemPaCc,11197
|
|
130
|
+
shotgun_sh-0.1.14.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
131
|
+
shotgun_sh-0.1.14.dev2.dist-info/entry_points.txt,sha256=asZxLU4QILneq0MWW10saVCZc4VWhZfb0wFZvERnzfA,45
|
|
132
|
+
shotgun_sh-0.1.14.dev2.dist-info/licenses/LICENSE,sha256=YebsZl590zCHrF_acCU5pmNt0pnAfD2DmAnevJPB1tY,1065
|
|
133
|
+
shotgun_sh-0.1.14.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|