mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 22:29:58 +00:00
This changes `lancedb` from a "pure python" setuptools project to a maturin project and adds a rust lancedb dependency. The async python client is extremely minimal (only `connect` and `Connection.table_names` are supported). The purpose of this PR is to get the infrastructure in place for building out the rest of the async client. Although this is not technically a breaking change (no APIs are changing) it is still a considerable change in the way the wheels are built because they now include the native shared library.
23 lines
499 B
Python
23 lines
499 B
Python
"""Custom exception handling"""
|
|
|
|
|
|
class MissingValueError(ValueError):
|
|
"""Exception raised when a required value is missing."""
|
|
|
|
pass
|
|
|
|
|
|
class MissingColumnError(KeyError):
|
|
"""
|
|
Exception raised when a column name specified is not in
|
|
the DataFrame object
|
|
"""
|
|
|
|
def __init__(self, column_name):
|
|
self.column_name = column_name
|
|
|
|
def __str__(self):
|
|
return (
|
|
f"Error: Column '{self.column_name}' does not exist in the DataFrame object"
|
|
)
|