diff --git a/python/lancedb/__init__.py b/python/lancedb/__init__.py index 52eea078..751691e8 100644 --- a/python/lancedb/__init__.py +++ b/python/lancedb/__init__.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .db import LanceDBConnection, URI +from .db import URI, LanceDBConnection def connect(uri: URI) -> LanceDBConnection: diff --git a/python/lancedb/common.py b/python/lancedb/common.py index 9566325f..b39b5568 100644 --- a/python/lancedb/common.py +++ b/python/lancedb/common.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from pathlib import Path -from typing import Union, List +from typing import List, Union import numpy as np import pandas as pd diff --git a/python/lancedb/db.py b/python/lancedb/db.py index 9782163f..bbbeecdc 100644 --- a/python/lancedb/db.py +++ b/python/lancedb/db.py @@ -14,9 +14,10 @@ from __future__ import annotations from pathlib import Path + import pyarrow as pa -from .common import URI, DATA +from .common import DATA, URI from .table import LanceTable from .util import get_uri_scheme diff --git a/python/lancedb/embeddings.py b/python/lancedb/embeddings.py index 3c132ab0..28d63286 100644 --- a/python/lancedb/embeddings.py +++ b/python/lancedb/embeddings.py @@ -13,14 +13,13 @@ import math import sys - -from retry import retry from typing import Callable, Union -from lance.vector import vec_to_table import numpy as np import pandas as pd import pyarrow as pa +from lance.vector import vec_to_table +from retry import retry def with_embeddings( @@ -68,7 +67,9 @@ class EmbeddingFunction: if len(self.rate_limiter_kwargs) > 0: v = int(sys.version_info.minor) if v >= 11: - print("WARNING: rate limit only support up to 3.10, proceeding without rate limiter") + print( + "WARNING: rate limit only support up to 3.10, proceeding without rate limiter" + ) else: import ratelimiter diff --git a/python/lancedb/table.py b/python/lancedb/table.py index bb9fb133..d743f733 100644 --- a/python/lancedb/table.py +++ b/python/lancedb/table.py @@ -19,12 +19,12 @@ from functools import cached_property import lance import numpy as np import pandas as pd -from lance import LanceDataset import pyarrow as pa +from lance import LanceDataset from lance.vector import vec_to_table +from .common import DATA, VEC, VECTOR_COLUMN_NAME from .query import LanceQueryBuilder -from .common import DATA, VECTOR_COLUMN_NAME, VEC def _sanitize_data(data, schema): diff --git a/python/pyproject.toml b/python/pyproject.toml index d0db3b6d..943a3431 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "lancedb" -version = "0.1.1" -dependencies = ["pylance>=0.4.4", "ratelimiter", "retry", "tqdm"] +version = "0.1.2" +dependencies = ["pylance>=0.4.6", "ratelimiter", "retry", "tqdm"] description = "lancedb" authors = [ - { name = "Lance Devs", email = "dev@eto.ai" }, + { name = "LanceDB Devs", email = "dev@lancedb.com" }, ] license = { file = "LICENSE" } readme = "README.md" diff --git a/python/tests/test_db.py b/python/tests/test_db.py index 0a6aec53..975100f3 100644 --- a/python/tests/test_db.py +++ b/python/tests/test_db.py @@ -11,10 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import lancedb import pandas as pd import pytest +import lancedb + def test_basic(tmp_path): db = lancedb.connect(tmp_path) diff --git a/python/tests/test_query.py b/python/tests/test_query.py index 9ad7c928..18438b97 100644 --- a/python/tests/test_query.py +++ b/python/tests/test_query.py @@ -12,15 +12,14 @@ # limitations under the License. import lance -from lancedb.query import LanceQueryBuilder - import numpy as np import pandas as pd import pandas.testing as tm import pyarrow as pa - import pytest +from lancedb.query import LanceQueryBuilder + class MockTable: def __init__(self, tmp_path):