stemangiola / tidyseurat

Seurat meets tidyverse. The best of both worlds.
https://stemangiola.github.io/tidyseurat/
156 stars 12 forks source link

Increase unit test coverage #67

Closed william-hutchison closed 1 year ago

william-hutchison commented 1 year ago

I created additional unit tests for the dplyr, tidyr and pillar adapters, and the get_abundance utilities.

This brings tidyseurat test coverage to 78.64%, as calculated by dev_tools::test_coverage(). This still seems a bit low, but the remaining untested code does not seem amenable to testing. For example, plotting functions.

stemangiola commented 1 year ago

great @william-hutchison . take also example (you could even copy as is) the pull request to tidySingleCell3xperiment for the unit test improvement.

william-hutchison commented 1 year ago

Great, the new unit tests in tidySingleCellExperiment will be very helpful. I will work on adding more tests, removing hard coded numbers and swapping out the magrittr pipe.

william-hutchison commented 1 year ago

I added more tests, bringing coverage up to 88.12%. I also made some superficial changes to the style and replaced the magrittr pipe with the base pipe.

Replacing all hard coded numbers will be a reasonably large task, which I am happy to do, but might not be the top priority right now.

william-hutchison commented 1 year ago

Actually, maybe I will go ahead and start replacing hard coded numbers. It would be nice to tick the task off the open challenges list. Sorry for requesting a review too early!

william-hutchison commented 1 year ago

I have removed hard coded numbers from the tidyseurat unit tests. Combined, I think the changes within this pull request bring testing across tidyseurat to a reasonable level.

stemangiola commented 1 year ago

I have removed hard coded numbers from the tidyseurat unit tests. Combined, I think the changes within this pull request bring testing across tidyseurat to a reasonable level.

Well done!