Skip to content

Conversation

IsaacFigNewton
Copy link

  • 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.
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.
@IsaacFigNewton
Copy link
Author

IsaacFigNewton commented Aug 15, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant