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

Update Workflows #55

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
schedule:
- cron: "47 14 * * 1" # <=== Set to run at 14:47 on Mondays (avoiding 00:00 and top of the hour runs gives us a better chance for getting server time)

name: R-CMD-check

Expand All @@ -29,21 +32,35 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4
- id: checkout
uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
- name: Setup for Hotfix/Release Testing
id: release-setup
if: "${{ contains(github.event.pull_request.head.ref, '/hotfix/') || contains(github.event.pull_request.head.ref, '/release/') }}"
run: |
# remove the remote declarations from the DESCRIPTION so that we
# test the released version
sed -i -e '/ hubverse-org/d' DESCRIPTION
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own understanding: if there's a hotfix/release for this package (hubEvals), why do we need to remove the remote references for dependencies like hubUtils?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because these packages are in the Remotes: field, which will pull the development versions of the packages when standing up the infrastructure for testing (see https://r-pkgs.org/dependencies-in-practice.html#depending-on-the-development-version-of-a-package).

By removing these from the DESCRIPTION, we force the workflow to pull the released versions of the dependent packages.


- uses: r-lib/actions/setup-r@v2
- id: setup-pandoc
uses: r-lib/actions/setup-pandoc@v2

- id: setup-r
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: https://hubverse-org.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
- id: fetch-dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
- id: check
uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
3 changes: 2 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
extra-repositories: https://hubverse-org.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -39,7 +40,7 @@ jobs:
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
Expand Down
22 changes: 17 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ output: github_document

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r, include = FALSE}
```{r, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
Expand All @@ -13,22 +13,33 @@ knitr::opts_chunk$set(
)
```


# hubEvals <a href="https://hubverse-org.github.io/hubEvals/"><img src="man/figures/logo.svg" align="right" height="131" alt="hubEvals website" /></a>

<!-- badges: start -->

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/hubEvals)](https://CRAN.R-project.org/package=hubEvals)
[![R-CMD-check](https://github.com/hubverse-org/hubEvals/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubEvals/actions/workflows/R-CMD-check.yaml)

<!-- badges: end -->

The goal of hubEvals is to provide tools for evaluating infectious disease model outputs. This package is part of the [Hubverse](https://hubverse.org) project, which aims to provide a suite of tools for infectious disease modeling hubs.

## Installation

You can install the development version of hubEvals from [GitHub](https://github.com/) with:
### Latest

You can install the [latest version of hubEvals from the R-universe](https://hubverse-org.r-universe.dev/hubEvals):

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

``` r
### Development

If you want to test out new features that have not yet been released, you can install the development version of hubEvals from [GitHub](https://github.com/) with:

```r
# install.packages("remotes")
remotes::install_github("hubverse-org/hubEvals")
```
Expand All @@ -48,8 +59,9 @@ library(hubEvals)

Please note that the hubEvals package is released with a [Contributor Code of Conduct](.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.


## Contributing

Interested in contributing back to the open-source Hubverse project?
Learn more about how to [get involved in the Hubverse Community](https://hubverse.io/en/latest/overview/contribute.html) or [how to contribute to the hubEvals package](.github/CONTRIBUTING.md).


25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# hubEvals <a href="https://Infectious-Disease-Modeling-Hubs.github.io/hubEvals/"><img src="man/figures/logo.svg" align="right" height="131" alt="hubEvals website" /></a>
# hubEvals <a href="https://hubverse-org.github.io/hubEvals/"><img src="man/figures/logo.svg" align="right" height="131" alt="hubEvals website" /></a>

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN
status](https://www.r-pkg.org/badges/version/hubEvals)](https://CRAN.R-project.org/package=hubEvals)
[![R-CMD-check](https://github.com/Infectious-Disease-Modeling-Hubs/hubEvals/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Infectious-Disease-Modeling-Hubs/hubEvals/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/hubverse-org/hubEvals/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hubverse-org/hubEvals/actions/workflows/R-CMD-check.yaml)

<!-- badges: end -->

The goal of hubEvals is to provide tools for evaluating infectious
Expand All @@ -19,12 +20,24 @@ of tools for infectious disease modeling hubs.

## Installation

You can install the development version of hubEvals from
### Latest

You can install the [latest version of hubEvals from the
R-universe](https://hubverse-org.r-universe.dev/hubEvals):

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

### Development

If you want to test out new features that have not yet been released,
you can install the development version of hubEvals from
[GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("Infectious-Disease-Modeling-Hubs/hubEvals")
remotes::install_github("hubverse-org/hubEvals")
```

## Example
Expand All @@ -48,5 +61,5 @@ project, you agree to abide by its terms.

Interested in contributing back to the open-source Hubverse project?
Learn more about how to [get involved in the Hubverse
Community](https://hubverse.io/en/latest/overview/contribute.html)
or [how to contribute to the hubEvals package](.github/CONTRIBUTING.md).
Community](https://hubverse.io/en/latest/overview/contribute.html) or
[how to contribute to the hubEvals package](.github/CONTRIBUTING.md).
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
url: https://infectious-disease-modeling-hubs.github.io/hubEvals/
template:
package: hubStyle
development:
mode: auto

Loading