Pometry / Pometry/Raphtory

Refactor Filtering

Open
#2,620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
642
Forks
70
Avg merge
2d 13h
Merged PRs (30d)
21

Description

  1. Add implicit type conversions which will enable the filters to compare only values in contrast to comparing their types. We want to create some sort of trait that guarantees that this logic occurs for all filters.
  2. Avoid exposing expression and other irrelevant methods on FilterBuilders (atm, we panic if an irrelevant method is called on NodeDegree which is undesirable). For example, Node.degree(direction).all() should not even be a part of the NodeDegreeFilterBuilder interface.
  3. Create traits that make the code more reusable which will lead to consistent logic and easier to maintain code. This will also avoid the exposing irrelevant methods that occurs from a Filter inheriting a coupled trait. Also, some methods and struct attributes end up storing garbage values because they are irrelevant to the actual logic of the Filter.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating FilterBuilders, NodeDegreeFilterBuilder, Node.degree(direction), and the existing filter traits; map which methods are exposed and where type comparisons occur. Done means conversions and reusable traits cover all filters, irrelevant methods are unavailable rather than panicking, and irrelevant state is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.