Skip to content

Conversation

arienandalibi
Copy link
Collaborator

What changes were proposed in this pull request?

The history object will take care of the history of nodes and edges. It will also implement different functionalities so they don't have to be implemented in Python by the user.

Why are the changes needed?

Improve user experience when dealing with histories by implementing useful features out of the box.

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

The history object itself, which will be documented

How was this patch tested?

Not been tested yet

Are there any further changes required?

Integration with Raphtory

…HistoryObject holds iterators over history items to return them as needed. HistoryObjects can be aggregated in CompositeHistory.
@CLAassistant
Copy link

CLAassistant commented May 5, 2025

CLA assistant check
All committers have signed the CLA.

…yObject is now a trait. HistoryImplemented holds a node or edge object and retrieves forward and reverse iterators through functions. CompositeHistory now holds a vector of Boxes containing HistoryObjects.
…hey return MergedHistory and CompositeHistory wrapped in HistoryImplemented objects respectively. MergedHistory holds two InternalHistoryOps objects while CompositeHistory stores a vector of arbitrarily many. MergedHistory is slightly more efficient but if nested with itself, can lose efficiency.
…t an iterator over the history events in the history object. History objects can be created from nodes and edges. We can do list(history_object) in python. Removed Arc constraint on the history object.
…ors. Attempted to implement __eq__ and __ne__ for python objects. Added timeindex.rs file to raphtory-api module to support the conversion of TimeIndexEntry type into PyRaphtoryTime, accessible in python.
…Started work on python compose_from_items() function, doesn't work yet. Can't retrieve the python objects. Implemented first iteration of graphql file
…m in graphql. Implemented hashing both in rust and in python. They can theoretically now be used in hashmaps (maps) in python.
…directly on nodes and edges, using windows, using layers, and using property filters.
…nd manipulated. They implement Eq and Ord functionalities, even in python
…object is called History. Fixed implementation of NodeOp for HistoryOp.
# Conflicts:
#	raphtory-graphql/src/model/graph/edge.rs
#	raphtory-graphql/src/model/graph/mod.rs
#	raphtory-graphql/src/model/graph/node.rs
…return TimeIndexEntry instead of i64. Created new EarliestDateTime struct which implements NodeOp but returns DateTime<Utc> instead of i64, might be removed later. Removed NodeOpFilter from Map for NodeOp
…s. Currently supports OutOfRange when trying to convert to DateTime<Utc> from an out-of-range i64 and NotFound for operations where a time entry is not found. Changed output type of dt() from an Option to a Result so that these errors can be propagated.
… Options for time information which isn't found, now Result<Option<DateTime>, GraphError>. Continued integrating these in the python interface. Errors in macros persist.
…urn my history object. Changed function temporal_history() of TemporalPropertyViewOps to return TimeIndexEntries instead of i64. Propagated changes
…ed to return it now return Result<NodeState<Option<DateTime>>>. The function itself might fail but the NodeState will not contain any errors. Changed earliest_time_window and latest_time_window to take TimeIndexEntry instead of i64. Fixed flatten() on LazyNodeState<HistoryOp> and added it on NodeState<History>.
…>]> instead of Vec<Arc<dyn InternalHistoryOps + 'a>>.
…ntry. Added secondary indices to to_networkx() and fixed tests. Added TimeIndexEntryIterable and NestedTimeIndexEntryIterable for edges. Added as_tuple function on TimeIndexEntry.
… (i64, string, or tuple (i64||string, usize) instead of only i64. String is a formatted DateTime string. Changed CompositeHistory to hold Box<[T]>. Updated at(), after(), and before() to ignore secondary index of TimeIndexEntry for the time being.
…id name clashing with other Window in GraphQL. Updated tests to use new time input semantics
arienandalibi and others added 10 commits September 8, 2025 18:10
# Conflicts:
#	python/python/raphtory/__init__.pyi
#	python/python/raphtory/node_state/__init__.pyi
#	raphtory-graphql/schema.graphql
#	raphtory-graphql/src/model/graph/edge.rs
#	raphtory-graphql/src/model/graph/edges.rs
#	raphtory-graphql/src/model/graph/filtering.rs
#	raphtory-graphql/src/model/graph/graph.rs
#	raphtory-graphql/src/model/graph/node.rs
#	raphtory-graphql/src/model/graph/nodes.rs
#	raphtory-graphql/src/model/graph/path_from_node.rs
#	raphtory-graphql/src/model/graph/vector_selection.rs
#	raphtory-graphql/src/model/graph/vectorised_graph.rs
…ses to base_modules.rs for proper type hints.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'GraphQL Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: bc60d93 Previous: f14de7d Ratio
addNode 17 req/s 1460 req/s 85.88

This comment was automatically generated by workflow using github-action-benchmark.

# Conflicts:
#	docs/reference/graphql/graphql_API.md
#	raphtory-graphql/schema.graphql
…lity, greater than/less than comparisons, tuple behaviour, ...
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.

4 participants