Skip to content

Commit 731b5db

Browse files
committed
fix merges from main
1 parent 0429f2f commit 731b5db

File tree

6 files changed

+27
-36
lines changed

6 files changed

+27
-36
lines changed

graphrag/api/query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from collections.abc import AsyncGenerator
2121
from pathlib import Path
22-
from typing import Any
22+
from typing import TYPE_CHECKING, Any
2323

2424
import pandas as pd
2525
from pydantic import validate_call
@@ -44,12 +44,14 @@
4444
read_indexer_reports,
4545
read_indexer_text_units,
4646
)
47-
from graphrag.query.structured_search.base import SearchResult # noqa: TC001
4847
from graphrag.utils.cli import redact
4948
from graphrag.utils.embeddings import create_collection_name
5049
from graphrag.vector_stores.base import BaseVectorStore
5150
from graphrag.vector_stores.factory import VectorStoreFactory, VectorStoreType
5251

52+
if TYPE_CHECKING:
53+
from graphrag.query.structured_search.base import SearchResult
54+
5355
reporter = PrintProgressReporter("")
5456

5557

graphrag/index/config/cache.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,18 @@ class PipelineBlobCacheConfig(PipelineCacheConfig[Literal[CacheType.blob]]):
5252
type: Literal[CacheType.blob] = CacheType.blob
5353
"""The type of cache."""
5454

55-
base_dir: str = pydantic_Field(
56-
description="The base directory for the cache.", default=""
57-
)
55+
base_dir: str = Field(description="The base directory for the cache.", default="")
5856
"""The base directory for the cache."""
5957

6058
connection_string: str | None = Field(
6159
description="The blob cache connection string for the cache.", default=None
6260
)
6361
"""The blob cache connection string for the cache."""
6462

65-
container_name: str = pydantic_Field(
66-
description="The container name for cache", default=""
67-
)
63+
container_name: str = Field(description="The container name for cache", default="")
6864
"""The container name for cache"""
6965

70-
storage_account_blob_url: str = pydantic_Field(
66+
storage_account_blob_url: str = Field(
7167
description="The storage account blob url for cache", default=""
7268
)
7369
"""The storage account blob url for cache"""
@@ -79,22 +75,20 @@ class PipelineCosmosDBCacheConfig(PipelineCacheConfig[Literal[CacheType.cosmosdb
7975
type: Literal[CacheType.cosmosdb] = CacheType.cosmosdb
8076
"""The type of cache."""
8177

82-
base_dir: str = pydantic_Field(
78+
base_dir: str = Field(
8379
description="The cosmosdb database name for the cache.", default=""
8480
)
8581
"""The cosmosdb database name for the cache."""
8682

87-
container_name: str = pydantic_Field(
88-
description="The container name for cache.", default=""
89-
)
83+
container_name: str = Field(description="The container name for cache.", default="")
9084
"""The container name for cache."""
9185

92-
connection_string: str | None = pydantic_Field(
86+
connection_string: str | None = Field(
9387
description="The cosmosdb primary key for the cache.", default=None
9488
)
9589
"""The cosmosdb primary key for the cache."""
9690

97-
cosmosdb_account_url: str = pydantic_Field(
91+
cosmosdb_account_url: str = Field(
9892
description="The cosmosdb account url for cache", default=""
9993
)
10094
"""The cosmosdb account url for cache"""

graphrag/index/config/reporting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ class PipelineBlobReportingConfig(PipelineReportingConfig[Literal[ReportingType.
5353
)
5454
"""The blob reporting connection string for the reporting."""
5555

56-
container_name: str = pydantic_Field(
56+
container_name: str = Field(
5757
description="The container name for reporting", default=""
5858
)
5959
"""The container name for reporting"""
6060

61-
storage_account_blob_url: str = pydantic_Field(
61+
storage_account_blob_url: str = Field(
6262
description="The storage account blob url for reporting", default=""
6363
)
6464
"""The storage account blob url for reporting"""
6565

66-
base_dir: str = pydantic_Field(
66+
base_dir: str = Field(
6767
description="The base directory for the reporting.", default=""
6868
)
6969
"""The base directory for the reporting."""

graphrag/index/config/storage.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,15 @@ class PipelineBlobStorageConfig(PipelineStorageConfig[Literal[StorageType.blob]]
5050
)
5151
"""The blob storage connection string for the storage."""
5252

53-
container_name: str = pydantic_Field(
53+
container_name: str = Field(
5454
description="The container name for storage", default=""
5555
)
5656
"""The container name for storage."""
5757

58-
base_dir: str = pydantic_Field(
59-
description="The base directory for the storage.", default=""
60-
)
58+
base_dir: str = Field(description="The base directory for the storage.", default="")
6159
"""The base directory for the storage."""
6260

63-
storage_account_blob_url: str = pydantic_Field(
61+
storage_account_blob_url: str = Field(
6462
description="The storage account blob url.", default=""
6563
)
6664
"""The storage account blob url."""
@@ -74,22 +72,20 @@ class PipelineCosmosDBStorageConfig(
7472
type: Literal[StorageType.cosmosdb] = StorageType.cosmosdb
7573
"""The type of storage."""
7674

77-
connection_string: str | None = pydantic_Field(
75+
connection_string: str | None = Field(
7876
description="The cosmosdb storage primary key for the storage.", default=None
7977
)
8078
"""The cosmosdb storage primary key for the storage."""
8179

82-
container_name: str = pydantic_Field(
80+
container_name: str = Field(
8381
description="The container name for storage", default=""
8482
)
8583
"""The container name for storage."""
8684

87-
base_dir: str = pydantic_Field(
88-
description="The base directory for the storage.", default=""
89-
)
85+
base_dir: str = Field(description="The base directory for the storage.", default="")
9086
"""The base directory for the storage."""
9187

92-
cosmosdb_account_url: str = pydantic_Field(
88+
cosmosdb_account_url: str = Field(
9389
description="The cosmosdb account url.", default=""
9490
)
9591
"""The cosmosdb account url."""

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ devtools = "^0.12.2"
8181
typing-extensions = "^4.12.2"
8282

8383
#Azure
84-
azure-storage-blob = "^12.24.0"
85-
azure-identity = "^1.19.0"
8684
azure-cosmos = "^4.9.0"
87-
json-repair = "^0.30.0"
85+
azure-identity = "^1.19.0"
86+
azure-storage-blob = "^12.24.0"
8887

8988
future = "^1.0.0" # Needed until graspologic fixes their dependency
9089
typer = "^0.15.1"
@@ -273,4 +272,4 @@ exclude = ["**/node_modules", "**/__pycache__"]
273272
[tool.pytest.ini_options]
274273
asyncio_mode = "auto"
275274
timeout = 1000
276-
env_files = [".env"]
275+
env_files = [".env"]

0 commit comments

Comments
 (0)