Skip to content

refactor: extract GEXF export from the Apotheosis facade (closes #18) - #25

Open
Dani-giron wants to merge 2 commits into
reverseame:apotheosis2from
Dani-giron:refactor/f1-extract-gexf-export
Open

refactor: extract GEXF export from the Apotheosis facade (closes #18)#25
Dani-giron wants to merge 2 commits into
reverseame:apotheosis2from
Dani-giron:refactor/f1-extract-gexf-export

Conversation

@Dani-giron

Copy link
Copy Markdown

Summary

apotheosis.rs mixed 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

Breaking change, declared: callers of model.draw(path) move to export::gexf::draw(&model, path). Verified nothing in this repo calls draw() 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 check pass locally.
  • rustfmt --check on the three changed files (apotheosis.rs, export/gexf.rs, export/mod.rs) passes. (src/lib.rs was excluded from the direct rustfmt check since it cascades to the whole module tree including unrelated pre-existing files.)
  • cargo clippy on the full crate could not be verified locally (unrelated toolchain issue on this machine); will be validated by CI on this PR.

Closes #18

…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
Dani-giron force-pushed the refactor/f1-extract-gexf-export branch from 37b208b to 0ae7858 Compare July 22, 2026 10:47
Comment thread src/export/gexf.rs

// 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 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This functions shouldn't be necessary anymore (fixed at GEFX library)

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