A reliable idiomatic wrapper for the C++ library `LEMON` [$400]
A reliable idiomatic LEMON wrapper [$400]
The JuliaGraphs/LEMONGraphs.jl package already exists and provides an extremely barebones wrapper for the LEMON C++ library. It is barely more than a proof of concept for the build infrastructure. A lot of this work probably will not be directly in the Graphs.jl repository.
- [ ] Fast conversion and/or views between Graphs.jl types and the C++ structures of LEMON (slow converters already exist for simple graphs)
- [ ] Complete Graph API support for the LEMONGraph types (so that LEMONGraph types can be used in all already existing Graph.jl algorithms that do not peek behind the API)
- [ ] use GraphsInterfaceChecker.jl in the test suite
- [ ] Dispatch from operations defined in Graphs/GraphsMatching/GraphsOptim to LEMON implementation. For instance if there is a pre-existing
Graphs.some_interesting_property(::AbstractGraph)there should now be a new method defined in LEMONGraphssome_interesting_property(g::AbstractGraph, ::LEMONAlgorithm)that dispatches to the C++ implementation. It should convert thegargument to LEMONGraph if necessary. - [ ] If there is an algorithm defined in LEMON that does not exist yet in Graphs.jl, it should be declared in Graphs.jl (just a function with docs but no methods), together with an error hint that LEMONGraphs is necessary. Given the large scope of the library, this can be more of a proof-of-concept setup, documenting how to add everything, but not expecting everything to be added for completing the bounty.
- [ ] Proper tests and documentation.
- [ ] PRs on this topic have to be submitted with clean git histories and well compartmentalized for ease of review.
Required skills: familiarity with the Graphs.jl API and understanding of the CxxWrap interface package.
Reviewer: any Graphs.jl member with merge rights
Duration: 3 months
Payout procedure:
The Funding for these bounties comes from the National Science Foundation and from the NSF Center for Quantum Networks. The payouts are managed by the NumFOCUS foundation and processed in bulk once every two months. If you live in a country in which NumFOCUS can make payments, you can participate in this bounty program.
Click here for more details about the bug bounty program.
Bug bounty logistic details (click to expand)
To claim exclusive time to work on this bounty either post a comment here or message [email protected] with:
- your name
- github username
- (optional) a brief list of previous pertinent projects you have engaged in
If you want to, you can work on this project without making a claim, however claims are encouraged to give you and other contributors peace of mind. Whoever has made a claim takes precedence when solutions are considered.
You can always propose your own funded project, if you would like to contribute something of value that is not yet covered by an official bounty.
@Krastanov can i work on this issue
Hi, @MAVRICK-1 ! Could you share any background you might have in Julia or C++, and in what steps you would like to solve this bounty? If you are familiar with the languages and have some rough plan, I would be happy to assign the bounty to you.
@Krastanov i have knowledge about juila current i am working on this pr https://github.com/JuliaEarth/GeoIO.jl/pull/172
Great! Could you answer the rest of my questions: C++ experience, plans of how to tackle this bounty, etc.
@Krastanov i have Experience with C++/other language bindings and cross-language interop sand Familiar with memory management and performance optimization
Solution Plan
Core Strategy: Build fast, memory-safe conversion layer between Graphs.jl and LEMON C++ structures using CxxWrap.jl
Implementation:
- Create robust type mappings between Julia and LEMON graph structures
- Implement complete Graphs.jl API for LEMONGraph types
- Expose LEMON's unique algorithms (network flows, matching) with clean Julia interfaces
- Add dispatch methods for GraphsMatching/GraphsOptim integration
Quality Assurance:
- Use GraphsInterfaceChecker.jl for API compliance testing
- Comprehensive test suite and documentation
- Performance profiling at Julia/C++ boundaries
The goal is a production-ready wrapper that gives Julia access to LEMON's powerful graph algorithms while maintaining performance and API consistency with the existing Graphs.jl ecosystem.
Thanks, @MAVRICK-1 ! I will proceed with assigning the bounty to you. Please make sure that:
- you submit small PRs -- one big large PR will probably never get reviewed, but multiple small ones will be easy to review. Do not lump disparate changes in the same PR.
- make sure you rely on the existing LEMON wrapper and extend it, instead of reimplementing things from scratch
- if you use any LLM tools, make sure to disclose their use in the PR description
Hi, @MAVRICK-1 ! Just wanted to double check whether you are still working on this bounty? There is no rush on it, you have plenty of time to work on it, I just wanted to make sure you are still interested. I am asking because we have not had a discussion after I left a few comments on your PR.
@Krastanov currently I am learning a few things to implement it more better
Hi, @MAVRICK-1 ! How is this going? Is there anything I can help with?