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: graph build allow data filter #11

Merged
merged 4 commits into from
Dec 26, 2023
Merged

Conversation

edwinkys
Copy link
Member

@edwinkys edwinkys commented Dec 25, 2023

Purpose

This PR introduce a feature that allows users to filter the data while building a graph. This allows building a graph with a specific set of values. This is useful to support multiple custom graph in the same database.

For example, if we have data with type image or text, we can have one graph for image type only and another one for text type only.

Approach

We simply iterate over the filters which now is included in the data to build the graph, the graph configuration data. Then, we match if the values that we want to use to build a graph match any of the filter. If it is, we include it in the values used to build graph.

Testing

  • I have tested this PR locally.
  • I added tests to cover my changes, if not applicable, I have added a reason why.

I have tested the functionality locally with an HTTP client to create multiple values with 2 different IDs and used this functionality to create 2 different graph for each ID.

Chore checklist

  • I have updated the documentation accordingly.
  • I have added comments to most of my code, particularly in hard-to-understand areas.

@edwinkys edwinkys added enhancement New feature or request in progress labels Dec 25, 2023
@edwinkys edwinkys self-assigned this Dec 25, 2023
@edwinkys edwinkys merged commit c1ff034 into main Dec 26, 2023
@edwinkys edwinkys deleted the feat-graph-values-data-filtering branch December 26, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant