Skip to content

Commit f26383c

Browse files
committed
Move to "main". Closes #35.
1 parent 63009c5 commit f26383c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+111
-11020
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 28 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
#
4+
# NOTE: This workflow is overkill for most R packages and
5+
# check-standard.yaml is likely a better choice.
6+
# usethis::use_github_action("check-standard") will install it.
17
on:
28
push:
3-
branches:
4-
- master
9+
branches: [main, master]
510
pull_request:
6-
branches:
7-
- master
11+
branches: [main, master]
812

913
name: R-CMD-check
1014

@@ -18,71 +22,39 @@ jobs:
1822
fail-fast: false
1923
matrix:
2024
config:
21-
- {os: macOS-latest, r: 'devel'}
2225
- {os: macOS-latest, r: 'release'}
26+
2327
- {os: windows-latest, r: 'release'}
24-
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
25-
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27-
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28-
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28+
# Use 3.6 to trigger usage of RTools35
29+
- {os: windows-latest, r: '3.6'}
30+
31+
# Use older ubuntu to maximise backward compatibility
32+
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}
33+
- {os: ubuntu-18.04, r: 'release'}
34+
- {os: ubuntu-18.04, r: 'oldrel-1'}
35+
- {os: ubuntu-18.04, r: 'oldrel-2'}
36+
- {os: ubuntu-18.04, r: 'oldrel-3'}
2937

3038
env:
31-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32-
RSPM: ${{ matrix.config.rspm }}
3339
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
40+
R_KEEP_PKG_SOURCE: yes
3441

3542
steps:
3643
- uses: actions/checkout@v2
3744

38-
- uses: r-lib/actions/setup-r@master
45+
- uses: r-lib/actions/setup-pandoc@v1
46+
47+
- uses: r-lib/actions/setup-r@v1
3948
with:
4049
r-version: ${{ matrix.config.r }}
50+
http-user-agent: ${{ matrix.config.http-user-agent }}
51+
use-public-rspm: true
4152

42-
- uses: r-lib/actions/setup-pandoc@master
43-
44-
- name: Query dependencies
45-
run: |
46-
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49-
shell: Rscript {0}
50-
51-
- name: Cache R packages
52-
if: runner.os != 'Windows'
53-
uses: actions/cache@v1
53+
- uses: r-lib/actions/setup-r-dependencies@v1
5454
with:
55-
path: ${{ env.R_LIBS_USER }}
56-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
58-
59-
- name: Install system dependencies
60-
if: runner.os == 'Linux'
61-
env:
62-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
63-
run: |
64-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
65-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
66-
sudo -s eval "$sysreqs"
67-
68-
- name: Install dependencies
69-
run: |
70-
remotes::install_deps(dependencies = TRUE)
71-
remotes::install_cran("rcmdcheck")
72-
shell: Rscript {0}
73-
74-
- name: Session info
75-
run: |
76-
options(width = 100)
77-
pkgs <- installed.packages()[, "Package"]
78-
sessioninfo::session_info(pkgs, include_base = TRUE)
79-
shell: Rscript {0}
55+
extra-packages: rcmdcheck
8056

81-
- name: Check
82-
env:
83-
_R_CHECK_CRAN_INCOMING_: false
84-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
85-
shell: Rscript {0}
57+
- uses: r-lib/actions/check-r-package@v1
8658

8759
- name: Show testthat output
8860
if: always()
@@ -91,7 +63,7 @@ jobs:
9163

9264
- name: Upload check results
9365
if: failure()
94-
uses: actions/upload-artifact@master
66+
uses: actions/upload-artifact@main
9567
with:
9668
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
9769
path: check

.github/workflows/pkgdown.yaml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,33 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
# Add Config/Needs/website: tidyverse/tidytemplate to DESCRIPTION
14
on:
25
push:
3-
branches:
4-
- master
5-
- main
6+
branches: [main, master]
7+
tags: ['*']
68
pull_request:
7-
branches:
8-
- master
9-
- main
9+
branches: [main, master]
1010

1111
name: pkgdown
1212

1313
jobs:
1414
pkgdown:
15-
runs-on: macOS-latest
15+
runs-on: ubuntu-latest
1616
env:
1717
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- uses: actions/checkout@v2
2020

21-
- uses: r-lib/actions/setup-r@v1
22-
2321
- uses: r-lib/actions/setup-pandoc@v1
24-
25-
- name: System dependencies
26-
run: brew install harfbuzz fribidi
27-
28-
- name: Query dependencies
29-
run: |
30-
install.packages('remotes')
31-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
32-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
33-
shell: Rscript {0}
3422

35-
- name: Cache R packages
36-
uses: actions/cache@v2
23+
- uses: r-lib/actions/setup-r@v1
3724
with:
38-
path: ${{ env.R_LIBS_USER }}
39-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
40-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
25+
use-public-rspm: true
4126

42-
- name: Install dependencies
43-
run: |
44-
remotes::install_deps(dependencies = TRUE)
45-
remotes::install_github("tidyverse/tidytemplate")
46-
install.packages("pkgdown", type = "binary")
47-
shell: Rscript {0}
27+
- uses: r-lib/actions/setup-r-dependencies@v1
28+
with:
29+
extra-packages: pkgdown
30+
needs: website
4831

4932
- name: Install package
5033
run: R CMD INSTALL .
@@ -57,6 +40,6 @@ jobs:
5740
- name: Deploy package
5841
if: github.event_name == 'push'
5942
run: |
60-
git config --local user.email "[email protected]"
61-
git config --local user.name "GitHub Actions"
43+
git config --local user.name "$GITHUB_ACTOR"
44+
git config --local user.email "[email protected]"
6245
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,75 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
13
on:
24
issue_comment:
35
types: [created]
6+
47
name: Commands
8+
59
jobs:
610
document:
711
if: startsWith(github.event.comment.body, '/document')
812
name: document
9-
runs-on: macOS-latest
13+
runs-on: ubuntu-latest
1014
env:
1115
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1216
steps:
1317
- uses: actions/checkout@v2
14-
- uses: r-lib/actions/pr-fetch@master
18+
19+
- uses: r-lib/actions/pr-fetch@v1
1520
with:
1621
repo-token: ${{ secrets.GITHUB_TOKEN }}
17-
- uses: r-lib/actions/setup-r@master
18-
- name: Install dependencies
19-
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
with:
25+
use-public-rspm: true
26+
27+
- uses: r-lib/actions/setup-r-dependencies@v1
28+
with:
29+
extra-packages: roxygen2
30+
2031
- name: Document
2132
run: Rscript -e 'roxygen2::roxygenise()'
33+
2234
- name: commit
2335
run: |
36+
git config --local user.name "$GITHUB_ACTOR"
37+
git config --local user.email "[email protected]"
2438
git add man/\* NAMESPACE
2539
git commit -m 'Document'
26-
- uses: r-lib/actions/pr-push@master
40+
41+
- uses: r-lib/actions/pr-push@v1
2742
with:
2843
repo-token: ${{ secrets.GITHUB_TOKEN }}
44+
2945
style:
3046
if: startsWith(github.event.comment.body, '/style')
3147
name: style
32-
runs-on: macOS-latest
48+
runs-on: ubuntu-latest
3349
env:
3450
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3551
steps:
3652
- uses: actions/checkout@v2
37-
- uses: r-lib/actions/pr-fetch@master
53+
54+
- uses: r-lib/actions/pr-fetch@v1
3855
with:
3956
repo-token: ${{ secrets.GITHUB_TOKEN }}
40-
- uses: r-lib/actions/setup-r@master
57+
58+
- uses: r-lib/actions/setup-r@v1
59+
4160
- name: Install dependencies
4261
run: Rscript -e 'install.packages("styler")'
62+
4363
- name: Style
4464
run: Rscript -e 'styler::style_pkg()'
65+
4566
- name: commit
4667
run: |
68+
git config --local user.name "$GITHUB_ACTOR"
69+
git config --local user.email "[email protected]"
4770
git add \*.R
4871
git commit -m 'Style'
49-
- uses: r-lib/actions/pr-push@master
72+
73+
- uses: r-lib/actions/pr-push@v1
5074
with:
5175
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-coverage.yaml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,29 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
13
on:
24
push:
3-
branches:
4-
- master
5+
branches: [main, master]
56
pull_request:
6-
branches:
7-
- master
7+
branches: [main, master]
88

99
name: test-coverage
1010

1111
jobs:
1212
test-coverage:
13-
runs-on: macOS-latest
13+
runs-on: ubuntu-latest
1414
env:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
1617
steps:
1718
- uses: actions/checkout@v2
1819

19-
- uses: r-lib/actions/setup-r@master
20-
21-
- uses: r-lib/actions/setup-pandoc@master
22-
23-
- name: Query dependencies
24-
run: |
25-
install.packages('remotes')
26-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
28-
shell: Rscript {0}
29-
30-
- name: Cache R packages
31-
uses: actions/cache@v1
20+
- uses: r-lib/actions/setup-r@v1
3221
with:
33-
path: ${{ env.R_LIBS_USER }}
34-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
22+
use-public-rspm: true
3623

37-
- name: Install dependencies
38-
run: |
39-
install.packages(c("remotes"))
40-
remotes::install_deps(dependencies = TRUE)
41-
remotes::install_cran("covr")
42-
shell: Rscript {0}
24+
- uses: r-lib/actions/setup-r-dependencies@v1
25+
with:
26+
extra-packages: covr
4327

4428
- name: Test coverage
4529
run: covr::codecov()

DESCRIPTION

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
Package: modeldb
2-
Version: 0.2.2
32
Title: Fits Models Inside the Database
4-
Description: Uses 'dplyr' and 'tidyeval' to fit statistical models inside the database. It currently supports KMeans and linear regression models.
3+
Version: 0.2.2
54
Authors@R:
6-
person("Max", "Kuhn", email = "[email protected]", role = c("aut", "cre"))
5+
person("Max", "Kuhn", , "[email protected]", role = c("aut", "cre"))
6+
Description: Uses 'dplyr' and 'tidyeval' to fit statistical models inside
7+
the database. It currently supports KMeans and linear regression
8+
models.
9+
License: MIT + file LICENSE
10+
URL: https://modeldb.tidymodels.org, https://github.com/tidymodels/modeldb
11+
BugReports: https://github.com/tidymodels/modeldb/issues
712
Depends:
813
R (>= 3.1)
914
Imports:
1015
dplyr(>= 0.7),
16+
ggplot2,
17+
progress,
18+
purrr,
1119
rlang,
12-
purrr,
1320
tibble,
14-
progress,
15-
ggplot2,
1621
tidypredict
1722
Suggests:
23+
covr,
24+
DBI,
1825
dbplyr,
19-
testthat (>= 2.1.0),
2026
knitr,
21-
rmarkdown,
27+
methods,
2228
nycflights13,
29+
rmarkdown,
2330
RSQLite,
24-
methods,
25-
DBI,
26-
covr
27-
License: MIT + file LICENSE
28-
URL: https://modeldb.tidymodels.org, https://github.com/tidymodels/modeldb
29-
BugReports: https://github.com/tidymodels/modeldb/issues
30-
RoxygenNote: 7.1.0.9000
31+
testthat (>= 2.1.0)
32+
VignetteBuilder:
33+
knitr
34+
Config/Needs/website:
35+
tidyverse/tidytemplate
3136
Encoding: UTF-8
32-
VignetteBuilder: knitr
37+
RoxygenNote: 7.1.0.9000

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ library(modeldb)
1111

1212
[![R build status](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
1313
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/modeldb)](https://cran.r-project.org/package=modeldb)
14-
[![Codecov test coverage](https://codecov.io/gh/tidymodels/modeldb/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=master)
14+
[![Codecov test coverage](https://codecov.io/gh/tidymodels/modeldb/branch/main/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=main)
1515
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](http://cran.rstudio.com/package=modeldb)
1616

1717
Fit models inside the database! **modeldb works with most database back-ends** because it leverages [dplyr](https://dplyr.tidyverse.org/) and [dbplyr](https://dbplyr.tidyverse.org/) for the final SQL translation of the algorithm. It currently supports:

0 commit comments

Comments
 (0)