agridat icon indicating copy to clipboard operation
agridat copied to clipboard

Rebuild package homepage

Open rogerssam opened this issue 1 year ago • 7 comments

Hi Kevin, thank you very much for your work on this package! I often use or recommend the examples provided in the package.

The package homepage seems to be outdated, which is leading to the "data sources" vignette not being rendered properly. See screenshot attached: image

I've just checked the latest version, and it seems to be working fine, so you've obviously fixed the issue in the meantime, but the homepage is still on version 1.19 rather than 1.22.

I can submit a pull request for auto-building the pkgdown site via GitHub actions if that's helpful?

Thanks, Sam

rogerssam avatar Jan 29 '24 23:01 rogerssam

Thanks for you comments.

I have not used GitHub Actions, so I may need help with setting it up, so a pull request would be nice.

ZScaler security software is now blocking "realfavicongenerator.net" and so I can no longer build locally on my laptop. :-(

kwstat avatar Jan 31 '24 02:01 kwstat

Except, now that I think about it, there's probably 20+ examples that use asreml, which is commercial software. Might be some other non-CRAN packages too. I wrap most of the examples in \dontrun{} because there are far too many datasets to test every time. Then I use pkgdown::build_site(lazy=TRUE, run=TRUE) to force running of those examples. I will probably have to add an if(FALSE) {} around the parts that can't be checked by GitHub Actions. Is there a flag I can check if GitHub Actions is running the code? If there is, then I will still be able to test ALL examples locally.

kwstat avatar Jan 31 '24 02:01 kwstat

Ah yes, I use asreml as well, and understand the pain using it for this sort of thing!

Is there a flag I can check if GitHub Actions is running the code? If there is, then I will still be able to test ALL examples locally.

What do you mean by a flag you can check? Something that will provide a TRUE value when running on GitHub actions? I think checking an Environment variable would be the way to go. GHA sets some default environment variables. Probably Sys.getenv("GITHUB_ACTIONS") is what you want from the look of that list.

I'll work on a PR for building the pkgdown site via GHA and then we can see what needs fixing up in terms of examples that won't run etc.

Alternatively, I can just run the pkgdown build on my machine and submit a PR for that if that's easier?

rogerssam avatar Jan 31 '24 04:01 rogerssam

I think a better check that is not specific to GitHub is this:

 if( require("asreml", quietly=TRUE) ) { 
   # fit models, etc
}

This should enable anyone to download the package repo and check it with

devtools::run_examples(run_dontrun=TRUE) # DO run dontrun{}

kwstat avatar Jan 31 '24 16:01 kwstat

Sounds like a sensible approach to me. I'll work on a PR to that effect for you to review.

rogerssam avatar Jan 31 '24 22:01 rogerssam

I'm working on the changes to asreml. You can work on GitHub Actions.

On Wed, Jan 31, 2024 at 4:44 PM Sam Rogers @.***> wrote:

Sounds like a sensible approach to me. I'll work on a PR to that effect for you to review.

— Reply to this email directly, view it on GitHub https://github.com/kwstat/agridat/issues/12#issuecomment-1920111240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADWHJBLK4UMBDMWPRU377DYRLCLBAVCNFSM6AAAAABCQIQUASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRQGEYTCMRUGA . You are receiving this because you commented.Message ID: @.***>

-- Kevin Wright

kwstat avatar Jan 31 '24 22:01 kwstat

Sorry, just to update, I have had some trouble getting GitHub Actions to build the site properly. Working fine locally, but not on GHA. Still trying to work out why that is. Will try and get it sorted this week.

rogerssam avatar Feb 18 '24 23:02 rogerssam

Thank you!

kwstat avatar Jul 01 '24 21:07 kwstat