Skip to content

[BLD]: test Rust stub bindings in CI #3561

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

Merged
merged 4 commits into from
Jan 27, 2025
Merged

Conversation

codetheweb
Copy link
Contributor

@codetheweb codetheweb commented Jan 24, 2025

Description of changes

Adds basic CI support for testing Rust bindings.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

n/a

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@codetheweb codetheweb force-pushed the bld-rust-py-bindings-tests branch 3 times, most recently from 457585d to 6aa2e0b Compare January 25, 2025 00:00
@codetheweb codetheweb marked this pull request as ready for review January 25, 2025 00:01
@codetheweb codetheweb requested a review from HammadB January 25, 2025 00:01
@codetheweb codetheweb force-pushed the bld-rust-py-bindings-tests branch from 6aa2e0b to 2a52cfd Compare January 25, 2025 00:15
@codetheweb codetheweb changed the title [BLD]: add smoke test for Rust bindings [BLD]: test Rust stub bindings in CI Jan 27, 2025
@@ -107,7 +107,7 @@ def create_collection(
tenant: str = DEFAULT_TENANT,
database: str = DEFAULT_DATABASE,
) -> CollectionModel:
return self.proxy_segment_api.create_collection(
return self.bindings.create_collection(
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 added a stub for this method as admin APIs aren't called by most tests

@@ -77,4 +77,28 @@ impl Bindings {
}

////////////////////////////// Base API //////////////////////////////
#[allow(clippy::too_many_arguments)]
fn create_collection(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

decided to require Python to pass defaults instead of duplicating the defaults here

Copy link
Collaborator

Choose a reason for hiding this comment

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

note to self: align list databases and others

Copy link
Contributor

@rescrv rescrv left a comment

Choose a reason for hiding this comment

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

LGTM

@codetheweb codetheweb enabled auto-merge (squash) January 27, 2025 18:52
@codetheweb codetheweb merged commit f6c07d7 into main Jan 27, 2025
90 checks passed
@codetheweb codetheweb deleted the bld-rust-py-bindings-tests branch January 27, 2025 20:43
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.

3 participants