Conversation
- Simplified the GitHub Actions workflow by removing unnecessary triggers and matrix strategy. - Updated the test file to include additional test cases for spatial edges, ancestor retrieval, and tree edit distances. - Improved code readability and consistency in the lineageTree class methods.
- Implemented a new test suite for lineageTree in test_lineageTree.py, covering various functionalities including reading from XML, adding/removing nodes, time resolution, loading, cross-comparison, and plotting. - Added tests for edge cases and error handling in lineageTree methods. - Created a separate test suite for Zhang edit distance in test_uted.py, reproducing results from Guignard et al. (2020) and validating the implementation against known cases. - Included tests for local cost functions and normalized edit distances for specific tree structures.
- Consolidated import statements for clarity and removed the try-except block for `uted` import. - Removed commented-out code related to node positioning in the `_add_node` method. - Updated warning message formatting in the `set_time` method for consistency. - Minor adjustments to maintain code readability and organization.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
…antiation and remove commented code
ChrisMzz
left a comment
There was a problem hiding this comment.
Looks good to me.
Little side note : I tried testing in an environment with Python 3.12.9 and a single test fails at line 486 lT1.plot_all_lineages(), seems to be a known 3.13.0 bug but I didn't expect to see it in a 3.12 version.
In 3.13.2, all checks pass.
Also seems like it's windows specific error? |
|
few notes by the way, I moved the tests such they are in src/LineageTree/test |
Yeah, I've had a similar error when 3.13.0 came out, but I hope it won't be a problem for Windows users on 3.12.x versions? I'm not sure I remember testing this on older versions of LineageTree with 3.12 |
Adding unit testing via pytest.
That covers roughly 60% of the lineage tree code.
They are coverages that are as simple as possible, not on purpose but rather by kind of lazyness but with the goal of improving that little by little.
Finally, from now on, tests will be ran automatically after each push. That means: do not push borken things