Skip to content

Commit

Permalink
prepare for jamovi 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalci committed Jun 1, 2023
1 parent acb9ced commit f37d32c
Show file tree
Hide file tree
Showing 28 changed files with 400 additions and 483 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# 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:
workflow_dispatch:
# push:
# branches:
# - main
# - master
# pull_request:
# branches:
# - main
# - master
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
shell: Rscript {0}
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
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
82 changes: 22 additions & 60 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# 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:
workflow_dispatch:
# push:
# branches:
# - main
# - master
# pull_request:
# branches:
# - main
# - master
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

Expand All @@ -23,65 +18,32 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

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

- 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-pandoc@v1

- name: Query dependencies
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")
shell: Rscript {0}

- name: Restore R package cache
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
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 system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
extra-packages: any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
62 changes: 31 additions & 31 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# 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]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

- name: Query dependencies
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")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
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-
extra-packages: any::pkgdown, local::.
needs: website

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
install.packages("pkgdown", type = "binary")
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
37 changes: 0 additions & 37 deletions .github/workflows/r.yml

This file was deleted.

1 change: 0 additions & 1 deletion ClinicoPathDescriptives.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageCleanBeforeInstall: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: ClinicoPathDescriptives
Title: Descriptives Functions for Clinicopathological Research
Version: 0.0.2.05
Date: 2022-09-20
Version: 0.0.2.06
Date: 2023-06-01
Authors@R:
person(given = "Serdar",
family = "Balci",
Expand Down Expand Up @@ -54,4 +54,4 @@ Remotes:
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
4 changes: 0 additions & 4 deletions R/agepyramid.b.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#' @title Age Pyramid
#'
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore
#'
Expand Down
3 changes: 2 additions & 1 deletion R/agepyramid.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ agepyramidBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Age Pyramid
Expand Down
3 changes: 2 additions & 1 deletion R/alluvial.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ alluvialBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Alluvial Diagrams
Expand Down
3 changes: 2 additions & 1 deletion R/benford.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ benfordBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Benford Analysis
Expand Down
2 changes: 0 additions & 2 deletions R/crosstable.b.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#' @title Cross Table
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore
#'
Expand Down
3 changes: 2 additions & 1 deletion R/crosstable.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ crosstableBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Cross Tables
Expand Down
3 changes: 2 additions & 1 deletion R/reportcat.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ reportcatBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Summary of Categorical Variables
Expand Down
2 changes: 0 additions & 2 deletions R/summarydata.b.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#' @title Summary of Continuous Variables
#'
#'
#' @return Text
#'
#' @importFrom R6 R6Class
Expand Down
3 changes: 2 additions & 1 deletion R/summarydata.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ summarydataBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Summary of Continuous Variables
Expand Down
3 changes: 2 additions & 1 deletion R/tableone.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ tableoneBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
revision = revision,
pause = NULL,
completeWhenFilled = FALSE,
requiresMissings = FALSE)
requiresMissings = FALSE,
weightsSupport = 'auto')
}))

#' Table One
Expand Down
Loading

0 comments on commit f37d32c

Please sign in to comment.