refactor: extract GEXF export from the Apotheosis facade (closes #18) - #25
Open
Dani-giron wants to merge 2 commits into
Open
refactor: extract GEXF export from the Apotheosis facade (closes #18)#25Dani-giron wants to merge 2 commits into
Dani-giron wants to merge 2 commits into
Conversation
…rseame#18) draw(), add_attribute_schema() and save_gexf() move unchanged to a new export::gexf module that consumes the facade through its public API.
Dani-giron
force-pushed
the
refactor/f1-extract-gexf-export
branch
from
July 22, 2026 10:47
37b208b to
0ae7858
Compare
danielhuici
reviewed
Jul 31, 2026
|
|
||
| // Once draw is built, we need to add the attribute schema to the GEXF XML | ||
| // Has to be done manually since gexf crate does not support it yet. | ||
| fn add_attribute_schema(xml: String, attributes: Vec<(String, String)>) -> String { |
Collaborator
There was a problem hiding this comment.
This functions shouldn't be necessary anymore (fixed at GEFX library)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apotheosis.rsmixed index coordination, persistence and GEXF visualization export (about 85 of its 250 lines, including manual XML string patching). Any change to the export format touched the same file holding the critical insert/search logic.Changes
src/export/gexf.rs(new):draw(),add_attribute_schema()andsave_gexf()moved unchanged, now a free functionexport::gexf::draw(&model, path)consuming the facade through its public API.src/controllers/apotheosis.rs:draw()removed. Two read-only accessors added:draw_model()(graph shape, one entry per layer) andrecord(index). Both are needed byexport::gexf::draw(), which lives outside this impl and cannot reachhnsw/recordsdirectly now that they are private ([Enhancement] Make Apotheosis internal fields private to protect the synchrony invariant #14/fix: make Apotheosis internal fields private (closes #14) #15).src/lib.rs:pub mod export;.Breaking change, declared: callers of
model.draw(path)move toexport::gexf::draw(&model, path). Verified nothing in this repo callsdraw()besides its own definition.Test plan
Test coverage for this refactor will be added as part of the dedicated test suite work (tests are being consolidated separately instead of per-PR).
cargo test,cargo checkpass locally.rustfmt --checkon the three changed files (apotheosis.rs,export/gexf.rs,export/mod.rs) passes. (src/lib.rswas excluded from the direct rustfmt check since it cascades to the whole module tree including unrelated pre-existing files.)cargo clippyon the full crate could not be verified locally (unrelated toolchain issue on this machine); will be validated by CI on this PR.Closes #18