Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request modernizes examples and adds test coverage improvements across the py3plex codebase. The changes focus on making examples more maintainable, adding deterministic behavior through seeding, and improving robustness of edge-case handling in core functionality.
Key Changes:
- Added robustness centrality edge-case tests (disconnected graphs, missing layers)
- Implemented temporal range filtering in DSL executor
- Fixed multiplex edge filtering bug in
get_edges() - Modernized 50+ example scripts to use
main() -> int+raise SystemExit(main())pattern - Added deterministic seeding throughout examples for reproducibility
Reviewed changes
Copilot reviewed 65 out of 76 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_centrality_robustness_additional.py | Adds 3 edge-case tests for robustness centrality (disconnected nodes, bridge removal, missing layers) |
| py3plex/dsl/executor.py | Implements temporal_range special predicate for temporal queries |
| py3plex/core/multinet.py | Fixes coupling edge detection bug + refactors _generic_edge_dict_manipulator |
| py3plex/comparison/metrics.py | Adds layer filtering to multiplex_jaccard |
| py3plex/datasets/_generators.py | Ensures all nodes exist in all layers for multiplex networks |
| py3plex/centrality/robustness.py | Handles inf+inf edge cases to avoid NaN in robustness scores |
| examples/* (50+ files) | Modernizes to main()/SystemExit pattern, adds type hints, seeds randomness, improves error handling |
| examples/dynamics/README.md | Documents matplotlib backend and output directory conventions |
| import sys | ||
| import tempfile | ||
| from pathlib import Path | ||
| from typing import Optional |
There was a problem hiding this comment.
Import of 'Optional' is not used.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.