-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary coverage fix for #31 #32
Conversation
The only thing I can think of is that the files in R/ are sourced in alphabetical order. But no idea why sourcing that function later would fix anything! |
I suppose you could check if putting it zzzz.R also "fixes" things to test that hypothesis. |
Ok, did a little testing and I feel like this has to be a bug in |
|
||
geotargets_repair_option_name <- function(option_name) { | ||
if (!startsWith(option_name, "geotargets.")) { | ||
option_name <- paste0("geotargets.", option_name) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be reverted
geotargets_repair_option_name <- function(option_name) { | ||
if (!startsWith(option_name, "geotargets.")) { | ||
option_name <- paste0("geotargets.", option_name) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could just be:
geotargets_repair_option_name <- function(option_name) { | |
if (!startsWith(option_name, "geotargets.")) { | |
option_name <- paste0("geotargets.", option_name) | |
} | |
} | |
#howdy |
And this "fix" still works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I noticed that too, it is just the presence of utils.R that makes the difference--I figured if I was gonna leave the file I should copy one of the "utility" functions into it.
I suspect you are right, and I think the other issue with the evaluation environment is also likely a bug |
Some strange {covr} bugs here! Thanks for taking the time to look into this strangeness! |
So I don't quite understand this - it was passing all checks here? Then I merged it and it broke? What in the world is happening. |
The new error is a different one actually... it also is occurring on #33
This indicates that the "shz" special handling from #21 is writing a regular shapefile or something similar From https://github.com/njtierney/geotargets/actions/runs/8305390948/job/22732222126
|
This seems to get our codecov action working again, for #31, but I am not satisfied with this as a general solution. I do not understand at this time why it would matter if there was code in utils.R or not.
There seems to be some pretty odd stuff that can happen when target tests are being run inside testthat via covr.