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

Add document interface to Graphql #1272

Merged
merged 16 commits into from
Oct 2, 2023
Merged

Add document interface to Graphql #1272

merged 16 commits into from
Oct 2, 2023

Conversation

ricopinazo
Copy link
Contributor

@ricopinazo ricopinazo commented Sep 20, 2023

What changes were proposed in this pull request?

This PR:

  • Restructures the vectors module
  • Add a Document interface so that ids can be returned from the search function
  • Ports that interface to GraphQL
  • Reenable tests in the vectors module

Why are the changes needed?

A document interface is needed in order to be able to refer to the entities in the graph that are involved in the documents. The other changes were just general improvements for the vectors module.

Does this PR introduce any user-facing change? If yes is this documented?

It is early days for this module and docs are still to be done in general

How was this patch tested?

Some tests were reenabled

Issues

Are there any further changes required?

Yes, there are missing docs, missing tests, and missing functionality with issues created already for them

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Attention: 338 lines in your changes are missing coverage. Please review.

Comparison is base (de4b942) 57.07% compared to head (45960e6) 57.13%.

❗ Current head 45960e6 differs from pull request most recent head c2a7db3. Consider uploading reports for the commit c2a7db3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1272      +/-   ##
==========================================
+ Coverage   57.07%   57.13%   +0.05%     
==========================================
  Files         173      179       +6     
  Lines       19499    19623     +124     
==========================================
+ Hits        11129    11211      +82     
- Misses       8370     8412      +42     
Files Coverage Δ
raphtory-graphql/src/data.rs 0.00% <ø> (ø)
raphtory-graphql/src/lib.rs 0.00% <ø> (ø)
raphtory-graphql/src/model/graph/mod.rs 0.00% <ø> (ø)
raphtory-graphql/src/server.rs 0.00% <ø> (ø)
raphtory/src/python/packages/vectors.rs 0.00% <0.00%> (ø)
raphtory/src/vectors/document_source.rs 94.11% <94.11%> (ø)
raphtory-graphql/src/model/mod.rs 0.00% <0.00%> (ø)
raphtory/src/vectors/graph_entity.rs 76.92% <76.92%> (ø)
raphtory/src/vectors/embeddings.rs 0.00% <0.00%> (ø)
raphtory-graphql/src/model/graph/document.rs 0.00% <0.00%> (ø)
... and 4 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ricopinazo ricopinazo changed the title Add tests to vectors module Add document interface to Graphql Oct 2, 2023
@ricopinazo ricopinazo merged commit 293ba7c into master Oct 2, 2023
@ricopinazo ricopinazo deleted the vector-tests branch October 2, 2023 15:27
fabianmurariu pushed a commit that referenced this pull request May 21, 2024
* re-enable vector tests

* reestructure vectors module

* add empty graph test

* remove embeddings module from raphtory-graphql

* expose document interface through GraphQL

* split generate_doc into different trait

* make DocumentSource private

* make EntityDocument public for the crate

* expose document id as a vector of strings

* fix compilation errors and warnings

* ignore empty graph test in vectors module

* fix tantivity bug

* remove unused code
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.

2 participants