whocov / trend_analysis_public

Public version of the trend analysis infrastructure
https://asmodee-infrastructure-handbook.netlify.app/
Other
2 stars 3 forks source link

Github actions fails to install/run `phifunc` functions #43

Open henryls1 opened 2 years ago

henryls1 commented 2 years ago

Github actions have failed for a week due to some issues specific to actions themselves - this seems to be related to the phifunc package (clean_all_data() is a function within phifunc). If this is removed it says that there is a failure load unrecognised package phifunc - could this be related to the install process in the remotes script?

henryls1 commented 2 years ago

tagging @TimTaylor in this in case you would have any ideas!

TimTaylor commented 2 years ago

@henryls1 - Will probably need @thibautjombart to dig in to (I think he will be back online tomorrow). Unfortunately I lack the required permissions. Having said that, my guess would be the PHIFUNC token is not being picked up so the installation of that package is silently failing. It may need regenerating, although I'd not be sure why. You could try adding a check at line 31 here: https://github.com/whocov/trend_analysis_public/blob/main/scripts/remote_packages.R#L31

if (!require(phifunc)) stop("phifunc not installed")

This would make the failure non-silent so at least you'd have some form of confirmation.

henryls1 commented 2 years ago

Nice, i was thinking similar - I'll give that a go!

henryls1 commented 2 years ago

After further investigation it seems like the issue is in the installation of phifunc - it now seems to fail. I can't replicate this locally (again), and the only error i have to go off is this one:

Error: Error: package or namespace load failed for ‘phifunc’: unable to load R code in package ‘phifunc’ Error: Error: loading failed

See here

TimTaylor commented 2 years ago

That helps a bit - so it is able to access the phifunc package but it fails when trying to install. Has that package been updated recently? Does it pass R CMD check?

henryls1 commented 2 years ago

I'm actually the primary author - what surprises me is that the failures aren't aligning with a specific update (they work for a bit). It's currently passng the CMD check yes!

henryls1 commented 2 years ago

Problem seems to be resolved here - we also encountered a problem with incidence2 that you might want to be aware of @TimTaylor - I have commented out lines 38-386 which were returning an error - i could get around it by removing this function. Please let me know if you'd like an rmd file to test the issue!

TimTaylor commented 2 years ago

Cheers @henryls1 . Can you post a reprex on the incidence2 issues and I'll look in to it