diff --git a/compass_sdk/__init__.py b/compass_sdk/__init__.py index d8fff60..96c1904 100644 --- a/compass_sdk/__init__.py +++ b/compass_sdk/__init__.py @@ -3,6 +3,9 @@ from os import getenv from typing import Any, Callable, Dict, List, Optional, Union +from pydantic import BaseModel +from typing_extensions import TypedDict + from compass_sdk.constants import ( COHERE_API_ENV_VAR, DEFAULT_COMMANDR_EXTRACTABLE_ATTRIBUTES, @@ -16,8 +19,6 @@ METADATA_HEURISTICS_ATTRIBUTES, SKIP_INFER_TABLE_TYPES, ) -from pydantic import BaseModel -from typing_extensions import TypedDict class Logger: diff --git a/compass_sdk/compass.py b/compass_sdk/compass.py index 13e16ea..c2f6815 100644 --- a/compass_sdk/compass.py +++ b/compass_sdk/compass.py @@ -6,6 +6,12 @@ from typing import Dict, Iterator, List, Optional, Tuple, Union import requests +from joblib import Parallel, delayed +from pydantic import BaseModel +from requests.exceptions import InvalidSchema +from tenacity import RetryError, retry, retry_if_not_exception_type, stop_after_attempt, wait_fixed +from tqdm import tqdm + from compass_sdk import ( BatchPutDocumentsInput, Chunk, @@ -25,11 +31,6 @@ DEFAULT_MAX_RETRIES, DEFAULT_SLEEP_RETRY_SECONDS, ) -from joblib import Parallel, delayed -from pydantic import BaseModel -from requests.exceptions import InvalidSchema -from tenacity import RetryError, retry, retry_if_not_exception_type, stop_after_attempt, wait_fixed -from tqdm import tqdm @dataclass diff --git a/compass_sdk/parser.py b/compass_sdk/parser.py index f78409c..62b7aab 100644 --- a/compass_sdk/parser.py +++ b/compass_sdk/parser.py @@ -4,6 +4,7 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Union import requests + from compass_sdk import ( BatchProcessFilesParameters, CompassDocument, diff --git a/compass_sdk/utils.py b/compass_sdk/utils.py index 132799b..679bf97 100644 --- a/compass_sdk/utils.py +++ b/compass_sdk/utils.py @@ -5,9 +5,10 @@ from typing import Callable, Iterable, Iterator, List, Optional, TypeVar import fsspec -from compass_sdk import CompassDocument, CompassDocumentMetadata, CompassSdkStage from fsspec import AbstractFileSystem +from compass_sdk import CompassDocument, CompassDocumentMetadata, CompassSdkStage + T = TypeVar("T") U = TypeVar("U") diff --git a/tests/test_parser_client.py b/tests/test_parser_client.py index 3bd5552..08c1b47 100644 --- a/tests/test_parser_client.py +++ b/tests/test_parser_client.py @@ -2,6 +2,7 @@ from typing import List import pytest + from compass_sdk import ( CompassDocumentMetadata, MetadataConfig,