Skip to content

Conversation

@arienandalibi
Copy link
Collaborator

@arienandalibi arienandalibi commented May 5, 2025

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?

Many new tests

Are there any further changes required?

Integration with Raphtory

Fixes #1424 #1163 #1759

…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
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 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 94e3241 Previous: 46e0552 Ratio
lotr_graph_subgraph_10pc/num_nodes 14 ns/iter (± 0) 4 ns/iter (± 0) 3.50

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

github-actions bot and others added 15 commits October 21, 2025 08:12
# Conflicts:
#	raphtory/tests/db_tests.rs
#	raphtory/tests/df_loaders.rs
… that functions that return Option<EventTime> don't crash in python when we get None and call .t(), .dt(), ...
…ptionalEventTime instead. Calling .t(), .dt(), ... on this object will not raise an exception in python even if the option is None.
# Conflicts:
#	python/python/raphtory/__init__.pyi
#	python/python/raphtory/iterables/__init__.pyi
#	python/python/raphtory/node_state/__init__.pyi
…for comparison. Fixed python docs return type annotations.
…tory[index]. Added EventTime and OptionalEventTime as TimeInput types. Fixed tests
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: 3ac89ad Previous: 7345830 Ratio
readAndWriteNodeProperties 349 req/s 1302 req/s 3.73

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

… we can still call timestamp, datetime, etc... on it without panicking.
# Conflicts:
#	python/python/raphtory/vectors/__init__.pyi
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 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: d0ce370 Previous: ca869cb Ratio
lotr_graph_subgraph_10pc/num_nodes 14 ns/iter (± 0) 4 ns/iter (± 0) 3.50

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

…ptionalEventTime. Replaced all uses with this updated type.
…as just `datetime` types. This is supported anywhere that an EventTime or an InputTime is expected.
…ded flatten and flattened_list function for all iterable and nested iterable types of history objects (History, HistoryTimestamp, HistoryDatetime, ...). Added tests for python datetime.date ingestion
# Conflicts:
#	python/python/raphtory/graphql/__init__.pyi
#	python/python/raphtory/vectors/__init__.pyi
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.

All datetime conversions should return result not option

6 participants