From 1c3b0f34c3b91ab7d23c76463e4e521a5959009e Mon Sep 17 00:00:00 2001 From: Alonso Guevara Date: Fri, 6 Dec 2024 14:08:24 -0600 Subject: [PATCH] Chore/lib updates (#1477) * Update dependencies and fix issues * Format * Semver * Fix Pyright * Pyright * More Pyright * Pyright --- .../patch-20241206190229362643.json | 4 + .../neo4j/graphrag_import_neo4j_cypher.ipynb | 19 +- graphrag/api/query.py | 52 +- graphrag/cache/factory.py | 10 +- graphrag/callbacks/factory.py | 4 +- graphrag/cli/main.py | 19 +- graphrag/config/create_graphrag_config.py | 2 +- graphrag/config/defaults.py | 7 + graphrag/config/models/graph_rag_config.py | 2 +- .../config/models/text_embedding_config.py | 2 +- graphrag/index/config/cache.py | 15 +- graphrag/index/config/input.py | 35 +- graphrag/index/config/pipeline.py | 21 +- graphrag/index/config/reporting.py | 15 +- graphrag/index/config/storage.py | 15 +- graphrag/index/config/workflow.py | 9 +- .../index/flows/create_base_entity_graph.py | 2 +- .../index/flows/create_base_text_units.py | 8 +- .../prep_community_report_context.py | 4 +- .../graph/extractors/graph/graph_extractor.py | 4 +- graphrag/index/graph/utils/stable_lcc.py | 2 +- graphrag/index/input/csv.py | 2 +- graphrag/index/input/factory.py | 2 +- graphrag/index/llm/mock_llm.py | 6 +- .../index/operations/chunk_text/chunk_text.py | 2 +- .../compute_edge_combined_degree.py | 2 +- graphrag/index/run/postprocess.py | 2 +- graphrag/index/run/run.py | 4 +- graphrag/index/run/workflow.py | 2 +- .../index/text_splitting/text_splitting.py | 2 +- graphrag/index/utils/dataframes.py | 6 +- graphrag/index/utils/ds_util.py | 2 +- graphrag/index/workflows/load.py | 2 +- .../v1/subflows/create_base_entity_graph.py | 2 +- .../v1/subflows/create_base_text_units.py | 4 +- .../v1/subflows/create_final_communities.py | 2 +- .../create_final_community_reports.py | 18 +- .../v1/subflows/create_final_covariates.py | 2 +- .../v1/subflows/create_final_documents.py | 10 +- .../v1/subflows/create_final_entities.py | 2 +- .../v1/subflows/create_final_nodes.py | 2 +- .../v1/subflows/create_final_relationships.py | 2 +- .../v1/subflows/create_final_text_units.py | 14 +- .../v1/subflows/generate_text_embeddings.py | 12 +- .../context_builder/community_context.py | 2 +- .../query/context_builder/local_context.py | 6 +- .../query/context_builder/source_context.py | 2 +- graphrag/query/indexer_adapters.py | 4 +- .../input/retrieval/community_reports.py | 2 +- graphrag/query/input/retrieval/covariates.py | 2 +- graphrag/query/input/retrieval/entities.py | 2 +- .../query/input/retrieval/relationships.py | 2 +- graphrag/query/input/retrieval/text_units.py | 2 +- graphrag/query/llm/oai/typing.py | 10 +- graphrag/query/llm/text_utils.py | 6 +- graphrag/query/question_gen/local_gen.py | 8 +- .../structured_search/global_search/search.py | 4 +- graphrag/storage/blob_pipeline_storage.py | 2 +- graphrag/storage/factory.py | 18 +- graphrag/storage/file_pipeline_storage.py | 6 +- poetry.lock | 507 +++++++++--------- pyproject.toml | 35 +- tests/integration/_pipeline/test_run.py | 12 +- tests/smoke/test_fixtures.py | 44 +- tests/unit/config/test_default_config.py | 2 +- .../community_reports/test_sort_context.py | 6 +- tests/unit/indexing/test_init_content.py | 2 +- tests/unit/indexing/workflows/test_export.py | 14 +- tests/verbs/test_create_base_entity_graph.py | 20 +- tests/verbs/test_create_base_text_units.py | 6 +- tests/verbs/util.py | 10 +- 71 files changed, 554 insertions(+), 537 deletions(-) create mode 100644 .semversioner/next-release/patch-20241206190229362643.json diff --git a/.semversioner/next-release/patch-20241206190229362643.json b/.semversioner/next-release/patch-20241206190229362643.json new file mode 100644 index 0000000000..437d90cb05 --- /dev/null +++ b/.semversioner/next-release/patch-20241206190229362643.json @@ -0,0 +1,4 @@ +{ + "type": "patch", + "description": "Dependency updates" +} diff --git a/examples_notebooks/community_contrib/neo4j/graphrag_import_neo4j_cypher.ipynb b/examples_notebooks/community_contrib/neo4j/graphrag_import_neo4j_cypher.ipynb index 1553b0f692..d246122be6 100644 --- a/examples_notebooks/community_contrib/neo4j/graphrag_import_neo4j_cypher.ipynb +++ b/examples_notebooks/community_contrib/neo4j/graphrag_import_neo4j_cypher.ipynb @@ -209,15 +209,16 @@ "source": [ "# create constraints, idempotent operation\n", "\n", - "statements = \"\"\"\n", - "create constraint chunk_id if not exists for (c:__Chunk__) require c.id is unique;\n", - "create constraint document_id if not exists for (d:__Document__) require d.id is unique;\n", - "create constraint entity_id if not exists for (c:__Community__) require c.community is unique;\n", - "create constraint entity_id if not exists for (e:__Entity__) require e.id is unique;\n", - "create constraint entity_title if not exists for (e:__Entity__) require e.name is unique;\n", - "create constraint entity_title if not exists for (e:__Covariate__) require e.title is unique;\n", - "create constraint related_id if not exists for ()-[rel:RELATED]->() require rel.id is unique;\n", - "\"\"\".split(\";\")\n", + "statements = [\n", + " \"\\ncreate constraint chunk_id if not exists for (c:__Chunk__) require c.id is unique\",\n", + " \"\\ncreate constraint document_id if not exists for (d:__Document__) require d.id is unique\",\n", + " \"\\ncreate constraint entity_id if not exists for (c:__Community__) require c.community is unique\",\n", + " \"\\ncreate constraint entity_id if not exists for (e:__Entity__) require e.id is unique\",\n", + " \"\\ncreate constraint entity_title if not exists for (e:__Entity__) require e.name is unique\",\n", + " \"\\ncreate constraint entity_title if not exists for (e:__Covariate__) require e.title is unique\",\n", + " \"\\ncreate constraint related_id if not exists for ()-[rel:RELATED]->() require rel.id is unique\",\n", + " \"\\n\",\n", + "]\n", "\n", "for statement in statements:\n", " if len((statement or \"\").strip()) > 0:\n", diff --git a/graphrag/api/query.py b/graphrag/api/query.py index 2eab003cb6..ebe6bd22a5 100644 --- a/graphrag/api/query.py +++ b/graphrag/api/query.py @@ -44,7 +44,7 @@ read_indexer_reports, read_indexer_text_units, ) -from graphrag.query.structured_search.base import SearchResult # noqa: TCH001 +from graphrag.query.structured_search.base import SearchResult # noqa: TC001 from graphrag.utils.cli import redact from graphrag.utils.embeddings import create_collection_name from graphrag.vector_stores.base import BaseVectorStore @@ -90,14 +90,14 @@ async def global_search( ------ TODO: Document any exceptions to expect. """ - _communities = read_indexer_communities(communities, nodes, community_reports) + communities_ = read_indexer_communities(communities, nodes, community_reports) reports = read_indexer_reports( community_reports, nodes, community_level=community_level, dynamic_community_selection=dynamic_community_selection, ) - _entities = read_indexer_entities(nodes, entities, community_level=community_level) + entities_ = read_indexer_entities(nodes, entities, community_level=community_level) map_prompt = _load_search_prompt(config.root_dir, config.global_search.map_prompt) reduce_prompt = _load_search_prompt( config.root_dir, config.global_search.reduce_prompt @@ -109,8 +109,8 @@ async def global_search( search_engine = get_global_search_engine( config, reports=reports, - entities=_entities, - communities=_communities, + entities=entities_, + communities=communities_, response_type=response_type, dynamic_community_selection=dynamic_community_selection, map_system_prompt=map_prompt, @@ -159,14 +159,14 @@ async def global_search_streaming( ------ TODO: Document any exceptions to expect. """ - _communities = read_indexer_communities(communities, nodes, community_reports) + communities_ = read_indexer_communities(communities, nodes, community_reports) reports = read_indexer_reports( community_reports, nodes, community_level=community_level, dynamic_community_selection=dynamic_community_selection, ) - _entities = read_indexer_entities(nodes, entities, community_level=community_level) + entities_ = read_indexer_entities(nodes, entities, community_level=community_level) map_prompt = _load_search_prompt(config.root_dir, config.global_search.map_prompt) reduce_prompt = _load_search_prompt( config.root_dir, config.global_search.reduce_prompt @@ -178,8 +178,8 @@ async def global_search_streaming( search_engine = get_global_search_engine( config, reports=reports, - entities=_entities, - communities=_communities, + entities=entities_, + communities=communities_, response_type=response_type, dynamic_community_selection=dynamic_community_selection, map_system_prompt=map_prompt, @@ -258,17 +258,17 @@ async def local_search( embedding_name=entity_description_embedding, ) - _entities = read_indexer_entities(nodes, entities, community_level) - _covariates = read_indexer_covariates(covariates) if covariates is not None else [] + entities_ = read_indexer_entities(nodes, entities, community_level) + covariates_ = read_indexer_covariates(covariates) if covariates is not None else [] prompt = _load_search_prompt(config.root_dir, config.local_search.prompt) search_engine = get_local_search_engine( config=config, reports=read_indexer_reports(community_reports, nodes, community_level), text_units=read_indexer_text_units(text_units), - entities=_entities, + entities=entities_, relationships=read_indexer_relationships(relationships), - covariates={"claims": _covariates}, + covariates={"claims": covariates_}, description_embedding_store=description_embedding_store, # type: ignore response_type=response_type, system_prompt=prompt, @@ -334,17 +334,17 @@ async def local_search_streaming( embedding_name=entity_description_embedding, ) - _entities = read_indexer_entities(nodes, entities, community_level) - _covariates = read_indexer_covariates(covariates) if covariates is not None else [] + entities_ = read_indexer_entities(nodes, entities, community_level) + covariates_ = read_indexer_covariates(covariates) if covariates is not None else [] prompt = _load_search_prompt(config.root_dir, config.local_search.prompt) search_engine = get_local_search_engine( config=config, reports=read_indexer_reports(community_reports, nodes, community_level), text_units=read_indexer_text_units(text_units), - entities=_entities, + entities=entities_, relationships=read_indexer_relationships(relationships), - covariates={"claims": _covariates}, + covariates={"claims": covariates_}, description_embedding_store=description_embedding_store, # type: ignore response_type=response_type, system_prompt=prompt, @@ -424,15 +424,15 @@ async def drift_search( embedding_name=community_full_content_embedding, ) - _entities = read_indexer_entities(nodes, entities, community_level) - _reports = read_indexer_reports(community_reports, nodes, community_level) - read_indexer_report_embeddings(_reports, full_content_embedding_store) + entities_ = read_indexer_entities(nodes, entities, community_level) + reports = read_indexer_reports(community_reports, nodes, community_level) + read_indexer_report_embeddings(reports, full_content_embedding_store) prompt = _load_search_prompt(config.root_dir, config.drift_search.prompt) search_engine = get_drift_search_engine( config=config, - reports=_reports, + reports=reports, text_units=read_indexer_text_units(text_units), - entities=_entities, + entities=entities_, relationships=read_indexer_relationships(relationships), description_embedding_store=description_embedding_store, # type: ignore local_system_prompt=prompt, @@ -492,9 +492,9 @@ def _patch_vector_store( db_uri=config.embeddings.vector_store["db_uri"] ) # dump embeddings from the entities list to the description_embedding_store - _entities = read_indexer_entities(nodes, entities, community_level) + entities_ = read_indexer_entities(nodes, entities, community_level) store_entity_semantic_embeddings( - entities=_entities, vectorstore=description_embedding_store + entities=entities_, vectorstore=description_embedding_store ) if with_reports is not None: @@ -506,7 +506,7 @@ def _patch_vector_store( community_reports = with_reports container_name = config.embeddings.vector_store["container_name"] # Store report embeddings - _reports = read_indexer_reports( + reports = read_indexer_reports( community_reports, nodes, community_level, @@ -526,7 +526,7 @@ def _patch_vector_store( ) # dump embeddings from the reports list to the full_content_embedding_store store_reports_semantic_embeddings( - reports=_reports, vectorstore=full_content_embedding_store + reports=reports, vectorstore=full_content_embedding_store ) return config diff --git a/graphrag/cache/factory.py b/graphrag/cache/factory.py index 7253fc9d64..91a598c2d8 100644 --- a/graphrag/cache/factory.py +++ b/graphrag/cache/factory.py @@ -8,17 +8,15 @@ from typing import TYPE_CHECKING, cast from graphrag.config.enums import CacheType -from graphrag.index.config.cache import ( - PipelineBlobCacheConfig, - PipelineFileCacheConfig, -) from graphrag.storage.blob_pipeline_storage import BlobPipelineStorage from graphrag.storage.file_pipeline_storage import FilePipelineStorage if TYPE_CHECKING: from graphrag.cache.pipeline_cache import PipelineCache from graphrag.index.config.cache import ( + PipelineBlobCacheConfig, PipelineCacheConfig, + PipelineFileCacheConfig, ) from graphrag.cache.json_pipeline_cache import JsonPipelineCache @@ -39,11 +37,11 @@ def create_cache( case CacheType.memory: return InMemoryCache() case CacheType.file: - config = cast(PipelineFileCacheConfig, config) + config = cast("PipelineFileCacheConfig", config) storage = FilePipelineStorage(root_dir).child(config.base_dir) return JsonPipelineCache(storage) case CacheType.blob: - config = cast(PipelineBlobCacheConfig, config) + config = cast("PipelineBlobCacheConfig", config) storage = BlobPipelineStorage( config.connection_string, config.container_name, diff --git a/graphrag/callbacks/factory.py b/graphrag/callbacks/factory.py index 257a0d0a6c..0290a9b2a5 100644 --- a/graphrag/callbacks/factory.py +++ b/graphrag/callbacks/factory.py @@ -27,14 +27,14 @@ def create_pipeline_reporter( match config.type: case ReportingType.file: - config = cast(PipelineFileReportingConfig, config) + config = cast("PipelineFileReportingConfig", config) return FileWorkflowCallbacks( str(Path(root_dir or "") / (config.base_dir or "")) ) case ReportingType.console: return ConsoleWorkflowCallbacks() case ReportingType.blob: - config = cast(PipelineBlobReportingConfig, config) + config = cast("PipelineBlobReportingConfig", config) return BlobWorkflowCallbacks( config.connection_string, config.container_name, diff --git a/graphrag/cli/main.py b/graphrag/cli/main.py index c084d06253..416b325bac 100644 --- a/graphrag/cli/main.py +++ b/graphrag/cli/main.py @@ -46,19 +46,28 @@ def wildcard_match(string: str, pattern: str) -> bool: regex = re.escape(pattern).replace(r"\?", ".").replace(r"\*", ".*") return re.fullmatch(regex, string) is not None + from pathlib import Path + def completer(incomplete: str) -> list[str]: - items = os.listdir() + # List items in the current directory as Path objects + items = Path().iterdir() completions = [] + for item in items: - if not file_okay and Path(item).is_file(): + # Filter based on file/directory properties + if not file_okay and item.is_file(): continue - if not dir_okay and Path(item).is_dir(): + if not dir_okay and item.is_dir(): continue if readable and not os.access(item, os.R_OK): continue if writable and not os.access(item, os.W_OK): continue - completions.append(item) + + # Append the name of the matching item + completions.append(item.name) + + # Apply wildcard matching if required if match_wildcard: completions = filter( lambda i: wildcard_match(i, match_wildcard) @@ -66,6 +75,8 @@ def completer(incomplete: str) -> list[str]: else False, completions, ) + + # Return completions that start with the given incomplete string return [i for i in completions if i.startswith(incomplete)] return completer diff --git a/graphrag/config/create_graphrag_config.py b/graphrag/config/create_graphrag_config.py index 53ce3f9f3a..0e08155151 100644 --- a/graphrag/config/create_graphrag_config.py +++ b/graphrag/config/create_graphrag_config.py @@ -64,7 +64,7 @@ def create_graphrag_config( values = values or {} root_dir = root_dir or str(Path.cwd()) env = _make_env(root_dir) - _token_replace(cast(dict, values)) + _token_replace(cast("dict", values)) InputModelValidator.validate_python(values, strict=True) reader = EnvironmentReader(env) diff --git a/graphrag/config/defaults.py b/graphrag/config/defaults.py index e81a3758a0..48a6f5f3e6 100644 --- a/graphrag/config/defaults.py +++ b/graphrag/config/defaults.py @@ -97,6 +97,13 @@ overwrite: true\ """ +VECTOR_STORE_DICT = { + "type": VectorStoreType.LanceDB.value, + "db_uri": str(Path(STORAGE_BASE_DIR) / "lancedb"), + "container_name": "default", + "overwrite": True, +} + # Local Search LOCAL_SEARCH_TEXT_UNIT_PROP = 0.5 LOCAL_SEARCH_COMMUNITY_PROP = 0.1 diff --git a/graphrag/config/models/graph_rag_config.py b/graphrag/config/models/graph_rag_config.py index 3dc5f71d82..9e56eaed47 100644 --- a/graphrag/config/models/graph_rag_config.py +++ b/graphrag/config/models/graph_rag_config.py @@ -41,7 +41,7 @@ def __str__(self): return self.model_dump_json(indent=4) root_dir: str = Field( - description="The root directory for the configuration.", default=None + description="The root directory for the configuration.", default="." ) reporting: ReportingConfig = Field( diff --git a/graphrag/config/models/text_embedding_config.py b/graphrag/config/models/text_embedding_config.py index 1fde9a41dd..d92c23f1a1 100644 --- a/graphrag/config/models/text_embedding_config.py +++ b/graphrag/config/models/text_embedding_config.py @@ -26,7 +26,7 @@ class TextEmbeddingConfig(LLMConfig): ) skip: list[str] = Field(description="The specific embeddings to skip.", default=[]) vector_store: dict | None = Field( - description="The vector storage configuration", default=defs.VECTOR_STORE + description="The vector storage configuration", default=defs.VECTOR_STORE_DICT ) strategy: dict | None = Field( description="The override strategy to use.", default=None diff --git a/graphrag/index/config/cache.py b/graphrag/index/config/cache.py index be1053de2e..497efd97a5 100644 --- a/graphrag/index/config/cache.py +++ b/graphrag/index/config/cache.py @@ -7,8 +7,7 @@ from typing import Generic, Literal, TypeVar -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field from graphrag.config.enums import CacheType @@ -27,7 +26,7 @@ class PipelineFileCacheConfig(PipelineCacheConfig[Literal[CacheType.file]]): type: Literal[CacheType.file] = CacheType.file """The type of cache.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the cache.", default=None ) """The base directory for the cache.""" @@ -53,22 +52,20 @@ class PipelineBlobCacheConfig(PipelineCacheConfig[Literal[CacheType.blob]]): type: Literal[CacheType.blob] = CacheType.blob """The type of cache.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the cache.", default=None ) """The base directory for the cache.""" - connection_string: str | None = pydantic_Field( + connection_string: str | None = Field( description="The blob cache connection string for the cache.", default=None ) """The blob cache connection string for the cache.""" - container_name: str = pydantic_Field( - description="The container name for cache", default=None - ) + container_name: str = Field(description="The container name for cache", default="") """The container name for cache""" - storage_account_blob_url: str | None = pydantic_Field( + storage_account_blob_url: str | None = Field( description="The storage account blob url for cache", default=None ) """The storage account blob url for cache""" diff --git a/graphrag/index/config/input.py b/graphrag/index/config/input.py index b3e4e89e8b..5d4b08dfa8 100644 --- a/graphrag/index/config/input.py +++ b/graphrag/index/config/input.py @@ -7,8 +7,7 @@ from typing import Generic, Literal, TypeVar -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field from graphrag.config.enums import InputFileType, InputType from graphrag.index.config.workflow import PipelineWorkflowStep @@ -22,49 +21,47 @@ class PipelineInputConfig(BaseModel, Generic[T]): file_type: T """The file type of input.""" - type: InputType | None = pydantic_Field( + type: InputType | None = Field( description="The input type to use.", default=None, ) """The input type to use.""" - connection_string: str | None = pydantic_Field( + connection_string: str | None = Field( description="The blob cache connection string for the input files.", default=None, ) """The blob cache connection string for the input files.""" - storage_account_blob_url: str | None = pydantic_Field( + storage_account_blob_url: str | None = Field( description="The storage account blob url for the input files.", default=None ) """The storage account blob url for the input files.""" - container_name: str | None = pydantic_Field( + container_name: str | None = Field( description="The container name for input files.", default=None ) """The container name for the input files.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the input files.", default=None ) """The base directory for the input files.""" - file_pattern: str = pydantic_Field( - description="The regex file pattern for the input files." - ) + file_pattern: str = Field(description="The regex file pattern for the input files.") """The regex file pattern for the input files.""" - file_filter: dict[str, str] | None = pydantic_Field( + file_filter: dict[str, str] | None = Field( description="The optional file filter for the input files.", default=None ) """The optional file filter for the input files.""" - post_process: list[PipelineWorkflowStep] | None = pydantic_Field( + post_process: list[PipelineWorkflowStep] | None = Field( description="The post processing steps for the input.", default=None ) """The post processing steps for the input.""" - encoding: str | None = pydantic_Field( + encoding: str | None = Field( description="The encoding for the input files.", default=None ) """The encoding for the input files.""" @@ -75,28 +72,28 @@ class PipelineCSVInputConfig(PipelineInputConfig[Literal[InputFileType.csv]]): file_type: Literal[InputFileType.csv] = InputFileType.csv - source_column: str | None = pydantic_Field( + source_column: str | None = Field( description="The column to use as the source of the document.", default=None ) """The column to use as the source of the document.""" - timestamp_column: str | None = pydantic_Field( + timestamp_column: str | None = Field( description="The column to use as the timestamp of the document.", default=None ) """The column to use as the timestamp of the document.""" - timestamp_format: str | None = pydantic_Field( + timestamp_format: str | None = Field( description="The format of the timestamp column, so it can be parsed correctly.", default=None, ) """The format of the timestamp column, so it can be parsed correctly.""" - text_column: str | None = pydantic_Field( + text_column: str | None = Field( description="The column to use as the text of the document.", default=None ) """The column to use as the text of the document.""" - title_column: str | None = pydantic_Field( + title_column: str | None = Field( description="The column to use as the title of the document.", default=None ) """The column to use as the title of the document.""" @@ -108,7 +105,7 @@ class PipelineTextInputConfig(PipelineInputConfig[Literal[InputFileType.text]]): file_type: Literal[InputFileType.text] = InputFileType.text # Text Specific - title_text_length: int | None = pydantic_Field( + title_text_length: int | None = Field( description="Number of characters to use from the text as the title.", default=None, ) diff --git a/graphrag/index/config/pipeline.py b/graphrag/index/config/pipeline.py index 8ee420cc28..839f2c77d2 100644 --- a/graphrag/index/config/pipeline.py +++ b/graphrag/index/config/pipeline.py @@ -6,8 +6,7 @@ from __future__ import annotations from devtools import pformat -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field from graphrag.index.config.cache import PipelineCacheConfigTypes from graphrag.index.config.input import PipelineInputConfigTypes @@ -27,43 +26,41 @@ def __str__(self): """Get a string representation.""" return str(self.model_dump_json(indent=4)) - extends: list[str] | str | None = pydantic_Field( + extends: list[str] | str | None = Field( description="Extends another pipeline configuration", default=None ) """Extends another pipeline configuration""" - input: PipelineInputConfigTypes | None = pydantic_Field( + input: PipelineInputConfigTypes | None = Field( default=None, discriminator="file_type" ) """The input configuration for the pipeline.""" - reporting: PipelineReportingConfigTypes | None = pydantic_Field( + reporting: PipelineReportingConfigTypes | None = Field( default=None, discriminator="type" ) """The reporting configuration for the pipeline.""" - storage: PipelineStorageConfigTypes | None = pydantic_Field( + storage: PipelineStorageConfigTypes | None = Field( default=None, discriminator="type" ) """The storage configuration for the pipeline.""" - update_index_storage: PipelineStorageConfigTypes | None = pydantic_Field( + update_index_storage: PipelineStorageConfigTypes | None = Field( default=None, discriminator="type" ) """The storage configuration for the updated index.""" - cache: PipelineCacheConfigTypes | None = pydantic_Field( - default=None, discriminator="type" - ) + cache: PipelineCacheConfigTypes | None = Field(default=None, discriminator="type") """The cache configuration for the pipeline.""" - root_dir: str | None = pydantic_Field( + root_dir: str | None = Field( description="The root directory for the pipeline. All other paths will be based on this root_dir.", default=None, ) """The root directory for the pipeline.""" - workflows: list[PipelineWorkflowReference] = pydantic_Field( + workflows: list[PipelineWorkflowReference] = Field( description="The workflows for the pipeline.", default_factory=list ) """The workflows for the pipeline.""" diff --git a/graphrag/index/config/reporting.py b/graphrag/index/config/reporting.py index 921e24ae4e..47e99a6e50 100644 --- a/graphrag/index/config/reporting.py +++ b/graphrag/index/config/reporting.py @@ -7,8 +7,7 @@ from typing import Generic, Literal, TypeVar -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field from graphrag.config.enums import ReportingType @@ -27,7 +26,7 @@ class PipelineFileReportingConfig(PipelineReportingConfig[Literal[ReportingType. type: Literal[ReportingType.file] = ReportingType.file """The type of reporting.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the reporting.", default=None ) """The base directory for the reporting.""" @@ -48,23 +47,23 @@ class PipelineBlobReportingConfig(PipelineReportingConfig[Literal[ReportingType. type: Literal[ReportingType.blob] = ReportingType.blob """The type of reporting.""" - connection_string: str | None = pydantic_Field( + connection_string: str | None = Field( description="The blob reporting connection string for the reporting.", default=None, ) """The blob reporting connection string for the reporting.""" - container_name: str = pydantic_Field( - description="The container name for reporting", default=None + container_name: str = Field( + description="The container name for reporting", default="" ) """The container name for reporting""" - storage_account_blob_url: str | None = pydantic_Field( + storage_account_blob_url: str | None = Field( description="The storage account blob url for reporting", default=None ) """The storage account blob url for reporting""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the reporting.", default=None ) """The base directory for the reporting.""" diff --git a/graphrag/index/config/storage.py b/graphrag/index/config/storage.py index 023d50e249..1e939cdf00 100644 --- a/graphrag/index/config/storage.py +++ b/graphrag/index/config/storage.py @@ -7,8 +7,7 @@ from typing import Generic, Literal, TypeVar -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field from graphrag.config.enums import StorageType @@ -27,7 +26,7 @@ class PipelineFileStorageConfig(PipelineStorageConfig[Literal[StorageType.file]] type: Literal[StorageType.file] = StorageType.file """The type of storage.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the storage.", default=None ) """The base directory for the storage.""" @@ -46,22 +45,22 @@ class PipelineBlobStorageConfig(PipelineStorageConfig[Literal[StorageType.blob]] type: Literal[StorageType.blob] = StorageType.blob """The type of storage.""" - connection_string: str | None = pydantic_Field( + connection_string: str | None = Field( description="The blob storage connection string for the storage.", default=None ) """The blob storage connection string for the storage.""" - container_name: str = pydantic_Field( - description="The container name for storage", default=None + container_name: str = Field( + description="The container name for storage", default="" ) """The container name for storage.""" - base_dir: str | None = pydantic_Field( + base_dir: str | None = Field( description="The base directory for the storage.", default=None ) """The base directory for the storage.""" - storage_account_blob_url: str | None = pydantic_Field( + storage_account_blob_url: str | None = Field( description="The storage account blob url.", default=None ) """The storage account blob url.""" diff --git a/graphrag/index/config/workflow.py b/graphrag/index/config/workflow.py index c26fef6ca0..30e77d504f 100644 --- a/graphrag/index/config/workflow.py +++ b/graphrag/index/config/workflow.py @@ -7,8 +7,7 @@ from typing import Any -from pydantic import BaseModel -from pydantic import Field as pydantic_Field +from pydantic import BaseModel, Field PipelineWorkflowStep = dict[str, Any] """Represent a step in a workflow.""" @@ -20,15 +19,15 @@ class PipelineWorkflowReference(BaseModel): """Represent a reference to a workflow, and can optionally be the workflow itself.""" - name: str | None = pydantic_Field(description="Name of the workflow.", default=None) + name: str | None = Field(description="Name of the workflow.", default=None) """Name of the workflow.""" - steps: list[PipelineWorkflowStep] | None = pydantic_Field( + steps: list[PipelineWorkflowStep] | None = Field( description="The optional steps for the workflow.", default=None ) """The optional steps for the workflow.""" - config: PipelineWorkflowConfig | None = pydantic_Field( + config: PipelineWorkflowConfig | None = Field( description="The optional configuration for the workflow.", default=None ) """The optional configuration for the workflow.""" diff --git a/graphrag/index/flows/create_base_entity_graph.py b/graphrag/index/flows/create_base_entity_graph.py index f166e8ac81..14ee8b4861 100644 --- a/graphrag/index/flows/create_base_entity_graph.py +++ b/graphrag/index/flows/create_base_entity_graph.py @@ -160,7 +160,7 @@ def _prep_edges(relationships, summaries) -> pd.DataFrame: def _prep_communities(communities) -> pd.DataFrame: base_communities = pd.DataFrame( - communities, columns=cast(Any, ["level", "community", "title"]) + communities, columns=cast("Any", ["level", "community", "title"]) ) base_communities = base_communities.explode("title") base_communities["community"] = base_communities["community"].astype(int) diff --git a/graphrag/index/flows/create_base_text_units.py b/graphrag/index/flows/create_base_text_units.py index d599db6967..f699d507b7 100644 --- a/graphrag/index/flows/create_base_text_units.py +++ b/graphrag/index/flows/create_base_text_units.py @@ -59,7 +59,7 @@ async def create_base_text_units( strategy=chunk_strategy, ) - chunked = cast(pd.DataFrame, chunked[[*chunk_by_columns, "chunks"]]) + chunked = cast("pd.DataFrame", chunked[[*chunk_by_columns, "chunks"]]) chunked = chunked.explode("chunks") chunked.rename( columns={ @@ -74,7 +74,9 @@ async def create_base_text_units( # rename for downstream consumption chunked.rename(columns={"chunk": "text"}, inplace=True) - output = cast(pd.DataFrame, chunked[chunked["text"].notna()].reset_index(drop=True)) + output = cast( + "pd.DataFrame", chunked[chunked["text"].notna()].reset_index(drop=True) + ) if snapshot_transient_enabled: await snapshot( @@ -103,7 +105,7 @@ def _aggregate_df( output_grouped = input.groupby(lambda _x: True) else: output_grouped = input.groupby(groupby, sort=False) - output = cast(pd.DataFrame, output_grouped.agg(df_aggregations)) + output = cast("pd.DataFrame", output_grouped.agg(df_aggregations)) output.rename( columns={agg.column: agg.to for agg in aggregations_to_apply.values()}, inplace=True, diff --git a/graphrag/index/graph/extractors/community_reports/prep_community_report_context.py b/graphrag/index/graph/extractors/community_reports/prep_community_report_context.py index 22e707c67f..d2bf3a0f5d 100644 --- a/graphrag/index/graph/extractors/community_reports/prep_community_report_context.py +++ b/graphrag/index/graph/extractors/community_reports/prep_community_report_context.py @@ -112,13 +112,13 @@ def _antijoin_reports(df: pd.DataFrame, reports: pd.DataFrame) -> pd.DataFrame: def _sort_and_trim_context(df: pd.DataFrame, max_tokens: int) -> pd.Series: """Sort and trim context to fit the limit.""" - series = cast(pd.Series, df[schemas.ALL_CONTEXT]) + series = cast("pd.Series", df[schemas.ALL_CONTEXT]) return transform_series(series, lambda x: sort_context(x, max_tokens=max_tokens)) def _build_mixed_context(df: pd.DataFrame, max_tokens: int) -> pd.Series: """Sort and trim context to fit the limit.""" - series = cast(pd.Series, df[schemas.ALL_CONTEXT]) + series = cast("pd.Series", df[schemas.ALL_CONTEXT]) return transform_series( series, lambda x: build_mixed_context(x, max_tokens=max_tokens) ) diff --git a/graphrag/index/graph/extractors/graph/graph_extractor.py b/graphrag/index/graph/extractors/graph/graph_extractor.py index fb28f528c9..26df56a945 100644 --- a/graphrag/index/graph/extractors/graph/graph_extractor.py +++ b/graphrag/index/graph/extractors/graph/graph_extractor.py @@ -28,6 +28,8 @@ DEFAULT_COMPLETION_DELIMITER = "<|COMPLETE|>" DEFAULT_ENTITY_TYPES = ["organization", "person", "geo", "event"] +log = logging.getLogger(__name__) + @dataclass class GraphExtractionResult: @@ -126,7 +128,7 @@ async def __call__( source_doc_map[doc_index] = text all_records[doc_index] = result except Exception as e: - logging.exception("error extracting graph") + log.exception("error extracting graph") self._on_error( e, traceback.format_exc(), diff --git a/graphrag/index/graph/utils/stable_lcc.py b/graphrag/index/graph/utils/stable_lcc.py index cbd5243513..e5b0bf60b7 100644 --- a/graphrag/index/graph/utils/stable_lcc.py +++ b/graphrag/index/graph/utils/stable_lcc.py @@ -16,7 +16,7 @@ def stable_largest_connected_component(graph: nx.Graph) -> nx.Graph: from graspologic.utils import largest_connected_component graph = graph.copy() - graph = cast(nx.Graph, largest_connected_component(graph)) + graph = cast("nx.Graph", largest_connected_component(graph)) graph = normalize_node_names(graph) return _stabilize_graph(graph) diff --git a/graphrag/index/input/csv.py b/graphrag/index/input/csv.py index 2872b6887a..f2dd825cc4 100644 --- a/graphrag/index/input/csv.py +++ b/graphrag/index/input/csv.py @@ -28,7 +28,7 @@ async def load( storage: PipelineStorage, ) -> pd.DataFrame: """Load csv inputs from a directory.""" - csv_config = cast(PipelineCSVInputConfig, config) + csv_config = cast("PipelineCSVInputConfig", config) log.info("Loading csv files from %s", csv_config.base_dir) async def load_file(path: str, group: dict | None) -> pd.DataFrame: diff --git a/graphrag/index/input/factory.py b/graphrag/index/input/factory.py index 703bde3586..ee2f0a82cd 100644 --- a/graphrag/index/input/factory.py +++ b/graphrag/index/input/factory.py @@ -78,7 +78,7 @@ async def create_input( ) loader = loaders[config.file_type] results = await loader(config, progress, storage) - return cast(pd.DataFrame, results) + return cast("pd.DataFrame", results) msg = f"Unknown input type {config.file_type}" raise ValueError(msg) diff --git a/graphrag/index/llm/mock_llm.py b/graphrag/index/llm/mock_llm.py index eeae24df00..296c833bc4 100644 --- a/graphrag/index/llm/mock_llm.py +++ b/graphrag/index/llm/mock_llm.py @@ -41,5 +41,9 @@ async def __call__( return LLMOutput( output=ContentResponse(content=response), - parsed_json=cast(TJsonModel, parsed_json), + parsed_json=cast("TJsonModel", parsed_json), ) + + def child(self, name): + """Return a new mock LLM.""" + raise NotImplementedError diff --git a/graphrag/index/operations/chunk_text/chunk_text.py b/graphrag/index/operations/chunk_text/chunk_text.py index 60211ef88b..cea796e9b0 100644 --- a/graphrag/index/operations/chunk_text/chunk_text.py +++ b/graphrag/index/operations/chunk_text/chunk_text.py @@ -72,7 +72,7 @@ def chunk_text( output[to] = output.apply( cast( - Any, + "Any", lambda x: run_strategy(strategy_exec, x[column], strategy_config, tick), ), axis=1, diff --git a/graphrag/index/operations/compute_edge_combined_degree.py b/graphrag/index/operations/compute_edge_combined_degree.py index 1fec455c33..f6c75b008e 100644 --- a/graphrag/index/operations/compute_edge_combined_degree.py +++ b/graphrag/index/operations/compute_edge_combined_degree.py @@ -36,7 +36,7 @@ def join_to_degree(df: pd.DataFrame, column: str) -> pd.DataFrame: output_df[_degree_colname(edge_source_column)] + output_df[_degree_colname(edge_target_column)] ) - return cast(pd.Series, output_df["combined_degree"]) + return cast("pd.Series", output_df["combined_degree"]) def _degree_colname(column: str) -> str: diff --git a/graphrag/index/run/postprocess.py b/graphrag/index/run/postprocess.py index 240df8e435..52c20064ad 100644 --- a/graphrag/index/run/postprocess.py +++ b/graphrag/index/run/postprocess.py @@ -46,5 +46,5 @@ async def _run_post_process_steps( context=context, callbacks=callbacks, ) - dataset = cast(pd.DataFrame, input_workflow.output()) + dataset = cast("pd.DataFrame", input_workflow.output()) return dataset diff --git a/graphrag/index/run/run.py b/graphrag/index/run/run.py index 37034bc1c5..577203ba2f 100644 --- a/graphrag/index/run/run.py +++ b/graphrag/index/run/run.py @@ -226,7 +226,7 @@ async def run_pipeline( context = create_run_context(storage=storage, cache=cache, stats=None) exporter = ParquetExporter( context.storage, - lambda e, s, d: cast(WorkflowCallbacks, callback_chain).on_error( + lambda e, s, d: cast("WorkflowCallbacks", callback_chain).on_error( "Error exporting table", e, s, d ), ) @@ -274,7 +274,7 @@ async def run_pipeline( await _dump_stats(context.stats, context.storage) except Exception as e: log.exception("error running workflow %s", last_workflow) - cast(WorkflowCallbacks, callbacks).on_error( + cast("WorkflowCallbacks", callbacks).on_error( "Error running pipeline!", e, traceback.format_exc() ) yield PipelineRunResult(last_workflow, None, [e]) diff --git a/graphrag/index/run/workflow.py b/graphrag/index/run/workflow.py index 6ec283bce1..87c9185370 100644 --- a/graphrag/index/run/workflow.py +++ b/graphrag/index/run/workflow.py @@ -59,7 +59,7 @@ async def _export_workflow_output( workflow: Workflow, exporter: ParquetExporter ) -> pd.DataFrame: """Export the output from each step of the workflow.""" - output = cast(pd.DataFrame, workflow.output()) + output = cast("pd.DataFrame", workflow.output()) # only write final output that is not empty (i.e. has content) # NOTE: this design is intentional - it accounts for workflow steps with "side effects" that don't produce a formal output to save if not output.empty: diff --git a/graphrag/index/text_splitting/text_splitting.py b/graphrag/index/text_splitting/text_splitting.py index 7ef5dd874c..32b430bb69 100644 --- a/graphrag/index/text_splitting/text_splitting.py +++ b/graphrag/index/text_splitting/text_splitting.py @@ -122,7 +122,7 @@ def num_tokens(self, text: str) -> int: def split_text(self, text: str | list[str]) -> list[str]: """Split text method.""" - if cast(bool, pd.isna(text)) or text == "": + if cast("bool", pd.isna(text)) or text == "": return [] if isinstance(text, list): text = " ".join(text) diff --git a/graphrag/index/utils/dataframes.py b/graphrag/index/utils/dataframes.py index b5a71bf397..949f40fdc8 100644 --- a/graphrag/index/utils/dataframes.py +++ b/graphrag/index/utils/dataframes.py @@ -17,7 +17,7 @@ def drop_columns(df: pd.DataFrame, *column: str) -> pd.DataFrame: def where_column_equals(df: pd.DataFrame, column: str, value: Any) -> pd.DataFrame: """Return a filtered DataFrame where a column equals a value.""" - return cast(pd.DataFrame, df[df[column] == value]) + return cast("pd.DataFrame", df[df[column] == value]) def antijoin(df: pd.DataFrame, exclude: pd.DataFrame, column: str) -> pd.DataFrame: @@ -33,7 +33,7 @@ def antijoin(df: pd.DataFrame, exclude: pd.DataFrame, column: str) -> pd.DataFra def transform_series(series: pd.Series, fn: Callable[[Any], Any]) -> pd.Series: """Apply a transformation function to a series.""" - return cast(pd.Series, series.apply(fn)) + return cast("pd.Series", series.apply(fn)) def join( @@ -50,4 +50,4 @@ def union(*frames: pd.DataFrame) -> pd.DataFrame: def select(df: pd.DataFrame, *columns: str) -> pd.DataFrame: """Select columns from a dataframe.""" - return cast(pd.DataFrame, df[list(columns)]) + return cast("pd.DataFrame", df[list(columns)]) diff --git a/graphrag/index/utils/ds_util.py b/graphrag/index/utils/ds_util.py index d65c69e4a8..e59d30754f 100644 --- a/graphrag/index/utils/ds_util.py +++ b/graphrag/index/utils/ds_util.py @@ -12,7 +12,7 @@ def get_required_input_table(input: VerbInput, name: str) -> TableContainer: """Get a required input table by name.""" - return cast(TableContainer, get_named_input_table(input, name, required=True)) + return cast("TableContainer", get_named_input_table(input, name, required=True)) def get_named_input_table( diff --git a/graphrag/index/workflows/load.py b/graphrag/index/workflows/load.py index 236642d165..5aa874ecba 100644 --- a/graphrag/index/workflows/load.py +++ b/graphrag/index/workflows/load.py @@ -74,7 +74,7 @@ def load_workflows( if is_anonymous: name = f"Anonymous Workflow {anonymous_workflow_count}" anonymous_workflow_count += 1 - name = cast(str, name) + name = cast("str", name) config = reference.config workflow = create_workflow( diff --git a/graphrag/index/workflows/v1/subflows/create_base_entity_graph.py b/graphrag/index/workflows/v1/subflows/create_base_entity_graph.py index 449dd2a5ad..194e56b0d8 100644 --- a/graphrag/index/workflows/v1/subflows/create_base_entity_graph.py +++ b/graphrag/index/workflows/v1/subflows/create_base_entity_graph.py @@ -61,4 +61,4 @@ async def create_base_entity_graph( snapshot_transient_enabled=snapshot_transient_enabled, ) - return create_verb_result(cast(Table, pd.DataFrame())) + return create_verb_result(cast("Table", pd.DataFrame())) diff --git a/graphrag/index/workflows/v1/subflows/create_base_text_units.py b/graphrag/index/workflows/v1/subflows/create_base_text_units.py index 507a265856..36a33d9044 100644 --- a/graphrag/index/workflows/v1/subflows/create_base_text_units.py +++ b/graphrag/index/workflows/v1/subflows/create_base_text_units.py @@ -32,7 +32,7 @@ async def create_base_text_units( **_kwargs: dict, ) -> VerbResult: """All the steps to transform base text_units.""" - source = cast(pd.DataFrame, input.get_input()) + source = cast("pd.DataFrame", input.get_input()) output = await create_base_text_units_flow( source, @@ -47,7 +47,7 @@ async def create_base_text_units( return create_verb_result( cast( - Table, + "Table", pd.DataFrame(), ) ) diff --git a/graphrag/index/workflows/v1/subflows/create_final_communities.py b/graphrag/index/workflows/v1/subflows/create_final_communities.py index d858980f9f..de200a1393 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_communities.py +++ b/graphrag/index/workflows/v1/subflows/create_final_communities.py @@ -34,7 +34,7 @@ async def create_final_communities( return create_verb_result( cast( - Table, + "Table", output, ) ) diff --git a/graphrag/index/workflows/v1/subflows/create_final_community_reports.py b/graphrag/index/workflows/v1/subflows/create_final_community_reports.py index 1b58a4f745..88a3e6dd8a 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_community_reports.py +++ b/graphrag/index/workflows/v1/subflows/create_final_community_reports.py @@ -3,9 +3,8 @@ """All the steps to transform community reports.""" -from typing import cast +from typing import TYPE_CHECKING, cast -import pandas as pd from datashaper import ( AsyncType, Table, @@ -21,6 +20,9 @@ ) from graphrag.index.utils.ds_util import get_named_input_table, get_required_input_table +if TYPE_CHECKING: + import pandas as pd + @verb(name="create_final_community_reports", treats_input_tables_as_immutable=True) async def create_final_community_reports( @@ -33,16 +35,16 @@ async def create_final_community_reports( **_kwargs: dict, ) -> VerbResult: """All the steps to transform community reports.""" - nodes = cast(pd.DataFrame, input.get_input()) - edges = cast(pd.DataFrame, get_required_input_table(input, "relationships").table) - entities = cast(pd.DataFrame, get_required_input_table(input, "entities").table) + nodes = cast("pd.DataFrame", input.get_input()) + edges = cast("pd.DataFrame", get_required_input_table(input, "relationships").table) + entities = cast("pd.DataFrame", get_required_input_table(input, "entities").table) communities = cast( - pd.DataFrame, get_required_input_table(input, "communities").table + "pd.DataFrame", get_required_input_table(input, "communities").table ) claims = get_named_input_table(input, "covariates") if claims: - claims = cast(pd.DataFrame, claims.table) + claims = cast("pd.DataFrame", claims.table) output = await create_final_community_reports_flow( nodes, @@ -59,7 +61,7 @@ async def create_final_community_reports( return create_verb_result( cast( - Table, + "Table", output, ) ) diff --git a/graphrag/index/workflows/v1/subflows/create_final_covariates.py b/graphrag/index/workflows/v1/subflows/create_final_covariates.py index c4f1795dd5..b8ff11d65f 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_covariates.py +++ b/graphrag/index/workflows/v1/subflows/create_final_covariates.py @@ -46,4 +46,4 @@ async def create_final_covariates( num_threads=num_threads, ) - return create_verb_result(cast(Table, output)) + return create_verb_result(cast("Table", output)) diff --git a/graphrag/index/workflows/v1/subflows/create_final_documents.py b/graphrag/index/workflows/v1/subflows/create_final_documents.py index 8ec3541cff..94d6d692b3 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_documents.py +++ b/graphrag/index/workflows/v1/subflows/create_final_documents.py @@ -3,9 +3,8 @@ """All the steps to transform final documents.""" -from typing import cast +from typing import TYPE_CHECKING, cast -import pandas as pd from datashaper import ( Table, VerbInput, @@ -18,6 +17,9 @@ ) from graphrag.storage.pipeline_storage import PipelineStorage +if TYPE_CHECKING: + import pandas as pd + @verb( name="create_final_documents", @@ -30,9 +32,9 @@ async def create_final_documents( **_kwargs: dict, ) -> VerbResult: """All the steps to transform final documents.""" - source = cast(pd.DataFrame, input.get_input()) + source = cast("pd.DataFrame", input.get_input()) text_units = await runtime_storage.get("base_text_units") output = create_final_documents_flow(source, text_units, document_attribute_columns) - return create_verb_result(cast(Table, output)) + return create_verb_result(cast("Table", output)) diff --git a/graphrag/index/workflows/v1/subflows/create_final_entities.py b/graphrag/index/workflows/v1/subflows/create_final_entities.py index 914682755b..1a8ff57410 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_entities.py +++ b/graphrag/index/workflows/v1/subflows/create_final_entities.py @@ -30,4 +30,4 @@ async def create_final_entities( output = create_final_entities_flow(base_entity_nodes) - return create_verb_result(cast(Table, output)) + return create_verb_result(cast("Table", output)) diff --git a/graphrag/index/workflows/v1/subflows/create_final_nodes.py b/graphrag/index/workflows/v1/subflows/create_final_nodes.py index 16486d7072..92bd6e34fc 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_nodes.py +++ b/graphrag/index/workflows/v1/subflows/create_final_nodes.py @@ -42,7 +42,7 @@ async def create_final_nodes( return create_verb_result( cast( - Table, + "Table", output, ) ) diff --git a/graphrag/index/workflows/v1/subflows/create_final_relationships.py b/graphrag/index/workflows/v1/subflows/create_final_relationships.py index d7ec1e43d5..919954dc7c 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_relationships.py +++ b/graphrag/index/workflows/v1/subflows/create_final_relationships.py @@ -31,4 +31,4 @@ async def create_final_relationships( output = create_final_relationships_flow(base_relationship_edges, base_entity_nodes) - return create_verb_result(cast(Table, output)) + return create_verb_result(cast("Table", output)) diff --git a/graphrag/index/workflows/v1/subflows/create_final_text_units.py b/graphrag/index/workflows/v1/subflows/create_final_text_units.py index 2810d060af..2db0e79c9b 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_text_units.py +++ b/graphrag/index/workflows/v1/subflows/create_final_text_units.py @@ -3,9 +3,8 @@ """All the steps to transform the text units.""" -from typing import cast +from typing import TYPE_CHECKING, cast -import pandas as pd from datashaper import ( Table, VerbInput, @@ -20,6 +19,9 @@ from graphrag.index.utils.ds_util import get_named_input_table, get_required_input_table from graphrag.storage.pipeline_storage import PipelineStorage +if TYPE_CHECKING: + import pandas as pd + @verb(name="create_final_text_units", treats_input_tables_as_immutable=True) async def create_final_text_units( @@ -30,15 +32,15 @@ async def create_final_text_units( """All the steps to transform the text units.""" text_units = await runtime_storage.get("base_text_units") final_entities = cast( - pd.DataFrame, get_required_input_table(input, "entities").table + "pd.DataFrame", get_required_input_table(input, "entities").table ) final_relationships = cast( - pd.DataFrame, get_required_input_table(input, "relationships").table + "pd.DataFrame", get_required_input_table(input, "relationships").table ) final_covariates = get_named_input_table(input, "covariates") if final_covariates: - final_covariates = cast(pd.DataFrame, final_covariates.table) + final_covariates = cast("pd.DataFrame", final_covariates.table) output = create_final_text_units_flow( text_units, @@ -47,4 +49,4 @@ async def create_final_text_units( final_covariates, ) - return create_verb_result(cast(Table, output)) + return create_verb_result(cast("Table", output)) diff --git a/graphrag/index/workflows/v1/subflows/generate_text_embeddings.py b/graphrag/index/workflows/v1/subflows/generate_text_embeddings.py index b44513a677..5e50bd1978 100644 --- a/graphrag/index/workflows/v1/subflows/generate_text_embeddings.py +++ b/graphrag/index/workflows/v1/subflows/generate_text_embeddings.py @@ -38,19 +38,19 @@ async def generate_text_embeddings( **_kwargs: dict, ) -> VerbResult: """All the steps to generate embeddings.""" - source = cast(pd.DataFrame, input.get_input()) + source = cast("pd.DataFrame", input.get_input()) final_relationships = cast( - pd.DataFrame, get_required_input_table(input, "relationships").table + "pd.DataFrame", get_required_input_table(input, "relationships").table ) final_text_units = cast( - pd.DataFrame, get_required_input_table(input, "text_units").table + "pd.DataFrame", get_required_input_table(input, "text_units").table ) final_entities = cast( - pd.DataFrame, get_required_input_table(input, "entities").table + "pd.DataFrame", get_required_input_table(input, "entities").table ) final_community_reports = cast( - pd.DataFrame, get_required_input_table(input, "community_reports").table + "pd.DataFrame", get_required_input_table(input, "community_reports").table ) await generate_text_embeddings_flow( @@ -67,4 +67,4 @@ async def generate_text_embeddings( snapshot_embeddings_enabled=snapshot_embeddings_enabled, ) - return create_verb_result(cast(Table, pd.DataFrame())) + return create_verb_result(cast("Table", pd.DataFrame())) diff --git a/graphrag/query/context_builder/community_context.py b/graphrag/query/context_builder/community_context.py index 287edb48e2..2a0329dea1 100644 --- a/graphrag/query/context_builder/community_context.py +++ b/graphrag/query/context_builder/community_context.py @@ -254,7 +254,7 @@ def _convert_report_context_to_df( record_df = pd.DataFrame( context_records, - columns=cast(Any, header), + columns=cast("Any", header), ) return _rank_report_context( report_df=record_df, diff --git a/graphrag/query/context_builder/local_context.py b/graphrag/query/context_builder/local_context.py index 7cb61e3e8c..d0e266d800 100644 --- a/graphrag/query/context_builder/local_context.py +++ b/graphrag/query/context_builder/local_context.py @@ -80,7 +80,7 @@ def build_entity_context( if len(all_context_records) > 1: record_df = pd.DataFrame( - all_context_records[1:], columns=cast(Any, all_context_records[0]) + all_context_records[1:], columns=cast("Any", all_context_records[0]) ) else: record_df = pd.DataFrame() @@ -144,7 +144,7 @@ def build_covariates_context( if len(all_context_records) > 1: record_df = pd.DataFrame( - all_context_records[1:], columns=cast(Any, all_context_records[0]) + all_context_records[1:], columns=cast("Any", all_context_records[0]) ) else: record_df = pd.DataFrame() @@ -217,7 +217,7 @@ def build_relationship_context( if len(all_context_records) > 1: record_df = pd.DataFrame( - all_context_records[1:], columns=cast(Any, all_context_records[0]) + all_context_records[1:], columns=cast("Any", all_context_records[0]) ) else: record_df = pd.DataFrame() diff --git a/graphrag/query/context_builder/source_context.py b/graphrag/query/context_builder/source_context.py index b8ba86aee4..6a87d29af5 100644 --- a/graphrag/query/context_builder/source_context.py +++ b/graphrag/query/context_builder/source_context.py @@ -71,7 +71,7 @@ def build_text_unit_context( if len(all_context_records) > 1: record_df = pd.DataFrame( - all_context_records[1:], columns=cast(Any, all_context_records[0]) + all_context_records[1:], columns=cast("Any", all_context_records[0]) ) else: record_df = pd.DataFrame() diff --git a/graphrag/query/indexer_adapters.py b/graphrag/query/indexer_adapters.py index 3bad1c7afe..80d9c8a7d4 100644 --- a/graphrag/query/indexer_adapters.py +++ b/graphrag/query/indexer_adapters.py @@ -153,7 +153,7 @@ def read_indexer_entities( if community_level is not None: nodes_df = _filter_under_community_level(nodes_df, community_level) - nodes_df = cast(pd.DataFrame, nodes_df[["id", "degree", "community"]]) + nodes_df = cast("pd.DataFrame", nodes_df[["id", "degree", "community"]]) nodes_df["community"] = nodes_df["community"].fillna(-1) nodes_df["community"] = nodes_df["community"].astype(int) @@ -272,6 +272,6 @@ def _filter_under_community_level( df: pd.DataFrame, community_level: int ) -> pd.DataFrame: return cast( - pd.DataFrame, + "pd.DataFrame", df[df.level <= community_level], ) diff --git a/graphrag/query/input/retrieval/community_reports.py b/graphrag/query/input/retrieval/community_reports.py index 7fb38b4f96..9d6af9bb55 100644 --- a/graphrag/query/input/retrieval/community_reports.py +++ b/graphrag/query/input/retrieval/community_reports.py @@ -72,4 +72,4 @@ def to_community_report_dataframe( if include_community_rank: new_record.append(str(report.rank)) records.append(new_record) - return pd.DataFrame(records, columns=cast(Any, header)) + return pd.DataFrame(records, columns=cast("Any", header)) diff --git a/graphrag/query/input/retrieval/covariates.py b/graphrag/query/input/retrieval/covariates.py index 4ca5ba13f1..c52f565f81 100644 --- a/graphrag/query/input/retrieval/covariates.py +++ b/graphrag/query/input/retrieval/covariates.py @@ -50,4 +50,4 @@ def to_covariate_dataframe(covariates: list[Covariate]) -> pd.DataFrame: ) new_record.append(field_value) records.append(new_record) - return pd.DataFrame(records, columns=cast(Any, header)) + return pd.DataFrame(records, columns=cast("Any", header)) diff --git a/graphrag/query/input/retrieval/entities.py b/graphrag/query/input/retrieval/entities.py index 0384ceaf90..cc80bf8593 100644 --- a/graphrag/query/input/retrieval/entities.py +++ b/graphrag/query/input/retrieval/entities.py @@ -89,7 +89,7 @@ def to_entity_dataframe( ) new_record.append(field_value) records.append(new_record) - return pd.DataFrame(records, columns=cast(Any, header)) + return pd.DataFrame(records, columns=cast("Any", header)) def is_valid_uuid(value: str) -> bool: diff --git a/graphrag/query/input/retrieval/relationships.py b/graphrag/query/input/retrieval/relationships.py index 86ddd9efd1..5eb7231bc9 100644 --- a/graphrag/query/input/retrieval/relationships.py +++ b/graphrag/query/input/retrieval/relationships.py @@ -136,4 +136,4 @@ def to_relationship_dataframe( ) new_record.append(field_value) records.append(new_record) - return pd.DataFrame(records, columns=cast(Any, header)) + return pd.DataFrame(records, columns=cast("Any", header)) diff --git a/graphrag/query/input/retrieval/text_units.py b/graphrag/query/input/retrieval/text_units.py index 1a0305bc3d..371fd36130 100644 --- a/graphrag/query/input/retrieval/text_units.py +++ b/graphrag/query/input/retrieval/text_units.py @@ -50,4 +50,4 @@ def to_text_unit_dataframe(text_units: list[TextUnit]) -> pd.DataFrame: ], ] records.append(new_record) - return pd.DataFrame(records, columns=cast(Any, header)) + return pd.DataFrame(records, columns=cast("Any", header)) diff --git a/graphrag/query/llm/oai/typing.py b/graphrag/query/llm/oai/typing.py index f8bd2d702e..cdebf41ac7 100644 --- a/graphrag/query/llm/oai/typing.py +++ b/graphrag/query/llm/oai/typing.py @@ -11,11 +11,11 @@ OPENAI_RETRY_ERROR_TYPES = ( # TODO: update these when we update to OpenAI 1+ library - cast(Any, openai).RateLimitError, - cast(Any, openai).APIConnectionError, - cast(Any, openai).APIError, - cast(Any, httpx).RemoteProtocolError, - cast(Any, httpx).ReadTimeout, + cast("Any", openai).RateLimitError, + cast("Any", openai).APIConnectionError, + cast("Any", openai).APIError, + cast("Any", httpx).RemoteProtocolError, + cast("Any", httpx).ReadTimeout, # TODO: replace with comparable OpenAI 1+ error ) diff --git a/graphrag/query/llm/text_utils.py b/graphrag/query/llm/text_utils.py index 2d5e0c371e..041c9e9572 100644 --- a/graphrag/query/llm/text_utils.py +++ b/graphrag/query/llm/text_utils.py @@ -62,9 +62,9 @@ def try_parse_json_object(input: str) -> tuple[str, dict]: if result: return input, result - _pattern = r"\{(.*)\}" - _match = re.search(_pattern, input, re.DOTALL) - input = "{" + _match.group(1) + "}" if _match else input + pattern = r"\{(.*)\}" + match = re.search(pattern, input, re.DOTALL) + input = "{" + match.group(1) + "}" if match else input # Clean up json string. input = ( diff --git a/graphrag/query/question_gen/local_gen.py b/graphrag/query/question_gen/local_gen.py index 7ba7bb1f0a..74ed1d5a4b 100644 --- a/graphrag/query/question_gen/local_gen.py +++ b/graphrag/query/question_gen/local_gen.py @@ -75,7 +75,7 @@ async def agenerate( if context_data is None: # generate context data based on the question history result = cast( - ContextBuilderResult, + "ContextBuilderResult", self.context_builder.build_context( query=question_text, conversation_history=conversation_history, @@ -83,7 +83,7 @@ async def agenerate( **self.context_builder_params, ), ) - context_data = cast(str, result.context_chunks) + context_data = cast("str", result.context_chunks) context_records = result.context_records else: context_records = {"context_data": context_data} @@ -153,7 +153,7 @@ def generate( if context_data is None: # generate context data based on the question history result = cast( - ContextBuilderResult, + "ContextBuilderResult", self.context_builder.build_context( query=question_text, conversation_history=conversation_history, @@ -161,7 +161,7 @@ def generate( **self.context_builder_params, ), ) - context_data = cast(str, result.context_chunks) + context_data = cast("str", result.context_chunks) context_records = result.context_records else: context_records = {"context_data": context_data} diff --git a/graphrag/query/structured_search/global_search/search.py b/graphrag/query/structured_search/global_search/search.py index d0f0a7c574..ec0a5b71ec 100644 --- a/graphrag/query/structured_search/global_search/search.py +++ b/graphrag/query/structured_search/global_search/search.py @@ -277,8 +277,8 @@ def parse_search_response(self, search_response: str) -> list[dict[str, Any]]: list[dict[str, Any]] A list of key points, each key point is a dictionary with "answer" and "score" keys """ - search_response, _j = try_parse_json_object(search_response) - if _j == {}: + search_response, j = try_parse_json_object(search_response) + if j == {}: return [{"answer": "", "score": 0}] parsed_elements = json.loads(search_response).get("points") diff --git a/graphrag/storage/blob_pipeline_storage.py b/graphrag/storage/blob_pipeline_storage.py index 9bb39e309e..560c2eb048 100644 --- a/graphrag/storage/blob_pipeline_storage.py +++ b/graphrag/storage/blob_pipeline_storage.py @@ -345,7 +345,7 @@ def validate_blob_container_name(container_name: str): ) # Check for valid characters (letters, numbers, hyphen) and lowercase letters - if not re.match("^[a-z0-9-]+$", container_name): + if not re.match(r"^[a-z0-9-]+$", container_name): return ValueError( f"Container name must only contain:\n- lowercase letters\n- numbers\n- or hyphens\nName provided was {container_name}." ) diff --git a/graphrag/storage/factory.py b/graphrag/storage/factory.py index b7b677808d..b3efc3d5ed 100644 --- a/graphrag/storage/factory.py +++ b/graphrag/storage/factory.py @@ -5,18 +5,20 @@ from __future__ import annotations -from typing import cast +from typing import TYPE_CHECKING, cast from graphrag.config.enums import StorageType -from graphrag.index.config.storage import ( - PipelineBlobStorageConfig, - PipelineFileStorageConfig, - PipelineStorageConfig, -) from graphrag.storage.blob_pipeline_storage import create_blob_storage from graphrag.storage.file_pipeline_storage import create_file_storage from graphrag.storage.memory_pipeline_storage import MemoryPipelineStorage +if TYPE_CHECKING: + from graphrag.index.config.storage import ( + PipelineBlobStorageConfig, + PipelineFileStorageConfig, + PipelineStorageConfig, + ) + def create_storage(config: PipelineStorageConfig): """Create a storage object based on the config.""" @@ -24,7 +26,7 @@ def create_storage(config: PipelineStorageConfig): case StorageType.memory: return MemoryPipelineStorage() case StorageType.blob: - config = cast(PipelineBlobStorageConfig, config) + config = cast("PipelineBlobStorageConfig", config) return create_blob_storage( config.connection_string, config.storage_account_blob_url, @@ -32,7 +34,7 @@ def create_storage(config: PipelineStorageConfig): config.base_dir, ) case StorageType.file: - config = cast(PipelineFileStorageConfig, config) + config = cast("PipelineFileStorageConfig", config) return create_file_storage(config.base_dir) case _: msg = f"Unknown storage type: {config.type}" diff --git a/graphrag/storage/file_pipeline_storage.py b/graphrag/storage/file_pipeline_storage.py index 082569d08d..12c08cdc10 100644 --- a/graphrag/storage/file_pipeline_storage.py +++ b/graphrag/storage/file_pipeline_storage.py @@ -102,7 +102,7 @@ async def _read_file( async with aiofiles.open( path, - cast(Any, read_type), + cast("Any", read_type), encoding=encoding, ) as f: return await f.read() @@ -114,7 +114,7 @@ async def set(self, key: str, value: Any, encoding: str | None = None) -> None: encoding = None if is_bytes else encoding or self._encoding async with aiofiles.open( join_path(self._root_dir, key), - cast(Any, write_type), + cast("Any", write_type), encoding=encoding, ) as f: await f.write(value) @@ -144,7 +144,7 @@ def child(self, name: str | None) -> "PipelineStorage": def keys(self) -> list[str]: """Return the keys in the storage.""" - return os.listdir(self._root_dir) + return [item.name for item in Path(self._root_dir).iterdir() if item.is_file()] def join_path(file_path: str, file_name: str) -> Path: diff --git a/poetry.lock b/poetry.lock index 20f682466b..7f364e763b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -13,13 +13,13 @@ files = [ [[package]] name = "aiolimiter" -version = "1.1.0" +version = "1.2.0" description = "asyncio rate limiter, a leaky bucket implementation" optional = false -python-versions = ">=3.7,<4.0" +python-versions = "<4.0,>=3.8" files = [ - {file = "aiolimiter-1.1.0-py3-none-any.whl", hash = "sha256:0b4997961fc58b8df40279e739f9cf0d3e255e63e9a44f64df567a8c17241e24"}, - {file = "aiolimiter-1.1.0.tar.gz", hash = "sha256:461cf02f82a29347340d031626c92853645c099cb5ff85577b831a7bd21132b5"}, + {file = "aiolimiter-1.2.0-py3-none-any.whl", hash = "sha256:e3fc486a4506248cfdd1f3976920459945944518bbb1d1e6b2be1060232829e2"}, + {file = "aiolimiter-1.2.0.tar.gz", hash = "sha256:761455d26df0d7a393f78bd39b022579e02ca5a65beb303a67bed2ded2f740ac"}, ] [[package]] @@ -291,13 +291,13 @@ typing-extensions = ">=4.6.0" [[package]] name = "azure-storage-blob" -version = "12.23.1" +version = "12.24.0" description = "Microsoft Azure Blob Storage Client Library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "azure_storage_blob-12.23.1-py3-none-any.whl", hash = "sha256:1c2238aa841d1545f42714a5017c010366137a44a0605da2d45f770174bfc6b4"}, - {file = "azure_storage_blob-12.23.1.tar.gz", hash = "sha256:a587e54d4e39d2a27bd75109db164ffa2058fe194061e5446c5a89bca918272f"}, + {file = "azure_storage_blob-12.24.0-py3-none-any.whl", hash = "sha256:4f0bb4592ea79a2d986063696514c781c9e62be240f09f6397986e01755bc071"}, + {file = "azure_storage_blob-12.24.0.tar.gz", hash = "sha256:eaaaa1507c8c363d6e1d1342bd549938fdf1adec9b1ada8658c8f5bf3aea844e"}, ] [package.dependencies] @@ -379,17 +379,6 @@ webencodings = "*" [package.extras] css = ["tinycss2 (>=1.1.0,<1.5)"] -[[package]] -name = "cachetools" -version = "5.5.0" -description = "Extensible memoizing collections and decorators" -optional = false -python-versions = ">=3.7" -files = [ - {file = "cachetools-5.5.0-py3-none-any.whl", hash = "sha256:02134e8439cdc2ffb62023ce1debca2944c3f289d66bb17ead3ab3dede74b292"}, - {file = "cachetools-5.5.0.tar.gz", hash = "sha256:2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a"}, -] - [[package]] name = "certifi" version = "2024.8.30" @@ -948,28 +937,30 @@ packaging = "*" [[package]] name = "deptry" -version = "0.20.0" +version = "0.21.1" description = "A command line utility to check for unused, missing and transitive dependencies in a Python project." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "deptry-0.20.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:41434d95124851b83cb05524d1a09ad6fea62006beafed2ef90a6b501c1b237f"}, - {file = "deptry-0.20.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:b3b4b22d1406147de5d606a24042126cd74d52fdfdb0232b9c5fd0270d601610"}, - {file = "deptry-0.20.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:012fb106dbea6ca95196cdcd75ac90c516c8f01292f7934f2e802a7cf025a660"}, - {file = "deptry-0.20.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8ce3920e2bd6d2b4427ab31ab8efb94bbef897001c2d395782bc30002966d12d"}, - {file = "deptry-0.20.0-cp38-abi3-win_amd64.whl", hash = "sha256:0c90ce64e637d0e902bc97c5a020adecfee9e9f09ee0bf4c61554994139bebdb"}, - {file = "deptry-0.20.0-cp38-abi3-win_arm64.whl", hash = "sha256:6886ff44aaf26fd83093f14f844ebc84589d90df9bbad9a1625e8a080e6f1be2"}, - {file = "deptry-0.20.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ace3b39b1d0763f357c79bab003d1b135bea2eb61102be539992621a42d1ac7b"}, - {file = "deptry-0.20.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d1a00f8c9e6c0829a4a523edd5e526e3df06d2b50e0a99446f09f9723df2efad"}, - {file = "deptry-0.20.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e233859f150df70ffff76e95f9b7326fc25494b9beb26e776edae20f0f515e7d"}, - {file = "deptry-0.20.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f92e7e97ef42477717747b190bc6796ab94b35655af126d8c577f7eae0eb3a9"}, - {file = "deptry-0.20.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f6cee6005997791bb77155667be055333fb63ae9a24f0f103f25faf1e7affe34"}, - {file = "deptry-0.20.0.tar.gz", hash = "sha256:62e9aaf3aea9e2ca66c85da98a0ba0290b4d3daea4e1d0ad937d447bd3c36402"}, + {file = "deptry-0.21.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c31e1a66502e28870e1e0a679598462a6119f4bcb656786e63cb545328170a3f"}, + {file = "deptry-0.21.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:4b53089c22d18076935a3e9e6325566fa712cd9b89fe602978a8e85f0f4209bf"}, + {file = "deptry-0.21.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5eae7afbcb9b7f6baa855b323e0da016a23f2a98d4b181dcfd2c71766512387"}, + {file = "deptry-0.21.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4afef1c5eb0b48ebc31de2437b460df0363cb99722252b7faf7fa6f43e10cbcd"}, + {file = "deptry-0.21.1-cp39-abi3-win_amd64.whl", hash = "sha256:981a28e1feeaad82f07a6e3c8d7842c5f6eae3807dc13b24d453a20cd0a42a72"}, + {file = "deptry-0.21.1-cp39-abi3-win_arm64.whl", hash = "sha256:98075550540c6b45f57abdfc453900bd2a179dc495d986ccc0757a813ee55103"}, + {file = "deptry-0.21.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:79593d7631cdbbc39d76503e3af80e46d8b4873e915b85c1567a04c81e8a17d5"}, + {file = "deptry-0.21.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:145a172ea608bb86dd93a9d14f7d45ed8649a36d7f685ea725e0348cbf562f10"}, + {file = "deptry-0.21.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e487f520d4fbee513f4767ab98334a29d5d932f78eb413b64e27c977f2bf2756"}, + {file = "deptry-0.21.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:091288cad2bd6029995d2e700e965cd574079365807f202ee232e4be0a571f43"}, + {file = "deptry-0.21.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1adf29a5aa1d33d9e1140b9235b212d9753278604b4389b2186f638692e29876"}, + {file = "deptry-0.21.1.tar.gz", hash = "sha256:60332b8d58d6584b340511a4e1b694048499f273d69eaea413631b2e8bc186ff"}, ] [package.dependencies] click = ">=8.0.0,<9" colorama = {version = ">=0.4.6", markers = "sys_platform == \"win32\""} +packaging = ">=23.2" +requirements-parser = ">=0.11.0,<1" tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} [[package]] @@ -1074,13 +1065,13 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc [[package]] name = "fnllm" -version = "0.0.8" +version = "0.0.10" description = "A function-based LLM protocol and wrapper." optional = false python-versions = ">=3.10" files = [ - {file = "fnllm-0.0.8-py3-none-any.whl", hash = "sha256:f8dbfa97ad6d7102db06c841348ffe57009f1e174f491cd5c9284be73aec4b33"}, - {file = "fnllm-0.0.8.tar.gz", hash = "sha256:67c1fb9c00680fae0b9348f07f9b382c194616e33be214080a6ef07d539a49c3"}, + {file = "fnllm-0.0.10-py3-none-any.whl", hash = "sha256:e676001d9b0ebbe194590393d427385760adaefcab6a456268e4f13a0e9d2cb6"}, + {file = "fnllm-0.0.10.tar.gz", hash = "sha256:ece859432b83a462dc35db6483f36313ff935b79f437186daa44e3679f4f49cf"}, ] [package.dependencies] @@ -1326,13 +1317,13 @@ trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, - {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -1340,7 +1331,6 @@ anyio = "*" certifi = "*" httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] @@ -1639,13 +1629,13 @@ files = [ [[package]] name = "json-repair" -version = "0.30.1" +version = "0.30.3" description = "A package to repair broken json strings" optional = false python-versions = ">=3.9" files = [ - {file = "json_repair-0.30.1-py3-none-any.whl", hash = "sha256:6fa8a05d246e282df2f812fa542bd837d671d7774eaae11191aabaac97d41e33"}, - {file = "json_repair-0.30.1.tar.gz", hash = "sha256:5f075c4e3b098d78fb6cd60c34aec07a4517f14e9d423ad5364214b0e870e218"}, + {file = "json_repair-0.30.3-py3-none-any.whl", hash = "sha256:63bb588162b0958ae93d85356ecbe54c06b8c33f8a4834f93fa2719ea669804e"}, + {file = "json_repair-0.30.3.tar.gz", hash = "sha256:0ac56e7ae9253ee9c507a7e1a3a26799c9b0bbe5e2bec1b2cc5053e90d5b05e3"}, ] [[package]] @@ -2127,29 +2117,25 @@ files = [ [[package]] name = "lancedb" -version = "0.13.0" +version = "0.17.0" description = "lancedb" optional = false python-versions = ">=3.9" files = [ - {file = "lancedb-0.13.0-cp38-abi3-macosx_10_15_x86_64.whl", hash = "sha256:3fb1b1e5b03d287d1f6969887fe17c8fa9501ab0da57dd6788181610028d8e37"}, - {file = "lancedb-0.13.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:0f970c46af46c3fb59979f155f9bc1e2c2d597f23286708b5880e20fa9000c2c"}, - {file = "lancedb-0.13.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:045ce4b59bdd3df6aa538366ed8f20a5abfcf120fca7b0389e119dbdc4d08d6d"}, - {file = "lancedb-0.13.0-cp38-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:7ae7be0f39a854e62838deae679f77ca1d39ea64a932a5e5e7f417cd5aece103"}, - {file = "lancedb-0.13.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4cdd18788d79f200baaa3003a69779e18fb9e661b4b9e658898e906dca0b60ab"}, - {file = "lancedb-0.13.0-cp38-abi3-win_amd64.whl", hash = "sha256:ebba3ebdd37d6d4555de8a9366068db38971eaf7c996c5ad1dd14ff36caf9b94"}, + {file = "lancedb-0.17.0-cp39-abi3-macosx_10_15_x86_64.whl", hash = "sha256:40aac1583edda390e51189c4e95bdfd4768d23705234e12a7b81957f1143df42"}, + {file = "lancedb-0.17.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:895bed499dae61cac1dbfc40ad71a566e06ab5c8d538aa57873a0cba859f8a7a"}, + {file = "lancedb-0.17.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ea688d0f63796ee912a7cfe6667f36661e36756fa8340b94dd54d666a7db63f"}, + {file = "lancedb-0.17.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:f51a61950ead30a605b5653a81e8362e4aac6fec32705b88b9c9319e9308b2bb"}, + {file = "lancedb-0.17.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:07e6f10b3fcbeb6c737996e5ebd68d04c3ca2656a9b8b970111ecf368245e7f6"}, + {file = "lancedb-0.17.0-cp39-abi3-win_amd64.whl", hash = "sha256:9d7e82f83f430d906c285d3303729258b21b1cc8da634c9f7017e354bcb7318a"}, ] [package.dependencies] -attrs = ">=21.3.0" -cachetools = "*" deprecation = "*" overrides = ">=0.7" packaging = "*" pydantic = ">=1.10" -pylance = "0.17.0" -requests = ">=2.31.0" -retry = ">=0.9.2" +pylance = "0.20.0" tqdm = ">=4.27.0" [package.extras] @@ -2157,7 +2143,7 @@ azure = ["adlfs (>=2024.2.0)"] clip = ["open-clip", "pillow", "torch"] dev = ["pre-commit", "ruff"] docs = ["mkdocs", "mkdocs-jupyter", "mkdocs-material", "mkdocstrings[python]"] -embeddings = ["awscli (>=1.29.57)", "boto3 (>=1.28.57)", "botocore (>=1.31.57)", "cohere", "google-generativeai", "huggingface-hub", "ibm-watsonx-ai (>=1.1.2)", "instructorembedding", "ollama", "open-clip-torch", "openai (>=1.6.1)", "pillow", "sentence-transformers", "torch"] +embeddings = ["awscli (>=1.29.57)", "boto3 (>=1.28.57)", "botocore (>=1.31.57)", "cohere", "google-generativeai", "huggingface-hub", "ibm-watsonx-ai (>=1.1.2)", "instructorembedding", "ollama", "open-clip-torch", "openai (>=1.6.1)", "pillow", "requests (>=2.31.0)", "sentence-transformers", "torch"] tests = ["aiohttp", "boto3", "duckdb", "pandas (>=1.4)", "polars (>=0.19,<=1.3.0)", "pytest", "pytest-asyncio", "pytest-mock", "pytz", "tantivy"] [[package]] @@ -2882,13 +2868,13 @@ files = [ [[package]] name = "openai" -version = "1.54.1" +version = "1.57.0" description = "The official Python library for the openai API" optional = false python-versions = ">=3.8" files = [ - {file = "openai-1.54.1-py3-none-any.whl", hash = "sha256:3cb49ccb6bfdc724ad01cc397d323ef8314fc7d45e19e9de2afdd6484a533324"}, - {file = "openai-1.54.1.tar.gz", hash = "sha256:5b832bf82002ba8c4f6e5e25c1c0f5d468c22f043711544c716eaffdb30dd6f1"}, + {file = "openai-1.57.0-py3-none-any.whl", hash = "sha256:972e36960b821797952da3dc4532f486c28e28a2a332d7d0c5407f242e9d9c39"}, + {file = "openai-1.57.0.tar.gz", hash = "sha256:76f91971c4bdbd78380c9970581075e0337b5d497c2fbf7b5255078f4b31abf9"}, ] [package.dependencies] @@ -3232,18 +3218,19 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" -version = "0.28.0" +version = "0.31.1" description = "A task runner that works well with poetry." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "poethepoet-0.28.0-py3-none-any.whl", hash = "sha256:db6946ff39a1244235950cd720ee7182107f64126d3dcc64c9a996cc4d755404"}, - {file = "poethepoet-0.28.0.tar.gz", hash = "sha256:5dc3ee036ab0c93e918b5caed628274618b07d788e5cff6c4ae480913cbe009c"}, + {file = "poethepoet-0.31.1-py3-none-any.whl", hash = "sha256:7fdfa0ac6074be9936723e7231b5bfaad2923e96c674a9857e81d326cf8ccdc2"}, + {file = "poethepoet-0.31.1.tar.gz", hash = "sha256:d6b66074edf85daf115bb916eae0afd6387d19e1562e1c9ef7d61d5c585696aa"}, ] [package.dependencies] pastel = ">=0.2.1,<0.3.0" -tomli = ">=1.2.2" +pyyaml = ">=6.0.2,<7.0.0" +tomli = {version = ">=1.2.2", markers = "python_version < \"3.11\""} [package.extras] poetry-plugin = ["poetry (>=1.0,<2.0)"] @@ -3414,17 +3401,6 @@ files = [ [package.extras] tests = ["pytest"] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - [[package]] name = "pyaml-env" version = "1.2.1" @@ -3503,19 +3479,19 @@ files = [ [[package]] name = "pydantic" -version = "2.9.2" +version = "2.10.3" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, - {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, + {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, + {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.23.4" -typing-extensions = {version = ">=4.6.1", markers = "python_version < \"3.13\""} +pydantic-core = "2.27.1" +typing-extensions = ">=4.12.2" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -3523,100 +3499,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.23.4" +version = "2.27.1" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, - {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, - {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, - {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, - {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, - {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, - {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, - {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, - {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, - {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, - {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, - {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, - {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, - {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, + {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, + {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, + {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, + {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, + {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, + {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, + {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, + {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, + {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, + {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, + {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, + {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, + {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, + {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, + {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, + {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, ] [package.dependencies] @@ -3658,28 +3645,30 @@ tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"] [[package]] name = "pylance" -version = "0.17.0" +version = "0.20.0" description = "python wrapper for Lance columnar format" optional = false python-versions = ">=3.9" files = [ - {file = "pylance-0.17.0-cp39-abi3-macosx_10_15_x86_64.whl", hash = "sha256:c4e6932da3a15a445992af53cd69eeccd8b2f9fa06a2081673b578ca99443772"}, - {file = "pylance-0.17.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:2e848fbb480d6678ffafa0ca02d2caad00ccc35547ff6dfebd0507b44bc7e4f3"}, - {file = "pylance-0.17.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6da675fee3b5656c192dcf2f9acc7eb908e02561489459b0e64ef23171f2576"}, - {file = "pylance-0.17.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:bb00848fe872144b45271545158cc6a918c52f76203c4f1f5906fa25bd712389"}, - {file = "pylance-0.17.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:e7713bc10cc57f326e02d8f267de41ae8442c480c51cef658d20d45780a9e76a"}, - {file = "pylance-0.17.0-cp39-abi3-win_amd64.whl", hash = "sha256:c2dbab52496356f194ff3c2b945d4186ca827e07903aad248c9204547db4a615"}, + {file = "pylance-0.20.0-cp39-abi3-macosx_10_15_x86_64.whl", hash = "sha256:fbb640b00567ff79d23a5994c0f0bc97587fcf74ece6ca568e77c453f70801c5"}, + {file = "pylance-0.20.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:c8e30f1b6429b843429fde8f3d6fb7e715153174161e3bcf29902e2d32ee471f"}, + {file = "pylance-0.20.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:032242a347ac909db81c0ade6384d82102f4ec61bc892d8caaa04b3d0a7b1613"}, + {file = "pylance-0.20.0-cp39-abi3-manylinux_2_24_aarch64.whl", hash = "sha256:5320f11925524c1a67279afc4638cad60f61c36f11d3d9c2a91651489874be0d"}, + {file = "pylance-0.20.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:fa5acd4488c574f6017145eafd5b45b178d611a5cbcd2ed492e01013fc72f5a2"}, + {file = "pylance-0.20.0-cp39-abi3-win_amd64.whl", hash = "sha256:587850cddd0e669addd9414f378fa30527fc9020010cb73c842f026ea8a9b4ea"}, ] [package.dependencies] -numpy = ">=1.22,<2" -pyarrow = ">=12" +numpy = ">=1.22" +pyarrow = ">=14" [package.extras] benchmarks = ["pytest-benchmark"] +cuvs-cu11 = ["cuvs-cu11", "pylibraft-cu11"] +cuvs-cu12 = ["cuvs-cu12", "pylibraft-cu12"] dev = ["ruff (==0.4.1)"] -ray = ["ray[data]"] -tests = ["boto3", "datasets", "duckdb", "h5py (<3.11)", "ml-dtypes", "pandas", "pillow", "polars[pandas,pyarrow]", "pytest", "tensorflow", "tqdm"] +ray = ["ray[data] (<2.38)"] +tests = ["boto3", "datasets", "duckdb", "ml-dtypes", "pandas", "pillow", "polars[pandas,pyarrow]", "pytest", "tensorflow", "tqdm"] torch = ["torch"] [[package]] @@ -4250,19 +4239,19 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] -name = "retry" -version = "0.9.2" -description = "Easy to use retry decorator." +name = "requirements-parser" +version = "0.11.0" +description = "This is a small Python module for parsing Pip requirement files." optional = false -python-versions = "*" +python-versions = "<4.0,>=3.8" files = [ - {file = "retry-0.9.2-py2.py3-none-any.whl", hash = "sha256:ccddf89761fa2c726ab29391837d4327f819ea14d244c232a1d24c67a2f98606"}, - {file = "retry-0.9.2.tar.gz", hash = "sha256:f8bfa8b99b69c4506d6f5bd3b0aabf77f98cdb17f3c9fc3f5ca820033336fba4"}, + {file = "requirements_parser-0.11.0-py3-none-any.whl", hash = "sha256:50379eb50311834386c2568263ae5225d7b9d0867fb55cf4ecc93959de2c2684"}, + {file = "requirements_parser-0.11.0.tar.gz", hash = "sha256:35f36dc969d14830bf459803da84f314dc3d17c802592e9e970f63d0359e5920"}, ] [package.dependencies] -decorator = ">=3.4.2" -py = ">=1.4.26,<2.0.0" +packaging = ">=23.2" +types-setuptools = ">=69.1.0" [[package]] name = "rfc3339-validator" @@ -4409,29 +4398,29 @@ files = [ [[package]] name = "ruff" -version = "0.6.9" +version = "0.8.2" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.6.9-py3-none-linux_armv6l.whl", hash = "sha256:064df58d84ccc0ac0fcd63bc3090b251d90e2a372558c0f057c3f75ed73e1ccd"}, - {file = "ruff-0.6.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:140d4b5c9f5fc7a7b074908a78ab8d384dd7f6510402267bc76c37195c02a7ec"}, - {file = "ruff-0.6.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53fd8ca5e82bdee8da7f506d7b03a261f24cd43d090ea9db9a1dc59d9313914c"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645d7d8761f915e48a00d4ecc3686969761df69fb561dd914a773c1a8266e14e"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eae02b700763e3847595b9d2891488989cac00214da7f845f4bcf2989007d577"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d5ccc9e58112441de8ad4b29dcb7a86dc25c5f770e3c06a9d57e0e5eba48829"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:417b81aa1c9b60b2f8edc463c58363075412866ae4e2b9ab0f690dc1e87ac1b5"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c866b631f5fbce896a74a6e4383407ba7507b815ccc52bcedabb6810fdb3ef7"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b118afbb3202f5911486ad52da86d1d52305b59e7ef2031cea3425142b97d6f"}, - {file = "ruff-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67267654edc23c97335586774790cde402fb6bbdb3c2314f1fc087dee320bfa"}, - {file = "ruff-0.6.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ef0cc774b00fec123f635ce5c547dac263f6ee9fb9cc83437c5904183b55ceb"}, - {file = "ruff-0.6.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:12edd2af0c60fa61ff31cefb90aef4288ac4d372b4962c2864aeea3a1a2460c0"}, - {file = "ruff-0.6.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:55bb01caeaf3a60b2b2bba07308a02fca6ab56233302406ed5245180a05c5625"}, - {file = "ruff-0.6.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:925d26471fa24b0ce5a6cdfab1bb526fb4159952385f386bdcc643813d472039"}, - {file = "ruff-0.6.9-py3-none-win32.whl", hash = "sha256:eb61ec9bdb2506cffd492e05ac40e5bc6284873aceb605503d8494180d6fc84d"}, - {file = "ruff-0.6.9-py3-none-win_amd64.whl", hash = "sha256:785d31851c1ae91f45b3d8fe23b8ae4b5170089021fbb42402d811135f0b7117"}, - {file = "ruff-0.6.9-py3-none-win_arm64.whl", hash = "sha256:a9641e31476d601f83cd602608739a0840e348bda93fec9f1ee816f8b6798b93"}, - {file = "ruff-0.6.9.tar.gz", hash = "sha256:b076ef717a8e5bc819514ee1d602bbdca5b4420ae13a9cf61a0c0a4f53a2baa2"}, + {file = "ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d"}, + {file = "ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5"}, + {file = "ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22"}, + {file = "ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1"}, + {file = "ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea"}, + {file = "ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8"}, + {file = "ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5"}, ] [[package]] @@ -4456,11 +4445,6 @@ files = [ {file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f60021ec1574e56632be2a36b946f8143bf4e5e6af4a06d85281adc22938e0dd"}, {file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:394397841449853c2290a32050382edaec3da89e35b3e03d6cc966aebc6a8ae6"}, {file = "scikit_learn-1.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:57cc1786cfd6bd118220a92ede80270132aa353647684efa385a74244a41e3b1"}, - {file = "scikit_learn-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9a702e2de732bbb20d3bad29ebd77fc05a6b427dc49964300340e4c9328b3f5"}, - {file = "scikit_learn-1.5.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:b0768ad641981f5d3a198430a1d31c3e044ed2e8a6f22166b4d546a5116d7908"}, - {file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:178ddd0a5cb0044464fc1bfc4cca5b1833bfc7bb022d70b05db8530da4bb3dd3"}, - {file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7284ade780084d94505632241bf78c44ab3b6f1e8ccab3d2af58e0e950f9c12"}, - {file = "scikit_learn-1.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:b7b0f9a0b1040830d38c39b91b3a44e1b643f4b36e36567b80b7c6bd2202a27f"}, {file = "scikit_learn-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:757c7d514ddb00ae249832fe87100d9c73c6ea91423802872d9e74970a0e40b9"}, {file = "scikit_learn-1.5.2-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:52788f48b5d8bca5c0736c175fa6bdaab2ef00a8f536cda698db61bd89c551c1"}, {file = "scikit_learn-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:643964678f4b5fbdc95cbf8aec638acc7aa70f5f79ee2cdad1eec3df4ba6ead8"}, @@ -4787,47 +4771,42 @@ files = [ [[package]] name = "tiktoken" -version = "0.7.0" +version = "0.8.0" description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "tiktoken-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485f3cc6aba7c6b6ce388ba634fbba656d9ee27f766216f45146beb4ac18b25f"}, - {file = "tiktoken-0.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e54be9a2cd2f6d6ffa3517b064983fb695c9a9d8aa7d574d1ef3c3f931a99225"}, - {file = "tiktoken-0.7.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79383a6e2c654c6040e5f8506f3750db9ddd71b550c724e673203b4f6b4b4590"}, - {file = "tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d4511c52caacf3c4981d1ae2df85908bd31853f33d30b345c8b6830763f769c"}, - {file = "tiktoken-0.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13c94efacdd3de9aff824a788353aa5749c0faee1fbe3816df365ea450b82311"}, - {file = "tiktoken-0.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8e58c7eb29d2ab35a7a8929cbeea60216a4ccdf42efa8974d8e176d50c9a3df5"}, - {file = "tiktoken-0.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:21a20c3bd1dd3e55b91c1331bf25f4af522c525e771691adbc9a69336fa7f702"}, - {file = "tiktoken-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:10c7674f81e6e350fcbed7c09a65bca9356eaab27fb2dac65a1e440f2bcfe30f"}, - {file = "tiktoken-0.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:084cec29713bc9d4189a937f8a35dbdfa785bd1235a34c1124fe2323821ee93f"}, - {file = "tiktoken-0.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:811229fde1652fedcca7c6dfe76724d0908775b353556d8a71ed74d866f73f7b"}, - {file = "tiktoken-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86b6e7dc2e7ad1b3757e8a24597415bafcfb454cebf9a33a01f2e6ba2e663992"}, - {file = "tiktoken-0.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1063c5748be36344c7e18c7913c53e2cca116764c2080177e57d62c7ad4576d1"}, - {file = "tiktoken-0.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:20295d21419bfcca092644f7e2f2138ff947a6eb8cfc732c09cc7d76988d4a89"}, - {file = "tiktoken-0.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:959d993749b083acc57a317cbc643fb85c014d055b2119b739487288f4e5d1cb"}, - {file = "tiktoken-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:71c55d066388c55a9c00f61d2c456a6086673ab7dec22dd739c23f77195b1908"}, - {file = "tiktoken-0.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09ed925bccaa8043e34c519fbb2f99110bd07c6fd67714793c21ac298e449410"}, - {file = "tiktoken-0.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03c6c40ff1db0f48a7b4d2dafeae73a5607aacb472fa11f125e7baf9dce73704"}, - {file = "tiktoken-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d20b5c6af30e621b4aca094ee61777a44118f52d886dbe4f02b70dfe05c15350"}, - {file = "tiktoken-0.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d427614c3e074004efa2f2411e16c826f9df427d3c70a54725cae860f09e4bf4"}, - {file = "tiktoken-0.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8c46d7af7b8c6987fac9b9f61041b452afe92eb087d29c9ce54951280f899a97"}, - {file = "tiktoken-0.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:0bc603c30b9e371e7c4c7935aba02af5994a909fc3c0fe66e7004070858d3f8f"}, - {file = "tiktoken-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2398fecd38c921bcd68418675a6d155fad5f5e14c2e92fcf5fe566fa5485a858"}, - {file = "tiktoken-0.7.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f5f6afb52fb8a7ea1c811e435e4188f2bef81b5e0f7a8635cc79b0eef0193d6"}, - {file = "tiktoken-0.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:861f9ee616766d736be4147abac500732b505bf7013cfaf019b85892637f235e"}, - {file = "tiktoken-0.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54031f95c6939f6b78122c0aa03a93273a96365103793a22e1793ee86da31685"}, - {file = "tiktoken-0.7.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:fffdcb319b614cf14f04d02a52e26b1d1ae14a570f90e9b55461a72672f7b13d"}, - {file = "tiktoken-0.7.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c72baaeaefa03ff9ba9688624143c858d1f6b755bb85d456d59e529e17234769"}, - {file = "tiktoken-0.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:131b8aeb043a8f112aad9f46011dced25d62629091e51d9dc1adbf4a1cc6aa98"}, - {file = "tiktoken-0.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cabc6dc77460df44ec5b879e68692c63551ae4fae7460dd4ff17181df75f1db7"}, - {file = "tiktoken-0.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8d57f29171255f74c0aeacd0651e29aa47dff6f070cb9f35ebc14c82278f3b25"}, - {file = "tiktoken-0.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ee92776fdbb3efa02a83f968c19d4997a55c8e9ce7be821ceee04a1d1ee149c"}, - {file = "tiktoken-0.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e215292e99cb41fbc96988ef62ea63bb0ce1e15f2c147a61acc319f8b4cbe5bf"}, - {file = "tiktoken-0.7.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8a81bac94769cab437dd3ab0b8a4bc4e0f9cf6835bcaa88de71f39af1791727a"}, - {file = "tiktoken-0.7.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d6d73ea93e91d5ca771256dfc9d1d29f5a554b83821a1dc0891987636e0ae226"}, - {file = "tiktoken-0.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:2bcb28ddf79ffa424f171dfeef9a4daff61a94c631ca6813f43967cb263b83b9"}, - {file = "tiktoken-0.7.0.tar.gz", hash = "sha256:1077266e949c24e0291f6c350433c6f0971365ece2b173a23bc3b9f9defef6b6"}, + {file = "tiktoken-0.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b07e33283463089c81ef1467180e3e00ab00d46c2c4bbcef0acab5f771d6695e"}, + {file = "tiktoken-0.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9269348cb650726f44dd3bbb3f9110ac19a8dcc8f54949ad3ef652ca22a38e21"}, + {file = "tiktoken-0.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e13f37bc4ef2d012731e93e0fef21dc3b7aea5bb9009618de9a4026844e560"}, + {file = "tiktoken-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f13d13c981511331eac0d01a59b5df7c0d4060a8be1e378672822213da51e0a2"}, + {file = "tiktoken-0.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6b2ddbc79a22621ce8b1166afa9f9a888a664a579350dc7c09346a3b5de837d9"}, + {file = "tiktoken-0.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d8c2d0e5ba6453a290b86cd65fc51fedf247e1ba170191715b049dac1f628005"}, + {file = "tiktoken-0.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d622d8011e6d6f239297efa42a2657043aaed06c4f68833550cac9e9bc723ef1"}, + {file = "tiktoken-0.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2efaf6199717b4485031b4d6edb94075e4d79177a172f38dd934d911b588d54a"}, + {file = "tiktoken-0.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5637e425ce1fc49cf716d88df3092048359a4b3bbb7da762840426e937ada06d"}, + {file = "tiktoken-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fb0e352d1dbe15aba082883058b3cce9e48d33101bdaac1eccf66424feb5b47"}, + {file = "tiktoken-0.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:56edfefe896c8f10aba372ab5706b9e3558e78db39dd497c940b47bf228bc419"}, + {file = "tiktoken-0.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:326624128590def898775b722ccc327e90b073714227175ea8febbc920ac0a99"}, + {file = "tiktoken-0.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:881839cfeae051b3628d9823b2e56b5cc93a9e2efb435f4cf15f17dc45f21586"}, + {file = "tiktoken-0.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fe9399bdc3f29d428f16a2f86c3c8ec20be3eac5f53693ce4980371c3245729b"}, + {file = "tiktoken-0.8.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9a58deb7075d5b69237a3ff4bb51a726670419db6ea62bdcd8bd80c78497d7ab"}, + {file = "tiktoken-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2908c0d043a7d03ebd80347266b0e58440bdef5564f84f4d29fb235b5df3b04"}, + {file = "tiktoken-0.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:294440d21a2a51e12d4238e68a5972095534fe9878be57d905c476017bff99fc"}, + {file = "tiktoken-0.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:d8f3192733ac4d77977432947d563d7e1b310b96497acd3c196c9bddb36ed9db"}, + {file = "tiktoken-0.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:02be1666096aff7da6cbd7cdaa8e7917bfed3467cd64b38b1f112e96d3b06a24"}, + {file = "tiktoken-0.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94ff53c5c74b535b2cbf431d907fc13c678bbd009ee633a2aca269a04389f9a"}, + {file = "tiktoken-0.8.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b231f5e8982c245ee3065cd84a4712d64692348bc609d84467c57b4b72dcbc5"}, + {file = "tiktoken-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4177faa809bd55f699e88c96d9bb4635d22e3f59d635ba6fd9ffedf7150b9953"}, + {file = "tiktoken-0.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5376b6f8dc4753cd81ead935c5f518fa0fbe7e133d9e25f648d8c4dabdd4bad7"}, + {file = "tiktoken-0.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:18228d624807d66c87acd8f25fc135665617cab220671eb65b50f5d70fa51f69"}, + {file = "tiktoken-0.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7e17807445f0cf1f25771c9d86496bd8b5c376f7419912519699f3cc4dc5c12e"}, + {file = "tiktoken-0.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:886f80bd339578bbdba6ed6d0567a0d5c6cfe198d9e587ba6c447654c65b8edc"}, + {file = "tiktoken-0.8.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6adc8323016d7758d6de7313527f755b0fc6c72985b7d9291be5d96d73ecd1e1"}, + {file = "tiktoken-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b591fb2b30d6a72121a80be24ec7a0e9eb51c5500ddc7e4c2496516dd5e3816b"}, + {file = "tiktoken-0.8.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:845287b9798e476b4d762c3ebda5102be87ca26e5d2c9854002825d60cdb815d"}, + {file = "tiktoken-0.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:1473cfe584252dc3fa62adceb5b1c763c1874e04511b197da4e6de51d6ce5a02"}, + {file = "tiktoken-0.8.0.tar.gz", hash = "sha256:9ccbb2740f24542534369c5635cfd9b2b3c2490754a78ac8831d99f89f94eeb2"}, ] [package.dependencies] @@ -4899,20 +4878,21 @@ files = [ [[package]] name = "tqdm" -version = "4.66.6" +version = "4.67.1" description = "Fast, Extensible Progress Meter" optional = false python-versions = ">=3.7" files = [ - {file = "tqdm-4.66.6-py3-none-any.whl", hash = "sha256:223e8b5359c2efc4b30555531f09e9f2f3589bcd7fdd389271191031b49b7a63"}, - {file = "tqdm-4.66.6.tar.gz", hash = "sha256:4bdd694238bef1485ce839d67967ab50af8f9272aab687c0d7702a01da0be090"}, + {file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"}, + {file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"}, ] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} [package.extras] -dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] +dev = ["nbval", "pytest (>=6)", "pytest-asyncio (>=0.24)", "pytest-cov", "pytest-timeout"] +discord = ["requests"] notebook = ["ipywidgets (>=6)"] slack = ["slack-sdk"] telegram = ["requests"] @@ -4934,13 +4914,13 @@ test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0, [[package]] name = "typer" -version = "0.12.5" +version = "0.15.1" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." optional = false python-versions = ">=3.7" files = [ - {file = "typer-0.12.5-py3-none-any.whl", hash = "sha256:62fe4e471711b147e3365034133904df3e235698399bc4de2b36c8579298d52b"}, - {file = "typer-0.12.5.tar.gz", hash = "sha256:f592f089bedcc8ec1b974125d64851029c3b1af145f04aca64d69410f0c9b722"}, + {file = "typer-0.15.1-py3-none-any.whl", hash = "sha256:7994fb7b8155b64d3402518560648446072864beefd44aa2dc36972a5972e847"}, + {file = "typer-0.15.1.tar.gz", hash = "sha256:a0588c0a7fa68a1978a069818657778f86abe6ff5ea6abf472f940a08bfe4f0a"}, ] [package.dependencies] @@ -4960,6 +4940,17 @@ files = [ {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"}, ] +[[package]] +name = "types-setuptools" +version = "75.6.0.20241126" +description = "Typing stubs for setuptools" +optional = false +python-versions = ">=3.8" +files = [ + {file = "types_setuptools-75.6.0.20241126-py3-none-any.whl", hash = "sha256:aaae310a0e27033c1da8457d4d26ac673b0c8a0de7272d6d4708e263f2ea3b9b"}, + {file = "types_setuptools-75.6.0.20241126.tar.gz", hash = "sha256:7bf25ad4be39740e469f9268b6beddda6e088891fa5a27e985c6ce68bf62ace0"}, +] + [[package]] name = "typing-extensions" version = "4.12.2" @@ -5239,4 +5230,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "f2945afc48a70dc63c06878c69d8fd4e4905c9775c6ce0ce831cfcd9202c1882" +content-hash = "204a7f9cd0035ffb8ba4eea3333301241fe408f96526604b92c069fb6661fa89" diff --git a/pyproject.toml b/pyproject.toml index f3375b2090..5f687fb7a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,17 +50,16 @@ environs = "^11.0.0" datashaper = "^0.0.49" # Vector Stores -azure-search-documents = "^11.4.0" -lancedb = "^0.13.0" +azure-search-documents = "^11.5.2" +lancedb = "^0.17.0" # Async IO -aiolimiter = "^1.1.0" aiofiles = "^24.1.0" # LLM -openai = "^1.51.2" +openai = "^1.57.0" nltk = "3.9.1" -tiktoken = "^0.7.0" +tiktoken = "^0.8.0" # Data-Sci numpy = "^1.25.2" @@ -76,33 +75,38 @@ pyyaml = "^6.0.2" pyaml-env = "^1.2.1" python-dotenv = "^1.0.0" -pydantic = "^2.9.2" -rich = "^13.6.0" +pydantic = "^2.10.3" +rich = "^13.9.4" devtools = "^0.12.2" typing-extensions = "^4.12.2" #Azure -azure-storage-blob = "^12.22.0" -azure-identity = "^1.17.1" +azure-storage-blob = "^12.24.0" +azure-identity = "^1.19.0" future = "^1.0.0" # Needed until graspologic fixes their dependency -typer = "^0.12.5" -fnllm = "^0.0.8" +typer = "^0.15.1" +fnllm = "^0.0.10" + +tenacity = "^9.0.0" +json-repair = "^0.30.3" +tqdm = "^4.67.1" +httpx = "^0.28.1" [tool.poetry.group.dev.dependencies] coverage = "^7.6.0" ipykernel = "^6.29.4" jupyter = "^1.1.1" nbconvert = "^7.16.3" -poethepoet = "^0.28.0" +poethepoet = "^0.31.1" pyright = "^1.1.384" pytest = "^8.3.2" pytest-asyncio = "^0.24.0" pytest-timeout = "^2.3.1" -ruff = "^0.6.9" +ruff = "^0.8.2" semversioner = "^2.0.3" update-toml = "^0.2.1" -deptry = "^0.20.0" +deptry = "^0.21.1" mkdocs-material = "^9.5.39" mkdocs-jupyter = "^0.25.0" mkdocs-exclude-search = "^0.6.6" @@ -237,9 +241,6 @@ select = [ ignore = [ # Ignore module names shadowing Python builtins "A005", - # Deprecated Rules - "ANN101", - "ANN102", # Conflicts with interface argument checking "ARG002", "ANN204", diff --git a/tests/integration/_pipeline/test_run.py b/tests/integration/_pipeline/test_run.py index 5eba5de80d..dad314daeb 100644 --- a/tests/integration/_pipeline/test_run.py +++ b/tests/integration/_pipeline/test_run.py @@ -66,10 +66,10 @@ def _assert_text_units_and_entities_reference_each_other( entity_ids = set(entity_text_unit_map.keys()) for text_unit_id, text_unit_entities in text_unit_entity_map.items(): - assert text_unit_entities.issubset( - entity_ids - ), f"Text unit {text_unit_id} has entities {text_unit_entities} that are not in the entity set" + assert text_unit_entities.issubset(entity_ids), ( + f"Text unit {text_unit_id} has entities {text_unit_entities} that are not in the entity set" + ) for entity_id, entity_text_units in entity_text_unit_map.items(): - assert entity_text_units.issubset( - text_unit_ids - ), f"Entity {entity_id} has text units {entity_text_units} that are not in the text unit set" + assert entity_text_units.issubset(text_unit_ids), ( + f"Entity {entity_id} has text units {entity_text_units} that are not in the text unit set" + ) diff --git a/tests/smoke/test_fixtures.py b/tests/smoke/test_fixtures.py index 6e8471c03d..89dbc82112 100644 --- a/tests/smoke/test_fixtures.py +++ b/tests/smoke/test_fixtures.py @@ -145,9 +145,9 @@ def __run_indexer( completion = subprocess.run( command, env={**os.environ, "GRAPHRAG_INPUT_FILE_TYPE": input_file_type} ) - assert ( - completion.returncode == 0 - ), f"Indexer failed with return code: {completion.returncode}" + assert completion.returncode == 0, ( + f"Indexer failed with return code: {completion.returncode}" + ) def __assert_indexer_outputs( self, root: Path, workflow_config: dict[str, dict[str, Any]] @@ -158,9 +158,9 @@ def __assert_indexer_outputs( output_entries.sort(key=lambda entry: entry.stat().st_ctime, reverse=True) if not debug: - assert ( - len(output_entries) == 1 - ), f"Expected one output folder, found {len(output_entries)}" + assert len(output_entries) == 1, ( + f"Expected one output folder, found {len(output_entries)}" + ) output_path = output_entries[0] assert output_path.exists(), "output folder does not exist" @@ -175,9 +175,9 @@ def __assert_indexer_outputs( expected_artifacts = 0 expected_workflows = set(workflow_config.keys()) workflows = set(stats["workflows"].keys()) - assert ( - workflows == expected_workflows - ), f"Workflows missing from stats.json: {expected_workflows - workflows}. Unexpected workflows in stats.json: {workflows - expected_workflows}" + assert workflows == expected_workflows, ( + f"Workflows missing from stats.json: {expected_workflows - workflows}. Unexpected workflows in stats.json: {workflows - expected_workflows}" + ) # [OPTIONAL] Check runtime for workflow in expected_workflows: @@ -188,17 +188,15 @@ def __assert_indexer_outputs( # Check max runtime max_runtime = workflow_config[workflow].get("max_runtime", None) if max_runtime: - assert ( - stats["workflows"][workflow]["overall"] <= max_runtime - ), f"Expected max runtime of {max_runtime}, found: {stats['workflows'][workflow]['overall']} for workflow: {workflow}" + assert stats["workflows"][workflow]["overall"] <= max_runtime, ( + f"Expected max runtime of {max_runtime}, found: {stats['workflows'][workflow]['overall']} for workflow: {workflow}" + ) # Check artifacts artifact_files = os.listdir(artifacts) # check that the number of workflows matches the number of artifacts - assert ( - len(artifact_files) == (expected_artifacts + 3) - ), ( + assert len(artifact_files) == (expected_artifacts + 3), ( f"Expected {expected_artifacts + 3} artifacts, found: {len(artifact_files)}" ) # Embeddings add to the count @@ -215,7 +213,9 @@ def __assert_indexer_outputs( workflow["row_range"][0] <= len(output_df) <= workflow["row_range"][1] - ), f"Expected between {workflow['row_range'][0]} and {workflow['row_range'][1]}, found: {len(output_df)} for file: {artifact}" + ), ( + f"Expected between {workflow['row_range'][0]} and {workflow['row_range'][1]}, found: {len(output_df)} for file: {artifact}" + ) # Get non-nan rows nan_df = output_df.loc[ @@ -225,9 +225,9 @@ def __assert_indexer_outputs( ), ] nan_df = nan_df[nan_df.isna().any(axis=1)] - assert ( - len(nan_df) == 0 - ), f"Found {len(nan_df)} rows with NaN values for file: {artifact} on columns: {nan_df.columns[nan_df.isna().any()].tolist()}" + assert len(nan_df) == 0, ( + f"Found {len(nan_df)} rows with NaN values for file: {artifact} on columns: {nan_df.columns[nan_df.isna().any()].tolist()}" + ) except KeyError: log.warning("No workflow config found %s", artifact_name) @@ -305,8 +305,8 @@ def test_fixture( result.stderr if "No existing dataset at" not in result.stderr else "" ) - assert ( - stderror == "" or stderror.replace("\n", "") in KNOWN_WARNINGS - ), f"Query failed with error: {stderror}" + assert stderror == "" or stderror.replace("\n", "") in KNOWN_WARNINGS, ( + f"Query failed with error: {stderror}" + ) assert result.stdout is not None, "Query returned no output" assert len(result.stdout) > 0, "Query returned empty output" diff --git a/tests/unit/config/test_default_config.py b/tests/unit/config/test_default_config.py index 321ae76698..ce2282d634 100644 --- a/tests/unit/config/test_default_config.py +++ b/tests/unit/config/test_default_config.py @@ -540,7 +540,7 @@ def find_envvar_names(text) -> set[str]: ) def test_malformed_input_dict_throws(self): with pytest.raises(ValidationError): - create_graphrag_config(cast(Any, {"llm": 12})) + create_graphrag_config(cast("Any", {"llm": 12})) @mock.patch.dict( os.environ, diff --git a/tests/unit/indexing/graph/extractors/community_reports/test_sort_context.py b/tests/unit/indexing/graph/extractors/community_reports/test_sort_context.py index 873eb45616..3610c55983 100644 --- a/tests/unit/indexing/graph/extractors/community_reports/test_sort_context.py +++ b/tests/unit/indexing/graph/extractors/community_reports/test_sort_context.py @@ -205,9 +205,9 @@ def test_sort_context(): ctx = sort_context(context) assert ctx is not None, "Context is none" num = num_tokens(ctx) - assert ( - num == 828 if platform.system() == "Windows" else 826 - ), f"num_tokens is not matched for platform (win = 827, else 826): {num}" + assert num == 828 if platform.system() == "Windows" else 826, ( + f"num_tokens is not matched for platform (win = 827, else 826): {num}" + ) def test_sort_context_max_tokens(): diff --git a/tests/unit/indexing/test_init_content.py b/tests/unit/indexing/test_init_content.py index 8e6d8d3fdb..58791a905c 100644 --- a/tests/unit/indexing/test_init_content.py +++ b/tests/unit/indexing/test_init_content.py @@ -22,7 +22,7 @@ def test_init_yaml_uncommented(): lines = [line for line in lines if "##" not in line] def uncomment_line(line: str) -> str: - leading_whitespace = cast(Any, re.search(r"^(\s*)", line)).group(1) + leading_whitespace = cast("Any", re.search(r"^(\s*)", line)).group(1) return re.sub(r"^\s*# ", leading_whitespace, line, count=1) content = "\n".join([uncomment_line(line) for line in lines]) diff --git a/tests/unit/indexing/workflows/test_export.py b/tests/unit/indexing/workflows/test_export.py index 59a62e9ecf..206b4869e6 100644 --- a/tests/unit/indexing/workflows/test_export.py +++ b/tests/unit/indexing/workflows/test_export.py @@ -20,7 +20,7 @@ async def mock_verb( input: VerbInput, storage: PipelineStorage, **_kwargs ) -> VerbResult: - source = cast(pd.DataFrame, input.get_input()) + source = cast("pd.DataFrame", input.get_input()) output = source[["id"]] @@ -28,7 +28,7 @@ async def mock_verb( return create_verb_result( cast( - Table, + "Table", output, ) ) @@ -37,14 +37,14 @@ async def mock_verb( async def mock_no_return_verb( input: VerbInput, storage: PipelineStorage, **_kwargs ) -> VerbResult: - source = cast(pd.DataFrame, input.get_input()) + source = cast("pd.DataFrame", input.get_input()) # write some outputs to storage independent of the return await storage.set("empty_write", source[["name"]]) return create_verb_result( cast( - Table, + "Table", pd.DataFrame(), ) ) @@ -82,9 +82,9 @@ async def test_normal_result_exports_parquet(): ] assert len(pipeline_result) == 1 - assert ( - storage.keys() == ["stats.json", "mock_write", "mock_workflow.parquet"] - ), "Mock workflow output should be written to storage by the exporter when there is a non-empty data frame" + assert storage.keys() == ["stats.json", "mock_write", "mock_workflow.parquet"], ( + "Mock workflow output should be written to storage by the exporter when there is a non-empty data frame" + ) async def test_empty_result_does_not_export_parquet(): diff --git a/tests/verbs/test_create_base_entity_graph.py b/tests/verbs/test_create_base_entity_graph.py index 341d3815e1..7fc4ec356d 100644 --- a/tests/verbs/test_create_base_entity_graph.py +++ b/tests/verbs/test_create_base_entity_graph.py @@ -81,24 +81,24 @@ async def test_create_base_entity_graph(): edges_actual = await context.runtime_storage.get("base_relationship_edges") communities_actual = await context.runtime_storage.get("base_communities") - assert len(nodes_actual.columns) == len( - nodes_expected.columns - ), "Nodes dataframe columns differ" + assert len(nodes_actual.columns) == len(nodes_expected.columns), ( + "Nodes dataframe columns differ" + ) - assert len(edges_actual.columns) == len( - edges_expected.columns - ), "Edges dataframe columns differ" + assert len(edges_actual.columns) == len(edges_expected.columns), ( + "Edges dataframe columns differ" + ) - assert len(communities_actual.columns) == len( - communities_expected.columns - ), "Edges dataframe columns differ" + assert len(communities_actual.columns) == len(communities_expected.columns), ( + "Edges dataframe columns differ" + ) # TODO: with the combined verb we can't force summarization # this is because the mock responses always result in a single description, which is returned verbatim rather than summarized # we need to update the mocking to provide somewhat unique graphs so a true merge happens # the assertion should grab a node and ensure the description matches the mock description, not the original as we are doing below - assert nodes_actual["description"].values[0] == "Company_A is a test company" # noqa + assert nodes_actual["description"].values[0] == "Company_A is a test company" assert len(context.storage.keys()) == 0, "Storage should be empty" diff --git a/tests/verbs/test_create_base_text_units.py b/tests/verbs/test_create_base_text_units.py index b179e1153c..1485bedc83 100644 --- a/tests/verbs/test_create_base_text_units.py +++ b/tests/verbs/test_create_base_text_units.py @@ -60,6 +60,6 @@ async def test_create_base_text_units_with_snapshot(): context, ) - assert context.storage.keys() == [ - "create_base_text_units.parquet" - ], "Text unit snapshot keys differ" + assert context.storage.keys() == ["create_base_text_units.parquet"], ( + "Text unit snapshot keys differ" + ) diff --git a/tests/verbs/util.py b/tests/verbs/util.py index 41aa54d871..8c9cc990ef 100644 --- a/tests/verbs/util.py +++ b/tests/verbs/util.py @@ -48,7 +48,7 @@ def get_config_for_workflow(name: str) -> PipelineWorkflowConfig: result = next(conf for conf in pipeline_config.workflows if conf.name == name) - return cast(PipelineWorkflowConfig, result.config) + return cast("PipelineWorkflowConfig", result.config) async def get_workflow_output( @@ -69,7 +69,7 @@ async def get_workflow_output( await workflow.run(context=run_context) # if there's only one output, it is the default here, no name required - return cast(pd.DataFrame, workflow.output()) + return cast("pd.DataFrame", workflow.output()) def compare_outputs( @@ -80,9 +80,9 @@ def compare_outputs( """ cols = expected.columns if columns is None else columns - assert len(actual) == len( - expected - ), f"Expected: {len(expected)} rows, Actual: {len(actual)} rows" + assert len(actual) == len(expected), ( + f"Expected: {len(expected)} rows, Actual: {len(actual)} rows" + ) for column in cols: assert column in actual.columns