-
Notifications
You must be signed in to change notification settings - Fork 3
Add GraphsInterfaceChecker compliance tests #12
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| [deps] | ||
| Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
| Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" | ||
| GraphsInterfaceChecker = "3bef136c-15ff-4091-acbb-1a4aafe67608" | ||
| JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" | ||
| LEMONGraphs = "14b1564f-c77f-4800-9e89-efd961faef7c" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LEMONGraphs is already the parent project -- it should not be added here. |
||
| Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" | ||
| Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
| TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is not seen by the test runner. If you use |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| using Test | ||
| using Graphs | ||
| using LEMONGraphs | ||
| using GraphsInterfaceChecker | ||
|
|
||
| # helper: make a small usable LEMON graph | ||
| function make_small_undirected() | ||
| # Example: if your package exposes LEMONGraph(n) | ||
| g = LEMONGraph(5) | ||
| add_edge!(g, 1, 2) | ||
| add_edge!(g, 2, 3) | ||
| return g | ||
| end | ||
|
|
||
| function make_small_directed() | ||
| gd = LEMONDiGraph(5) | ||
| add_edge!(gd, 1, 2) | ||
| add_edge!(gd, 2, 3) | ||
| return gd | ||
| end | ||
|
|
||
| @testset "LEMONGraphs interface checks" begin | ||
| @testset "Undirected LEMONGraph" begin | ||
| g = make_small_undirected() | ||
| check_graph_interface(g) | ||
| if hasmethod(check_mutable_graph_interface, Tuple{typeof(g)}) | ||
| check_mutable_graph_interface(g) | ||
| end | ||
|
Comment on lines
+26
to
+28
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reads a bit like it was confabulated by an LLM. LLMs are useful tools, but you have to disclose their use, as that informs how to perform the review.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. look at NautyGraphs for how to structure this file |
||
| end | ||
|
|
||
| @testset "Directed LEMONGraph" begin | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can skip this for now -- let's make sure the undirected graph case works |
||
| gd = make_small_directed() | ||
| check_digraph_interface(gd) | ||
| if hasmethod(check_mutable_graph_interface, Tuple{typeof(gd)}) | ||
| check_mutable_graph_interface(gd) | ||
| end | ||
| end | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GraphsInterfaceChecker is not registered so this will have to be a manually installed dependency (using Pkg inside of the runtests.jl). See https://github.com/JuliaGraphs/NautyGraphs.jl/pull/25/files#diff-060d04ab60a4aa7e86bfb99aaf52194f3248724e7b254508b6e7106e354101da
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, my comment is wrong, it seems GraphsInterfaceChecker is actually registered, you can disregard this comment