v0.11.0
·
140 commits
to master
since this release
Release v0.11.0
Cached Graph
- We have updated the on-disk format of the graph to now be stable across versions.
- This new storage format is also updatable, allowing deltas to be inserted into an already existing file instead of having to resave the whole graph.
- You can now 'cache' a graph, attaching a file to it, and periodically save all changes which have been inserted. Great for checkpointing! See the example below:
from raphtory import Graph
g= Graph() #Create new graph
g.add_edge(1,1,2)
g.add_edge(3,4,5)
g.cache("example_graph.raph") #add some updates and write these to a file - keeping the file attached to the graph
g.add_node(2,3)
g.add_edge(10,2,3)
g.write_updates() #Add some new updates and write these out
GraphQL
- The GraphQL server has had a massive overhaul, allowing it to now create, update, and manage a working directory full of graphs.
- Graphs will now persist across server runs based on the new cache-graph file format described above.
- These new APIs also allow you to export subgraphs from one graph into another.
A basic example of this can be seen below:
from raphtory import graphql
server = graphql.GraphServer("graphs/")
server.run()
client = server.get_client() #run a local server and get the client
#create a new graph in the 'example_graphs' namespace
client.query("""
mutation {
newGraph(path:"example_graphs/graph1",graphType:EVENT)
}
""")
#add an edge into the new graph
client.query("""
query add_edge{
updateGraph(path: "example_graphs/graph1") {
addEdge(time:1,src:"node1",dst:"node2",properties: [
{key: "new", value: "new props are awesome"}
{key: "number", value: 0.7}
{key: "map", value: { a: "hi"}}
]){success}
}
}""")
Pandas and Parquet loader changes:
- We have placed time as the second parameter within the
graph.load_x_from_y
to matchg.add_node
andg.add_edge
. - All parameters named props in the
graph.load_x_from_y
functions have been updated toproperties
. - The
Layer_in_df
flag has been replaced bylayer
andlayer_col
which will now throw an error if both are set. - The
node_type_in_df
flag has been replaced bynode_type
andnode_type_col
which will now throw an error if both are set. - You can now set the node_type via
load_node_props_from_x
functions. - We have removed the static
load_from_pandas
andload_from_parquet
functions from the graph as these had WAY too many arguments and were all around very confusing. Instead you can now create a graph first and useload_edges_from_X
etc. - The Datareader behind the Pandas and Parquet loaders now chunks the data and loads these in in part, drastically reducing the memory overhead for large datasets on ingestion.
Minor changes
- Optimised the way node IDs are stored/referenced, greatly increasing both lookup and insertion speed. This does mean, however, that a graph can only have String XOR Integer ids now, not both at the same time.
- We have updated to rust 1.80.0
What's Changed
- Fix release by @fabianmurariu in #1693
- make the benchmark names consistent again by @ljeub-pometry in #1691
- Fix benchmark names by @ljeub-pometry in #1694
- Pre multi graph by @fabianmurariu in #1695
- Feature/more merge tests by @ljeub-pometry in #1702
- Features/cached graphs by @shivam-880 in #1656
- Feature/incremental protobuf by @ljeub-pometry in #1706
- update rust version for readthedocs by @ljeub-pometry in #1708
- Make sure the string interning happens on decoding protobuf files by @ljeub-pometry in #1711
- much cleaner and easier way to test all the features compile by @ljeub-pometry in #1710
- Post cache graphql fixes by @miratepuffin in #1709
- Fix/dfview by @shivam-880 in #1712
- Feature/cached graph by @ljeub-pometry in #1718
- Tidy/ingestor by @shivam-880 in #1714
- GraphQL mutation apis by @ljeub-pometry in #1719
- Update README.md by @miratepuffin in #1726
- Release v0.11.0 by @github-actions in #1727
Full Changelog: v0.10.0...v0.11.0