Closed hyanwong closed 9 months ago
The GeneticInheritanceGraphLibrary
has undergone a significant refactor, including class renamings and inheritance structure changes to improve functionality and compatibility with tskit
. A to_dict
method has been added for object-to-dictionary conversions, and the test suite has been updated to reflect the renaming of the main module and to include new test cases for enhanced robustness.
File Path | Change Summary |
---|---|
.../tables.py |
- Renamed IEdgeTableRow to TableRow and added a new inheriting IEdgeTableRow class.- NodeTableRow now inherits from TableRow .- Added to_dict method in BaseTable .- Updated add_row and append methods for integer conversion and tskit compatibility. |
tests/conftest.py tests/gigutil.py tests/test_graph.py tests/test_util.py |
Renamed imported module from GeneticInheritanceGraph to GeneticInheritanceGraphLibrary . |
tests/test_tables.py |
- Updated module import renaming. - Refactored assertions in test cases. - Added test_append_bad_coord_type test case. |
🐇✨ To code anew, we hop and leap,
With classes renamed, inheritance steep.
Tests now align with library's grace,
In genetic graphs, we find our place.
🧬📊
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?
And better coord checking of nonintegers
Summary by CodeRabbit
Refactor
IEdgeTableRow
toTableRow
and introduced a newIEdgeTableRow
class inheriting from it for better structure and clarity.NodeTableRow
class to derive fromTableRow
.BaseTable
class with ato_dict
method for object-to-dictionary conversions.New Features
add_row
andappend
methods for integer handling and tskit compatibility.Tests
GeneticInheritanceGraph
toGeneticInheritanceGraphLibrary
.test_append_bad_coord_type
to ensure robust error handling in theappend
method.Documentation