{"id":16003511,"url":"https://github.com/s1ck/assert-graph-iso","last_synced_at":"2025-04-05T01:40:55.585Z","repository":{"id":57497616,"uuid":"350854677","full_name":"s1ck/assert-graph-iso","owner":"s1ck","description":"Checks if two property graphs are isomorphic.","archived":false,"fork":false,"pushed_at":"2021-04-03T15:35:51.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T23:30:44.530Z","etag":null,"topics":["gdl","graph","isomorphism","property-graph"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s1ck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-23T20:54:34.000Z","updated_at":"2021-04-03T15:37:48.000Z","dependencies_parsed_at":"2022-09-04T00:10:21.955Z","dependency_job_id":null,"html_url":"https://github.com/s1ck/assert-graph-iso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1ck%2Fassert-graph-iso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1ck%2Fassert-graph-iso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1ck%2Fassert-graph-iso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1ck%2Fassert-graph-iso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s1ck","download_url":"https://codeload.github.com/s1ck/assert-graph-iso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276096,"owners_count":20912287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gdl","graph","isomorphism","property-graph"],"created_at":"2024-10-08T10:21:05.229Z","updated_at":"2025-04-05T01:40:55.561Z","avatar_url":"https://github.com/s1ck.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"### assert-graph-iso\n\nA test utility to check if two property graphs are equal, i.e., isomorphic.\nThe check is performed by computing a canonical string representation for each graph.\nIf the canonical representations are identical, the graphs are considered isomorphic.\nThe crate is supposed to be used as a test utility, it is not designed for large scale graph comparisons.\n\n\n#### Property graph data model\n\nA property graph consists of nodes and relationships.\nNodes have zero or more labels, relationships have zero or one relationship type.\nBoth, nodes and relationships have properties, organized as key-value-pairs.\nRelationships are directed, starting at a source node and pointing at a target node.\n\n\n#### Usage\n\nThe crate contains a `Graph` trait which defines a property graph.\nUsers are supposed to implement the trait for their custom graph implemention.\nThe crate also provides a `gdl` feature which allows for simple graph definition using a declarative language.\nCheck out the [gdl on crates.io](https://crates.io/crates/gdl) for more information about the language.\n\nTesting for equality:\n\n```rust\nuse ::gdl::Graph as GdlGraph;\nuse assert_graph_iso::*;\n\nlet g1 = \"(a), (b), (a)-[:REL { foo:42 }]-\u003e(b)\".parse::\u003cGdlGraph\u003e().unwrap();\nlet g2 = \"(a), (b), (b)-[:REL { foo:42 }]-\u003e(a)\".parse::\u003cGdlGraph\u003e().unwrap();\n\nassert!(equals(\u0026g1, \u0026g2))\n```\n\nCompare the canonical representations for easier debugging:\n\n```rust\nuse ::gdl::Graph as GdlGraph;\nuse assert_graph_iso::*;\n\nlet g1 = \"(a:Label1), (b:Label2), (a)--\u003e(b)\".parse::\u003cGdlGraph\u003e().unwrap();\nlet g2 = \"(a:Label2), (b:Label1), (b)--\u003e(a)\".parse::\u003cGdlGraph\u003e().unwrap();\n\nassert_eq!(canonicalize(\u0026g1), canonicalize(\u0026g2))\n```\n\n\n### License\n\nApache 2.0 or MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1ck%2Fassert-graph-iso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs1ck%2Fassert-graph-iso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1ck%2Fassert-graph-iso/lists"}