Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a basic async python client starting point #1014

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

westonpace
Copy link
Contributor

@westonpace westonpace commented Feb 23, 2024

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.

@westonpace westonpace force-pushed the feat/async-python branch 2 times, most recently from b76ffae to dbd316e Compare February 24, 2024 19:38
@westonpace westonpace marked this pull request as ready for review February 24, 2024 19:39
Copy link
Contributor

@eddyxu eddyxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is too big to not approve :)

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have a few minor nits. Otherwise looks like a good foundation.

🤔 Since we are starting from scratch, it would be nice to enable mypy from the beginning. I might make a PR for this later this week.

name: PyPI Publish
name: Build and upload python wheels
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For continuity of the jobs, I think it would be nice to keep the name the same. We already have enough dead GA names.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted this change so the workflow will still be the same. Do dead GA names matter for workflows? Or jobs? The job name has to change because its splitting one job into three.

Copy link
Contributor

@wjones127 wjones127 Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think workflows. I'm mostly thinking of this left sidebar on https://github.com/lancedb/lancedb/actions

There some some dead names there (e.g. "Node Release"), which I find annoying.

region: Optional[str],
host_override: Optional[str],
read_consistency_interval: Optional[float],
) -> Connection: ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this return a Future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to async def which should imply the future. I'm on the fence about these having these pyi files at all and curious for your opinion. These methods aren't exposed to the user so this is only for our own internal understanding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For internal only things, I don't think we have to write them. Sometimes we might publicly expose them though, if the Python wrapper is redundant.

If I add actual mypy checks to the repo, my opinion on this might change.

@westonpace westonpace merged commit a6bcbd0 into lancedb:main Feb 27, 2024
12 of 13 checks passed
raghavdixit99 pushed a commit to raghavdixit99/lancedb that referenced this pull request Apr 5, 2024
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.
raghavdixit99 pushed a commit to raghavdixit99/lancedb that referenced this pull request Apr 5, 2024
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.
westonpace added a commit that referenced this pull request Apr 5, 2024
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.
alexkohler pushed a commit to alexkohler/lancedb that referenced this pull request Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants