Skip to content

Commit

Permalink
added github actions (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
talegari authored May 30, 2024
1 parent 7bae457 commit 076f74b
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 4 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
^\.Rproj\.user$
docs
^README\.Rmd$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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

permissions: read-all

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@v4

- 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
build_args: 'c("--no-manual","--no-build-vignettes","--ignore-vignettes")'
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tidyrules
Type: Package
Title: Obtain Rules from Rule Based Models as Tidy Dataframe
Version: 0.2.2
Version: 0.2.3
Authors@R: c(
person("Srikanth", "Komala Sheshachala", email = "sri.teach@gmail.com", role = c("aut", "cre")),
person("Amith Kumar", "Ullur Raghavendra", email = "amith54@gmail.com", role = c("aut"))
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ S3method(tidy,cubist)
S3method(tidy,rpart)
export(convert_rule_flavor)
export(tidy)
export(varSpec)
importFrom(data.table,":=")
importFrom(generics,tidy)
importFrom(magrittr,"%>%")
Expand Down
3 changes: 2 additions & 1 deletion R/varSpec.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
#' @return A tidytable with three columns: variable(character), type(character)
#' and levels(a list-column). For numeric variables, levels are set to NA.
#' @examples
#' \dontrun{
#' data("attrition", package = "modeldata")
#' cols_att = setdiff(colnames(attrition), c("MonthlyIncome", "Attrition"))
#'
#' cb_att = Cubist::cubist(x = attrition[, cols_att],
#' y = attrition[["MonthlyIncome"]]
#' )
#' varSpec(cb_att)
#' @export
#' }
varSpec = function(object){

# 1. split ny newline
Expand Down
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ knitr::opts_chunk$set(
<!-- badges: start -->
[![Build Status](https://travis-ci.org/talegari/tidyrules.svg?branch=master)](https://travis-ci.org/talegari/tidyrules)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tidyrules)](https://cran.r-project.org/package=tidyrules)
[![R-CMD-check](https://github.com/talegari/tidyrules/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/talegari/tidyrules/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

`tidyrules` converts textual rules from models to dataframes with parseable rules. Supported models are: `C5`, `cubist` and `rpart`.
Expand Down Expand Up @@ -51,4 +52,4 @@ And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("talegari/tidyrules")
```
```
2 changes: 2 additions & 0 deletions man/varSpec.Rd

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

0 comments on commit 076f74b

Please sign in to comment.