Skip to content

Tests pandas module#260

Merged
M-Lampert merged 4 commits into
mainfrom
Tests/io-module
Jun 13, 2025
Merged

Tests pandas module#260
M-Lampert merged 4 commits into
mainfrom
Tests/io-module

Conversation

@M-Lampert

Copy link
Copy Markdown
Contributor

Graph Functionality Enhancements:

  • Updated the to_undirected method in src/pathpyG/core/graph.py to manually handle undirected edge creation, ensuring compatibility with numpy-based edge attributes. Removed reliance on ToUndirected transform.

Temporal Graph Improvements:

  • Introduced __getitem__ method in src/pathpyG/core/temporal_graph.py for accessing graph attributes, node attributes, and edge attributes using keys, including support for temporal edges.
  • Added a tedge_to_index -map initialised in the __init__ method of src/pathpyG/core/temporal_graph.py, enabling mapping of edges with timestamps to their indices in edge_index.

DataFrame Parsing Enhancements:

  • Refactoring by introducing a _parse_timestamp function in src/pathpyG/io/pandas.py to handle timestamp parsing and rescaling in DataFrame columns, improving code readability
  • Enhanced _parse_df_column to support additional data types like lists and tuples, ensuring robust parsing of DataFrame attributes into graph data objects.

Logging and Error Handling:

  • Replaced print statements with logger.debug or raised exceptions in src/pathpyG/io/pandas.py to improve error handling and debugging.

Testing

  • Added tests to all functions in the pathpyG.io.pandas module, increasing the total code coverage by 3% 🎉

@M-Lampert M-Lampert merged commit 847cfa1 into main Jun 13, 2025
4 checks passed
@M-Lampert M-Lampert deleted the Tests/io-module branch June 13, 2025 15:50
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