phuse-org / valtools

Validation framework for R packages used in clinical research and drug development.
https://phuse-org.github.io/valtools/
Other
51 stars 10 forks source link

Add hex and cheat sheet flow #180

Closed thebioengineer closed 3 years ago

thebioengineer commented 3 years ago
elimillera commented 3 years ago

@thebioengineer This might be a problem with just me but when I run pkgdown::build_site the cheatsheet isn't being rendered. My first guess is pkgdown doesn't know it needs it because it looks for stuff in a readme.rmd instead of the readme.md that we have but before I go too deep in that I just wanted to make sure this wasn't just an issue with my system.

Does the cheatsheet display for you in the pkgdown?

thebioengineer commented 3 years ago

Interesting. If I had to guess, that is because the path to the hex is not correctly being rendered in the local pkgdown build. If you look in the readme, the path is to the cheat sheet png is inst/cheatsheets/valtools-chearsheet.png - which I expect to get updated and resolved by github. The local builds don't do that. Not sure how we can preview a full github pages preview though.

elimillera commented 3 years ago

@thebioengineer So this is a little tricky apparently. Things in 'man/figures' get put in the pkgdown build. However, for the regular readme it uses the root directory and the pkgdown uses the docs folder. Things in the pkgdown use references/figures and the readme uses man/figures. So links break between the readme and the pkgdown. We can still definitely display a picture, but I think we can actually link the picture to an external source. Something like this:

<a href="https://phuse-org.github.io/valtools/reference/figures/valtools-cheatsheet.pdf">
<img src="man/figures/valtools-cheatsheet.png" 
     alt="Cheatsheet on how to use the {valtools} R Package - functions & validation types" 
     style="width:50%;height:auto"/>
</a>

That way it works in both the pkgdown and the readme.

thebioengineer commented 3 years ago

I did a quick test - for images it updates the path from man/figures/ to references/figures, so we should be okay to use that paradigm - I don't intend for these cheat sheets to be included in the builds (update .Rbuildignore to ignore paths of the cheatsheets folder within the package)

thebioengineer commented 3 years ago

R4.1.1 was released this morning per Peter Dalgaard - failures on windows "release" expected due to CRAN updates

thebioengineer commented 3 years ago

@mariev - I don't anticipate any changes with 4.1.1 - that comment was that there was a failure in one of the actions due to failing to install pak, which I figured was due to changing "release" to 4.1.1 but not all CRAN builds were updated.

thebioengineer commented 3 years ago

Chatted with @elimillera this morning too, merging into dev.