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

adding build in github actions #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
^\.Rproj\.user$
^.travis.yml$
^\.travis\.yml$
.gitignore
.travis.yml
.Rproj.user
.git
.github
49 changes: 49 additions & 0 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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

jobs:
R-CMD-check:
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@v3

- 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@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
9 changes: 4 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Package: pesel
Type: Package
Title: Automatic Estimation of Number of Principal Components in PCA
Version: 0.7.4
Date: 2021-06-13
Version: 0.7.5
Date: 2023-08-14
Author: Piotr Sobczyk, Julie Josse, Malgorzata Bogdan
Maintainer: Piotr Sobczyk <[email protected]>
Description: Automatic estimation of number of principal components in PCA
with PEnalized SEmi-integrated Likelihood (PESEL). See Piotr Sobczyk, Malgorzata Bogdan, Julie Josse
'Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood'
"Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood"
(2017) <doi:10.1080/10618600.2017.1340302>.
License: GPL-3
Encoding: UTF-8
Expand All @@ -18,5 +18,4 @@ Depends:
Imports:
stats,
graphics
LazyData: TRUE
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export(pesel_homogeneous)
importFrom(graphics,plot)
importFrom(graphics,points)
importFrom(stats,cov)
importFrom(utils,head)
2 changes: 2 additions & 0 deletions R/pesel.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pesel <- function(X, npc.min = 0, npc.max = 10, prior = NULL, scale = TRUE,
#' @param posterior a boolean, if TRUE (default value) then posterior probablities are plotted
#' otherwise values of PeSeL criterion are plotted
#' @param ... Further arguments to be passed to or from other methods. They are ignored in this function.
#' @return No return value, called for side effects
#' @export
#' @keywords internal
plot.pesel.result <- function(x, posterior = TRUE, ...){
Expand All @@ -158,6 +159,7 @@ pesel <- function(X, npc.min = 0, npc.max = 10, prior = NULL, scale = TRUE,
#'
#' @param x pesel.result class object
#' @param ... Further arguments to be passed to or from other methods. They are ignored in this function.
#' @return No return value, called for side effects
#' @export
#' @keywords internal
print.pesel.result <- function(x,...){
Expand Down
5 changes: 3 additions & 2 deletions R/pesel_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
#' @description Automatic estimation of number of principal components in PCA
#' with PEnalized SEmi-integrated Likelihood (PESEL).
#'
#' @details Version: 0.7.4
#' @details Version: 0.7.5
#' @docType package
#' @name pesel-package
#' @importFrom stats cov
#' @importFrom graphics plot points
#' @importFrom utils head
#' @author{ Piotr Sobczyk,
#' Julie Josse,
#' Malgorzata Bogdan
#'
#' Maintainer: Piotr Sobczyk \email{pj.sobczyk@@gmail.com}
#' }
#' @references Piotr Sobczyk, Malgorzata Bogdan, Julie Josse
#' \emph{Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood},
#' "Bayesian dimensionality reduction with PCA using penalized semi-integrated likelihood",
#' Journal of Computational and Graphical Statistics 2017
#'
#' @examples
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/pesel)](http://cran.r-project.org/package=pesel)
[![Downloads](http://cranlogs.r-pkg.org/badges/pesel)](http://cran.rstudio.com/package=pesel)
[![Build Status](https://api.travis-ci.org/psobczyk/pesel.png)](https://travis-ci.org/psobczyk/pesel)

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/pesel)](https://cran.r-project.org/web/packages/pesel/index.html)
[![Downloads](http://cranlogs.r-pkg.org/badges/pesel)](http://cran.rstudio.com/package=pesel)
[![R build status](https://github.com/psobczyk/pesel/workflows/R-CMD-check/badge.svg)](https://github.com/psobczyk/pesel/actions?query=workflow%3AR-CMD-check)
[<img src="http://www.ideal.rwth-aachen.de/wp-content/uploads/2013/08/banner1.png">](http://www.ideal.rwth-aachen.de/)

-------------
Expand Down
4 changes: 2 additions & 2 deletions man/pesel-package.Rd

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

3 changes: 3 additions & 0 deletions man/plot.pesel.result.Rd

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

3 changes: 3 additions & 0 deletions man/print.pesel.result.Rd

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

1 change: 1 addition & 0 deletions pesel.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace,vignette