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

Convert FIMS to a pkgdown site #368

Closed
Andrea-Havron-NOAA opened this issue May 31, 2023 · 3 comments · Fixed by #437
Closed

Convert FIMS to a pkgdown site #368

Andrea-Havron-NOAA opened this issue May 31, 2023 · 3 comments · Fixed by #437
Labels
P1 high priority task
Milestone

Comments

@Andrea-Havron-NOAA
Copy link
Collaborator

The https://noaa-fims.github.io/ site is not built using pkgdown. Using pkgdown is preferred for the following reasons:

  • pkgdown is the recommended method for publishing R vignettes online
  • NOAA NMFS has a pkgdown template. Using this template would allow the FIMS website to match NOAA branding
@ChristineStawitz-NOAA ChristineStawitz-NOAA added this to the MQ milestone Jun 7, 2023
@Andrea-Havron-NOAA Andrea-Havron-NOAA moved this to Ready for Development in MQ Jul 12, 2023
@ChristineStawitz-NOAA ChristineStawitz-NOAA added the P1 high priority task label Jul 18, 2023
@timjmiller
Copy link
Contributor

Started to work on this but there are issues with the vignettes. I think a good approach would be to have the vignettes not do any heavy computation so that the build runs faster. In wham we have example scripts that mirror the Rmds and the example scripts are where users can run the commands. So the vignettes would be a lot of r chunks with eval=F and then stored objects with necessary results are loaded as needed (in r chunks with include = FALSE).

@Bai-Li-NOAA
Copy link
Contributor

Great! I will continue working on the issue by adding a GHA workflow to automatically update pkgdown website. I agree that we should convert some r chunks with eval = F if it takes long time to run the vignette.

@Andrea-Havron-NOAA Andrea-Havron-NOAA moved this from Ready for Development to In Progress in MQ Jul 31, 2023
@Bai-Li-NOAA
Copy link
Contributor

Bai-Li-NOAA commented Jul 31, 2023

I updated the pkgdown site through commits 1e5ab91 and 098a2b5:

  • added .github/workflows/call-update-pkgdown.yml to automatically update the pkgdown site when there is a change in main branch. We need help from @ChristineStawitz-NOAA to update GitHub settings and publish the website after merging those changes to main.
  • added home, reference, articles, and news sections in pkgdown/_pkgdown.yml following examples from tidyverse packages (e.g., ggplot2 and dplyr)
    • home section includes links to C++ doxygen documentation page and collaborative workflow book
    • reference section includes built-in dataset and functions for package development
    • articles section includes articles that describe FIMS design and demos for developers
    • new section includes information of releases

I am able to run pkgdown::build_site() locally to build the site in 28.32 secs.
@timjmiller, please feel free to update the website. I wonder if we should create a new issue to let the implementation team go over the R functions and update the names of some functions for topic matching. We can use starts_with("prefix") to select all functions with common prefix when creating a pkgdown website. Or we can add @keywords in roxygen documentation and then use has_keyword("x") in _pkgdown.yml file to select all topics with keyword "x" (see FIMS examples here and here).

@Bai-Li-NOAA Bai-Li-NOAA linked a pull request Aug 11, 2023 that will close this issue
1 task
@Andrea-Havron-NOAA Andrea-Havron-NOAA moved this from In Progress to Done in MQ Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high priority task
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants