-
Notifications
You must be signed in to change notification settings - Fork 32
Builds on core class updates described in other pull request. Refactored graph viz modules, fixed minor bugs in core classes #45
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
IsaacFigNewton
wants to merge
40
commits into
HGX-Team:master
Choose a base branch
from
IsaacFigNewton:refactor-graph-viz
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
IsaacFigNewton
commented
Aug 15, 2025
- Renamed core class files according to PEP 8 standard
- Reintroduced add_attr_to_X_metadata to HypergraphI for backwards compatibility
- Added DOT conversion for Hypergraphs
- Rewrote/simplified Chaikin Smoothing function, merged Object class into HypergraphVisualizer class
- Added tests for hypergraph visualization modules
added metadata field to DirectedHypergraph class
fixed logic bug in check_node() switched get_nodes() to access node metadata in a more standardized fashion
still getting 34 failed tests due to TypeErrors and unwrapped edges
moved _canon_edge() implementation to i_undirected_graph from i_hypergraph fixed parameters in set_attr_to_edge_metadata, remove_attr_from_edge_metadata in i_hypergraph made a seperate _canon_edge method for directed_hypergraph
re-tested to ensure clean starting state before interface reintegration
implemented abstract methods for each class
Refactored TemporalHypergraph to inherit from IHypergraph instead of IUndirectedHypergraph streamlined node and edge management improved type annotations reorganized methods for clarity and maintainability. updated temporal-specific methods, metadata handling, serialization support, and utility functions. removed redundant code and improved docstrings for better usability.
delegated more logic to the IHypergraph consolidated node and edge management improving metadata handling, reorganizing utility and analysis methods. removed redundant methods docstrings were updated for consistency just need to debug hashing tests
Standardize edge metadata storage to use edge keys instead of edge IDs across IHypergraph and all derived classes. Update method signatures and internal logic for edge addition, removal, and metadata access to ensure consistent handling of edge metadata. Improve type annotations and initialization for edge-related attributes. Almost fully functionaly
Refactored the Hypergraph class to inherit from IUndirectedHypergraph Abstract methods for edge and node management are now implemented in Hypergraph, and shared methods such as adjacency, neighbor, and weight management are centralized in the base class. This improves code maintainability and reduces duplication across undirected hypergraph implementations.
included some tests
not sure why Github keeps capitalizing first letter of abstract class files' names
Replaced the procedural visualization functions in draw_hypergraph.py with a new class-based interface using IHypergraphVisualizer and HypergraphVisualizer. Updated __init__.py to import the new visualizer classes and removes the old draw_hypergraph.py and its associated tests.
renamed core class files according to CapWords convention for easier distinction from non-class files
Refactored hyperedge styling logic in HypergraphVisualizer and IHypergraphVisualizer to use internal color dictionaries and simplified method signatures. Improved Object class smoothing implementation. Added comprehensive tests for HypergraphVisualizer covering initialization, label extraction, styling data, color management, inheritance, and error handling.
Updated get_hyperedge_styling_data to return only coordinate lists and accept a refinement parameter. Refactored Object class to use numpy arrays and improved Chaikin smoothing implementation. Adjusted IHypergraphVisualizer and related tests to match new signatures and logic, improving clarity and flexibility in hyperedge visualization. All visualization tests now pass, with Chaikin smoothing method returning the correct # points, though I still can't figure out how to fix Object mock
also cleaned up core, viz classes' dependencies, imports
…rrectly also need to fix add_attr_to_node_metadata for Hypergraph class apparently
Introduced hypergraph_to_dot.py with methods to convert hypergraph edgelists to DOT format using auxiliary, direct, and cluster approaches. Updated __init__.py to expose new functions and adds comprehensive tests for parsing, conversion, and file saving in test_hypergraph_to_dot.py.
broke basics notebook into sections, added additional print statements, visuals, comments
Changed default metadata keys from 'type'/'text' to 'label' in label retrieval methods for consistency. Updated get_hyperedge_styling_data to return center of mass and outline coordinates as a tuple, and adjusted usage throughout code and tests to match the new return type.
Improves type annotations in visualizer interfaces and methods Refactored Object.Smooth_by_Chaikin to enforce closed polygons, use numpy for coordinate handling, fix bugs I accidentally introduced for sorting and polygon closure logic. Also updates tutorial notebook to comment out pip install and clean up cell outputs.
Moved the Chaikin smoothing logic from the Object class to IHypergraphVisualizer as a class method, eliminating the Object class. Fixed Chaikin smoothing integration to get rid of sharp edge Updated HypergraphVisualizer and related imports to use the new method. Adjusted tests to mock the new smoothing method and removed references to Object.
Also, maybe for future work, but the bounding areas representing hyperedges in the HypergraphVisualizer module could be made more robust with something like what's described here, to avoid accidentally including vertices that might not in a given hyperedge, but close to it. Before Chankin smoothing I mean. |
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.