Skip to content

Instantly share code, notes, and snippets.

@zkamvar
Last active August 30, 2024 19:01
Show Gist options
  • Save zkamvar/8760e6a2f9aa4860882b438c04b9c671 to your computer and use it in GitHub Desktop.
Save zkamvar/8760e6a2f9aa4860882b438c04b9c671 to your computer and use it in GitHub Desktop.
Updating installation instructions and release process for R packages

Last month, I opened a discussion to formalize R package release process guidelines and it has been approved by the core devs of the Hubverse development team. The most visible change is how you will install hubverse packages. You should no longer use remotes::install_github().

To install ALL hubverse packages, you can use:

install.packages("hubverse", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org"))

Timeline

This rollout is separated in two parts:

  1. (for everyone) switch to R Universe for package deployment (29 August 2024)
  2. (for hubverse developers) using main branch as development (19 September 2024)

Part 1: using the R Universe for package deployment

This was implemented in early August and you can find a dashboard of the package builds on https://hubverse-org.r-universe.dev/builds.

Part 1 Actions Required

  • If you have scripts that install hubverse packages, update them to use install.packages() instead of remotes::install_github().

Note

To install ALL of the hubverse packages at once, you can install the hubverse package, which contains all the other package as dependencies

  • hubverse
    • old: remotes::install_github("hubverse-org/hubverse")
    • new: install.packages("hubverse", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))

If your scripts install individual packages, you can use the list below as a guide for updating your scripts:

  • hubValidations
    • old: remotes::install_github("hubverse-org/hubValidations")
    • new: install.packages("hubValidations", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubExamples
    • old: remotes::install_github("hubverse-org/hubExamples")
    • new: install.packages("hubExamples", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubData
    • old: remotes::install_github("hubverse-org/hubData")
    • new: install.packages("hubData", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubEvals
    • old: remotes::install_github("hubverse-org/hubEvals")
    • new: install.packages("hubEvals", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubAdmin
    • old: remotes::install_github("hubverse-org/hubAdmin")
    • new: install.packages("hubAdmin", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubVis
    • old: remotes::install_github("hubverse-org/hubVis")
    • new: install.packages("hubVis", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubUtils
    • old: remotes::install_github("hubverse-org/hubUtils")
    • new: install.packages("hubUtils", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubCI
    • old: remotes::install_github("hubverse-org/hubCI")
    • new: install.packages("hubCI", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))
  • hubEnsembles
    • old: remotes::install_github("hubverse-org/hubEnsembles")
    • new: install.packages("hubEnsembles", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org")))

Part 1 Hub Administrators

  • Update your your GitHub workflows to use the latest release of hubverse-org/actions with the hubCI::use_hub_github_action() command
    # install.packages("hubCI", repos = c("https://hubverse-org.r-universe.dev", "https://cran.r-project.org"))
    hubCI::use_github_action("validate-hub")
    hubCI::use_github_action("validate-submission")
    hubCI::use_github_action("cache-hubval-deps")

Part 1 Hub Devs

  • Update README to use install.packages() from our r-universe
  • add Additional_repositories: https://hubverse-org.r-universe.dev to your DESCRIPTION

Part 2: Setting main branch as development

This part is for hubverse developers. The workflow will not change drastically other than using a development version number and a couple of extra steps to make a release, which is already done in our schemas and actions repositories. The rationale for this is that it is a common workflow for many software packages.

Switch will happen on: 19 September, 2024

Part 2 Actions Required

Zhian

Hubverse Devs

  • Review guidelines for developers (hubverse-org/hubDevs#11)
  • Update GitHub actions to use the r-universe by adding extra-repositories to setup-r:
      - uses: r-lib/actions/setup-r@v2
        with:
          install-r: false
          use-public-rspm: true
    +     extra-repositories: 'https://hubverse-org.r-universe.dev'
  • optional: collectively decide on day of the week best for releasing new versions.
  • optional: tell git about your ssh or gpg key

Hub Admins

  • nothing!

Hub Modellers

  • nothing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment