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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
^CODE_OF_CONDUCT\.md$
^\.github$
^codecov\.yml$
^README\.Rmd$
3 changes: 3 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -19,8 +20,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -39,7 +42,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

jobs:
document:
Expand All @@ -13,8 +15,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down Expand Up @@ -50,8 +54,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

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

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,36 +16,47 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

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

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

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# 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: |
## --------------------------------------------------------------------
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
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.Rproj.user
.DS_Store
inst/doc
docs
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version: 0.0.1.1
Authors@R: c(
person("Marly", "Gotti", , "marlygotti@gmail.com", role = c("aut", "cre")),
person("Max", "Kuhn", , "max@posit.co", role = "aut"),
person(given = "Posit Software, PBC", role = c("cph", "fnd"))
person("Posit Software, PBC", role = c("cph", "fnd"))
)
Description: A modeling package compiling applicability domain methods in
R. It combines different methods to measure the amount of
Expand All @@ -17,15 +17,15 @@ URL: https://github.com/tidymodels/applicable,
BugReports: https://github.com/tidymodels/applicable/issues
Depends:
ggplot2,
R (>= 3.4)
R (>= 3.6)
Imports:
dplyr,
glue,
hardhat (>= 0.1.2),
hardhat (>= 1.3.0),
Matrix,
proxyC,
purrr,
rlang,
rlang (>= 1.1.1),
stats,
tibble,
tidyr,
Expand All @@ -35,17 +35,17 @@ Suggests:
covr,
knitr,
modeldata,
recipes (>= 0.1.7),
recipes (>= 1.0.8),
rmarkdown,
spelling,
testthat (>= 3.0.0),
testthat (>= 3.2.0),
xml2
VignetteBuilder:
knitr
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Config/Needs/website: tidyverse/tidytemplate
Config/testthat/edition: 3
4 changes: 1 addition & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export(autoplot.apd_pca)
export(autoplot.apd_similarity)
export(score)
export(score.default)
import(rlang)
importFrom(Matrix,Matrix)
importFrom(Matrix,colSums)
importFrom(dplyr,"%>%")
Expand Down Expand Up @@ -59,9 +60,6 @@ importFrom(hardhat,validate_prediction_size)
importFrom(proxyC,simil)
importFrom(purrr,map2_dfc)
importFrom(purrr,map_dfc)
importFrom(rlang,abort)
importFrom(rlang,arg_match)
importFrom(rlang,enquos)
importFrom(stats,approx)
importFrom(stats,ecdf)
importFrom(stats,prcomp)
Expand Down
47 changes: 0 additions & 47 deletions R/0.R

This file was deleted.

46 changes: 44 additions & 2 deletions R/applicable-package.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
#' @keywords internal
"_PACKAGE"

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start

#' @import rlang
#' @importFrom dplyr %>%
#' @importFrom dplyr count
#' @importFrom dplyr group_by
#' @importFrom dplyr matches
#' @importFrom dplyr mutate
#' @importFrom dplyr mutate_all
#' @importFrom dplyr rename_all
#' @importFrom dplyr sample_n
#' @importFrom dplyr select
#' @importFrom dplyr slice
#' @importFrom dplyr starts_with
#' @importFrom dplyr ungroup
#' @importFrom ggplot2 ggplot geom_step xlab ylab aes autoplot
#' @importFrom glue glue
#' @importFrom hardhat forge
#' @importFrom hardhat mold
#' @importFrom hardhat new_model
#' @importFrom hardhat validate_prediction_size
#' @importFrom Matrix Matrix colSums
#' @importFrom proxyC simil
#' @importFrom purrr map_dfc
#' @importFrom purrr map2_dfc
#' @importFrom stats approx
#' @importFrom stats ecdf
#' @importFrom stats prcomp
#' @importFrom stats predict
#' @importFrom stats quantile
#' @importFrom stats setNames
#' @importFrom tibble as_tibble
#' @importFrom tibble tibble
#' @importFrom tidyr gather
#' @importFrom tidyselect vars_select
#' @importFrom utils globalVariables
## usethis namespace: end

# ------------------------------------------------------------------------------
# global variable" check
# nocov
# nocov end
# Reduce false positives when R CMD check runs its "no visible binding for
utils::globalVariables(
c("cumulative", "n", "sim", "percentile", "component", "value")
)
NULL
4 changes: 2 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ NULL
#' @return \item{okc_binary_train,okc_binary_test}{data frame frames with 61 columns}
#'
#' @source
#' Kim (2015), "OkCupid Data for Introductory Statistics and Data Science Courses", _Journal of Statistics Education_, Volume 23, Number 2. \url{https://www.tandfonline.com/doi/abs/10.1080/10691898.2015.11889737}
#' Kim (2015), "OkCupid Data for Introductory Statistics and Data Science Courses", _Journal of Statistics Education_, Volume 23, Number 2. \doi{10.1080/10691898.2015.11889737}
#'
#' Kuhn and Johnson (2020), _Feature Engineering and Selection_, Chapman and Hall/CRC . \url{https://bookdown.org/max/FES/} and \url{https://github.com/topepo/FES}
#'
Expand Down Expand Up @@ -60,7 +60,7 @@ NULL
#' Data as an End of Semester Regression Project," \emph{Journal of Statistics
#' Education}, Volume 19, Number 3.
#'
#' \url{https://www.cityofames.org/government/departments-divisions-a-h/city-assessor}
#' `https://www.cityofames.org/government/departments-divisions-a-h/city-assessor`
#'
#' \url{http://jse.amstat.org/v19n3/decock/DataDocumentation.txt}
#'
Expand Down
2 changes: 1 addition & 1 deletion R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ print.apd_hat_values <- function(x, ...) {
#' tr_x <- matrix(
#' sample(0:1, size = 20 * 50, prob = rep(.5, 2), replace = TRUE),
#' ncol = 20
#' )
#' )
#' model <- apd_similarity(tr_x)
#' print(model)
#' @export
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ knitr::opts_chunk$set(
)

options(rlang__backtrace_on_error = "reminder")

```

# applicable <img src="man/figures/logo.png" align="right"/>

<!-- badges: start -->
[![R-CMD-check](https://github.com/tidymodels/applicable/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/applicable/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/tidymodels/applicable/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/applicable?branch=main)
[![Codecov test coverage](https://codecov.io/gh/tidymodels/applicable/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/applicable)
[![Lifecycle:experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![CRAN status](https://www.r-pkg.org/badges/version/applicable)](https://cran.r-project.org/package=applicable)

<!-- badges: end -->

## Introduction
Expand Down Expand Up @@ -58,7 +58,7 @@ To learn about how to use applicable, check out the vignettes:

This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).
- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on Posit Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).

- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/applicable/issues).

Expand Down
Loading
Loading