Skip to content

Add complete AbstractGraph API and LEMON algorithm dispatch#25

Draft
AJ0070 wants to merge 3 commits into
JuliaGraphs:mainfrom
AJ0070:fix/447
Draft

Add complete AbstractGraph API and LEMON algorithm dispatch#25
AJ0070 wants to merge 3 commits into
JuliaGraphs:mainfrom
AJ0070:fix/447

Conversation

@AJ0070
Copy link
Copy Markdown
Member

@AJ0070 AJ0070 commented May 4, 2026

Major Changes:

  • LEMONGraph and LEMONDiGraph types implementing full AbstractGraph API
    (nv, ne, vertices, edges, has_vertex, has_edge, inneighbors, outneighbors, is_directed, edgetype)
  • O(1) fast conversion reuse via cached node/edge arrays at construction
  • GraphsInterfaceChecker.jl integration with formal API compliance validation
  • LEMON algorithm dispatch via LEMONAlgorithm marker type:
    • maxweightedperfectmatching(g, weights, ::LEMONAlgorithm)
    • dijkstra_shortest_paths(g, src, distmx, ::LEMONAlgorithm)
  • Extension support:
    • GraphsMatching.jl: minimum_weight_perfect_matching dispatch
    • GraphsOptim.jl: shortest_path dispatch
  • Relevant tests are added
  • Full documentation with usage examples

Fixes JuliaGraphs/Graphs.jl#447

AI Usage:
used GitHub copilot on auto mode.

Initially I generated skeleton with the AI. Implemented everything myself (used copilot whenever I felt complexity is high and I need to understand this more thoroughly). Then some key tests my self and asked copilot to give me complete test coverage so I don't miss out any edge cases (removed some unnecessary test it added). Then at last I asked him to update documentation according to the changes in the code (It added so many useless thing which I cleaned up).

@AJ0070
Copy link
Copy Markdown
Member Author

AJ0070 commented May 4, 2026

this was a large diff so took me good amount of time and was also parallely working on networkx issue

@AJ0070 AJ0070 marked this pull request as draft May 4, 2026 10:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 72.97297% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.43%. Comparing base (8da9a5e) to head (9dfc4b8).

Files with missing lines Patch % Lines
src/LEMONGraphs.jl 77.22% 23 Missing ⚠️
ext/LEMONGraphsGraphsMatchingExt.jl 23.80% 16 Missing ⚠️
ext/LEMONGraphsGraphsOptimExt.jl 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   80.00%   72.43%   -7.57%     
==========================================
  Files           1        3       +2     
  Lines          20      156     +136     
==========================================
+ Hits           16      113      +97     
- Misses          4       43      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AJ0070 AJ0070 marked this pull request as ready for review May 4, 2026 10:52
@AJ0070
Copy link
Copy Markdown
Member Author

AJ0070 commented May 4, 2026

failures are same as on main

@AJ0070
Copy link
Copy Markdown
Member Author

AJ0070 commented May 4, 2026

@Krastanov Can I get review on this?

@AJ0070 AJ0070 marked this pull request as draft May 5, 2026 13:28
@AJ0070
Copy link
Copy Markdown
Member Author

AJ0070 commented May 5, 2026

WIP: I will ping Krastanov once this is ready for review. this still requires good amount of work.

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.

A reliable idiomatic wrapper for the C++ library LEMON [$400]

1 participant