Skip to content
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

Rebuild package homepage #12

Closed
rogerssam opened this issue Jan 29, 2024 · 8 comments
Closed

Rebuild package homepage #12

rogerssam opened this issue Jan 29, 2024 · 8 comments

Comments

@rogerssam
Copy link

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

@kwstat
Copy link
Owner

kwstat commented Jan 31, 2024

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
Copy link
Owner

kwstat commented Jan 31, 2024

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.

@rogerssam
Copy link
Author

rogerssam commented Jan 31, 2024

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?

@kwstat
Copy link
Owner

kwstat commented Jan 31, 2024

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{}

@rogerssam
Copy link
Author

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

@kwstat
Copy link
Owner

kwstat commented Jan 31, 2024 via email

@rogerssam
Copy link
Author

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.

@kwstat
Copy link
Owner

kwstat commented Jul 1, 2024

Thank you!

@kwstat kwstat closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants