Skip to content

Scaffold LEMONAlgorithm marker; add smoke test; document API surface #4

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Ashutosh0x
Copy link

Initial scaffolding for LEMON-backed algorithm dispatch. Adds marker type LEMONAlgorithm, smoke test, and README note. Aligns with Graphs.jl issue #447: JuliaGraphs/Graphs.jl#447

Copy link

codecov bot commented Aug 12, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Member

@Krastanov Krastanov left a comment

Choose a reason for hiding this comment

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

Thanks for starting this! I left a few comments in. It seems most of the work done here is on scaffolding. Let's plan on doing a review when there is actual use of the new API.

I believe the easiest first step would be to make sure the basic Graph API is being followed (things like ne and nv, etc). Let's focus first on making sure the tests from https://github.com/JuliaGraphs/GraphsInterfaceChecker.jl pass.

Comment on lines +20 to +28
# Attempt to load the wrapped C++ module; do not hard-fail so the
# Julia package can still load and downstream tests can decide to skip.
try
@wrapmodule(LEMON_jll.get_liblemoncxxwrap_path)
WRAP_OK[] = true
catch err
@warn "LEMONGraphs: failed to load LEMON C++ wrapper; functionality disabled" error=err
WRAP_OK[] = false
end
Copy link
Member

Choose a reason for hiding this comment

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

Could you elaborate on why this is necessary? Seems like a lot of added complexity, which will be interacting particularly badly with precompilation and invalidation. It seems reasonable to me to have dependencies of this package fail if this package fails?

Comment on lines +6 to +12
@testset "Aqua" begin
Aqua.test_unbound_args(LEMONGraphs)
Aqua.test_undefined_exports(LEMONGraphs)
Aqua.test_project_extras(LEMONGraphs)
# Skip stale_deps and deps_compat for extras in CI for now; Project.toml now uses [extras]/[targets]
Aqua.test_persistent_tasks(LEMONGraphs)
end
Copy link
Member

Choose a reason for hiding this comment

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

could you restructure this into a call to test_all with explicit opting out from the tests you do not want to run (like ambiguities=false)

using JET
using Test
using LEMONGraphs
if get(ENV, "JET_TEST", "") == "true"
Copy link
Member

Choose a reason for hiding this comment

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

runtests.jl already filters by env variables. This one seems redundant.

Copy link
Member

Choose a reason for hiding this comment

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

Could you undo these changes? It seems safer to have CI fail while we know that its features are not implemented -- selectively dissabling CI is a bit dangerous, as it might inadvertently remain dissabled.

@@ -55,6 +55,7 @@ jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
if: false # disable docs build until docs/ is added back
Copy link
Member

Choose a reason for hiding this comment

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

Could you undo these changes? It seems safer to have CI fail while we know that its features are not implemented -- selectively dissabling CI is a bit dangerous, as it might inadvertently remain dissabled.

Comment on lines +16 to +21

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
Copy link
Member

Choose a reason for hiding this comment

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

we have a separate tests/Project.toml -- these should not be needed

Comment on lines +1 to +5
[default]
extend-ignore-re = [ "LEMON" ]
[files]
extend-exclude = [ "docs/**" ]

Copy link
Member

Choose a reason for hiding this comment

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

these excludes seem dangerous -- let's keep the (nonexistent) docs tested

Comment on lines +27 to +36
# Smoke test: ensure the module initializes and the marker type exists.
@testitem "LEMON init and marker" begin
using Test
using LEMONGraphs
@test isdefined(LEMONGraphs, :LEMONAlgorithm)
# Skip heavy tests if C++ wrapper failed to load
if !LEMONGraphs.Lib.WRAP_OK[]
@info "Skipping LEMON-backed tests: C++ wrapper not loaded"
end
end
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure we need this test. It seems to just be checking for the presence of a symbol.

@Krastanov
Copy link
Member

A note on the review process: generally try to make no changes outside of the single task you are working on -- multiple small PRs are much easier to review. In particular, if something unrelated and stylistic is being changed in a PR that implements a new feature, the merge of the new feature probably will be delayed over bikesheding on the stylistic change.

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.

2 participants