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

Property API fixes #1825

Open
3 tasks
miratepuffin opened this issue Oct 15, 2024 · 0 comments
Open
3 tasks

Property API fixes #1825

miratepuffin opened this issue Oct 15, 2024 · 0 comments
Labels
Semantics/API Changes to the way we interact with Raphtory or the results which are returned

Comments

@miratepuffin
Copy link
Collaborator

This is a master ticket to jot down annoying things with the property API's

  • Edge property APIs are a bit of a hack under the hood - this means that that are a couple orders of magnitude slower than node properties
  • If you ask for properties on edges/nodes and all of the entities do not have this property you will get a None, if some of them do you will get an iterator of Options - this means you have to check fi the returned object is None, instead of just being about to iterate over an empty iterator.
  • If I call get on an individual Node/Edge I will get a None if that entity doesn't have that property (understandable), but I will also get Nones when calling on Edges/Nodes - this means that I can only call sum() etc when all Edges/Nodes have this property. As we know the type of the property (assuming at least one entity has it) it makes much more sense to return a default value i.e. 0, "", or []
@miratepuffin miratepuffin added the Semantics/API Changes to the way we interact with Raphtory or the results which are returned label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Semantics/API Changes to the way we interact with Raphtory or the results which are returned
Projects
None yet
Development

No branches or pull requests

1 participant