Arcadia-Science / sourmashconsumr

Working with the outputs of sourmash in R
https://arcadia-science.github.io/sourmashconsumr/
Other
21 stars 3 forks source link

Add CI workflows for standard checks, linting, and test coverage #24

Closed taylorreiter closed 1 year ago

taylorreiter commented 1 year ago

Following https://github.com/r-lib/actions/tree/v2-branch/examples#example-workflows Set up using:

usethis::use_github_action("check-standard")
usethis::use_github_action("test-coverage")

there were LOTS of problems that I didn't know about. First of all, I've been using test() locally to make sure my tests pass before I push something to github. I should have been running check() which runs the tests and lots of other things to look for problems in the code. Some problems that check() found were:

I also switched the majority of examples to not run. eventually I want to add a bunch of data to the package to demonstrate the examples, but I need to learn best practices for that first, so that will be a separate PR.

taylorreiter commented 1 year ago

~I removed lint and test-coverage because they fail with x Failed to build source package 'XML'. I tried adding any::XML but that didn't fix the issue. I'll revisit that after I get the other tests passing.~ See below, I got it working. I re-added tests but left out linting. I'll add linting and fixes in a separate PR later.

https://github.com/r-lib/actions/issues/559

taylorreiter commented 1 year ago

macOS, windows, and ubuntu-lastest (oldrel-1) are all passing, but ubuntu-latest (devel) and (release) both fail with the xml error. Things I'm trying:

taylorreiter commented 1 year ago
sourmashconsumr Coverage: 77.97%
R/plot_compare.R: 68.97%
R/metacoder.R: 73.53%
R/plot_signatures.R: 82.28%
R/read_sourmash_outputs.R: 82.35%