Skip to content
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
41 changes: 32 additions & 9 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,51 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

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

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

- 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

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

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
72 changes: 43 additions & 29 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Query dependencies
- name: Test coverage
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
- uses: codecov/codecov-action@v5
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: fcci
Type: Package
Title: Feldman-Cousins Confidence Intervals
Version: 1.0.1
Version: 1.0.2
Authors@R:
person(given = "Valerio",
family = "Gherardi",
Expand All @@ -14,12 +14,11 @@ Description:
[G. J. Feldman and R. D. Cousins (1998) <doi:10.1103/PhysRevD.57.3873>].
License: GPL (>= 3)
Encoding: UTF-8
RoxygenNote: 7.1.1
RoxygenNote: 7.3.3
LinkingTo:
Rcpp
Imports:
Rcpp, assertthat, rlang
SystemRequirements: C++11
URL: https://github.com/vgherard/fcci,
https://vgherard.github.io/fcci/
BugReports: https://github.com/vgherard/fcci/issues
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# fcci 1.0.2

* Removed C++11 specification in dependencies: the default C++17 suffices.


# fcci 1.0.1

* Set correct tolerance in algorithm tests.
Expand Down
5 changes: 2 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/vgherard/fcci/workflows/R-CMD-check/badge.svg)](https://github.com/vgherard/fcci/actions)
[![Codecov test coverage](https://codecov.io/gh/vgherard/fcci/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vgherard/fcci?branch=master)
[![R-CMD-check](https://github.com/vgherard/fcci/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/vgherard/fcci/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/vgherard/fcci/graph/badge.svg)](https://app.codecov.io/gh/vgherard/fcci)
[![CRAN status](https://www.r-pkg.org/badges/version/fcci)](https://CRAN.R-project.org/package=fcci)
[![R-universe status](https://vgherard.r-universe.dev/badges/fcci)](https://vgherard.r-universe.dev/)
[![Website](https://img.shields.io/badge/Website-here-blue)](https://vgherard.github.io/fcci/)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text={fcci}: Feldman-Cousins Confidence Intervals in R&url=https://vgherard.github.io/r2r&via=ValerioGherardi&hashtags=rstats,statistics,physics,confidenceintervals)
<!-- badges: end -->

`fcci` is an R package providing support for building [Feldman-Cousins](https://doi.org/10.1103/PhysRevD.57.3873) confidence
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/vgherard/fcci/workflows/R-CMD-check/badge.svg)](https://github.com/vgherard/fcci/actions)
[![R-CMD-check](https://github.com/vgherard/fcci/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/vgherard/fcci/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/vgherard/fcci/branch/master/graph/badge.svg)](https://app.codecov.io/gh/vgherard/fcci?branch=master)
coverage](https://codecov.io/gh/vgherard/fcci/graph/badge.svg)](https://app.codecov.io/gh/vgherard/fcci)
[![CRAN
status](https://www.r-pkg.org/badges/version/fcci)](https://CRAN.R-project.org/package=fcci)
[![R-universe
status](https://vgherard.r-universe.dev/badges/fcci)](https://vgherard.r-universe.dev/)
[![Website](https://img.shields.io/badge/Website-here-blue)](https://vgherard.github.io/fcci/)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=%7Bfcci%7D:%20Feldman-Cousins%20Confidence%20Intervals%20in%20R&url=https://vgherard.github.io/r2r&via=ValerioGherardi&hashtags=rstats,statistics,physics,confidenceintervals)
<!-- badges: end -->

`fcci` is an R package providing support for building
Expand Down Expand Up @@ -79,8 +78,8 @@ confint_pois(n = 10, b = 2, cl = 0.95)
#> [1] 0.95
```

Let us compare the 68% C.L. intervals for *n* = 0 events and no
background obtained from `fcci` and from `stats::poisson.test()`
Let us compare the 68% C.L. intervals for $n=0$ events and no background
obtained from `fcci` and from `stats::poisson.test()`

``` r
confint_pois(n = 0, cl = 0.68)
Expand Down
18 changes: 10 additions & 8 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# fcci v1.0.1
## v1.0.2

This is a minor patch release fixing a test causing R CMD CHECK failure.
This is patch release with the only purpose of removing the C++11 specification
from package requirements (no longer needed as the current default is C++17).

## R CMD check results

0 errors | 0 warnings | 1 note

```
* New maintainer:
Valerio Gherardi <vgherard840@gmail.com>
```

The maintainer has changed email address.
* checking DESCRIPTION meta-information ... NOTE
Author field differs from that derived from Authors@R
Author: 'Valerio Gherardi [aut, cre] (ORCID: <https://orcid.org/0000-0002-8215-3013>)'
Authors@R: 'Valerio Gherardi [aut, cre] (<https://orcid.org/0000-0002-8215-3013>)'

I wasn't able to identify the source of this issue, as I don't have separate
Author and Authors@R fields. However, the issue looks innocuous.
6 changes: 3 additions & 3 deletions man/fcci-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.