Skip to content

Commit 89aba98

Browse files
authored
Merge pull request #37 from tidymodels/0-2-3-RC
0.2.3 RC
2 parents e5ba46c + 7a0384e commit 89aba98

File tree

7 files changed

+35
-61
lines changed

7 files changed

+35
-61
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- {os: ubuntu-18.04, r: 'oldrel-1'}
3535
- {os: ubuntu-18.04, r: 'oldrel-2'}
3636
- {os: ubuntu-18.04, r: 'oldrel-3'}
37+
- {os: ubuntu-18.04, r: 'oldrel-4'}
3738

3839
env:
3940
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -55,15 +56,3 @@ jobs:
5556
extra-packages: rcmdcheck
5657

5758
- uses: r-lib/actions/check-r-package@v1
58-
59-
- name: Show testthat output
60-
if: always()
61-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
62-
shell: bash
63-
64-
- name: Upload check results
65-
if: failure()
66-
uses: actions/upload-artifact@main
67-
with:
68-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
69-
path: check

.github/workflows/pkgdown.yaml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
22
# 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
43
on:
54
push:
65
branches: [main, master]
7-
tags: ['*']
8-
pull_request:
9-
branches: [main, master]
6+
release:
7+
types: [published]
8+
workflow_dispatch:
109

1110
name: pkgdown
1211

@@ -29,16 +28,7 @@ jobs:
2928
extra-packages: pkgdown
3029
needs: website
3130

32-
- name: Install package
33-
run: R CMD INSTALL .
34-
35-
- name: Build site
36-
if: github.event_name == 'pull_request'
37-
run: |
38-
Rscript -e 'pkgdown::build_site()'
39-
4031
- name: Deploy package
41-
if: github.event_name == 'push'
4232
run: |
4333
git config --local user.name "$GITHUB_ACTOR"
4434
git config --local user.email "[email protected]"

.github/workflows/pr-commands.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Commands
88

99
jobs:
1010
document:
11-
if: startsWith(github.event.comment.body, '/document')
11+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
1212
name: document
1313
runs-on: ubuntu-latest
1414
env:
@@ -43,7 +43,7 @@ jobs:
4343
repo-token: ${{ secrets.GITHUB_TOKEN }}
4444

4545
style:
46-
if: startsWith(github.event.comment.body, '/style')
46+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
4747
name: style
4848
runs-on: ubuntu-latest
4949
env:

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: modeldb
22
Title: Fits Models Inside the Database
3-
Version: 0.2.2.9000
3+
Version: 0.2.3
44
Authors@R:
55
person("Max", "Kuhn", , "[email protected]", role = c("aut", "cre"))
66
Description: Uses 'dplyr' and 'tidyeval' to fit statistical models inside
@@ -31,7 +31,6 @@ Suggests:
3131
testthat (>= 2.1.0)
3232
VignetteBuilder:
3333
knitr
34-
Config/Needs/website:
35-
tidyverse/tidytemplate
34+
Config/Needs/website: tidyverse/tidytemplate
3635
Encoding: UTF-8
3736
RoxygenNote: 7.2.1.9000

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# modeldb (development version)
1+
# modeldb 0.2.3
22

33
* Re-licensed package from GPL-3 to MIT. All copyright holders are RStudio employees and give consent.
44

README.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ library(dplyr)
99
library(modeldb)
1010
```
1111

12-
[![R build status](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
13-
[![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/main/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=main)
15-
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](http://cran.rstudio.com/package=modeldb)
12+
[![R-CMD-check](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
13+
[![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/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/modeldb?branch=main)
15+
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](https://CRAN.R-project.org/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:
1818

@@ -79,11 +79,11 @@ dbplyr::remote_query(km)
7979

8080
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.
8181

82-
- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on RStudio Community](https://rstd.io/tidymodels-community).
82+
- 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).
8383

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

86-
- Either way, learn how to create and share a [reprex](https://rstd.io/reprex) (a minimal, reproducible example), to clearly communicate about your code. Check out [this helpful article on how to create reprexes](https://dbplyr.tidyverse.org/articles/reprex.html) for problems involving a database.
86+
- Either way, learn how to create and share a [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) (a minimal, reproducible example), to clearly communicate about your code. Check out [this helpful article on how to create reprexes](https://dbplyr.tidyverse.org/articles/reprex.html) for problems involving a database.
8787

8888
- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).
8989

README.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11

22
# modeldb <img src="man/figures/logo.png" align="right" alt="" width="120" />
33

4-
[![R build
5-
status](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
6-
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/modeldb)](https://cran.r-project.org/package=modeldb)
4+
[![R-CMD-check](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
5+
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/modeldb)](https://CRAN.R-project.org/package=modeldb)
76
[![Codecov test
8-
coverage](https://codecov.io/gh/tidymodels/modeldb/branch/main/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=main)
9-
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](http://cran.rstudio.com/package=modeldb)
7+
coverage](https://codecov.io/gh/tidymodels/modeldb/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/modeldb?branch=main)
8+
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](https://CRAN.R-project.org/package=modeldb)
109

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

16-
- K-means clustering
15+
- K-means clustering
1716

18-
- Linear regression
17+
- Linear regression
1918

2019
## Installation
2120

@@ -51,7 +50,7 @@ tbl(con, "mtcars") %>%
5150
linear_regression_db(wt)
5251
```
5352

54-
## # A tibble: 1 x 3
53+
## # A tibble: 1 × 3
5554
## `(Intercept)` mpg qsec
5655
## <dbl> <dbl> <dbl>
5756
## 1 4.12 -0.156 0.125
@@ -67,10 +66,8 @@ To use the `simple_kmeans_db()` function, simply pipe the database back
6766
end table to the function. This returns a list object that contains two
6867
items:
6968

70-
- A sql query table with the final center assignment
71-
- A local table with the information about the centers
72-
73-
<!-- end list -->
69+
- A sql query table with the final center assignment
70+
- A local table with the information about the centers
7471

7572
``` r
7673
km <- tbl(con, "mtcars") %>%
@@ -91,7 +88,7 @@ dbplyr::remote_query(km)
9188
```
9289

9390
## <SQL> SELECT `k_center`, `k_mpg`, `k_wt`, `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`
94-
## FROM (SELECT `LHS`.`mpg` AS `mpg`, `LHS`.`cyl` AS `cyl`, `LHS`.`disp` AS `disp`, `LHS`.`hp` AS `hp`, `LHS`.`drat` AS `drat`, `LHS`.`wt` AS `wt`, `LHS`.`qsec` AS `qsec`, `LHS`.`vs` AS `vs`, `LHS`.`am` AS `am`, `LHS`.`gear` AS `gear`, `LHS`.`carb` AS `carb`, `LHS`.`k_center` AS `k_center`, `RHS`.`k_mpg` AS `k_mpg`, `RHS`.`k_wt` AS `k_wt`
91+
## FROM (SELECT `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`, `LHS`.`k_center` AS `k_center`, `k_mpg`, `k_wt`
9592
## FROM (SELECT `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`, `center` AS `k_center`
9693
## FROM (SELECT `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`, `center_1`, `center_2`, `center_3`, CASE
9794
## WHEN (`center_1` >= `center_1` AND `center_1` < `center_2` AND `center_1` < `center_3`) THEN ('center_1')
@@ -104,15 +101,14 @@ dbplyr::remote_query(km)
104101
## LEFT JOIN (SELECT `center` AS `k_center`, `mpg` AS `k_mpg`, `wt` AS `k_wt`
105102
## FROM (SELECT `center`, AVG(`mpg`) AS `mpg`, AVG(`wt`) AS `wt`
106103
## FROM (SELECT `mpg`, `wt`, `center`
107-
## FROM (SELECT *
108104
## FROM (SELECT `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`, `center_1`, `center_2`, `center_3`, CASE
109105
## WHEN (`center_1` >= `center_1` AND `center_1` < `center_2` AND `center_1` < `center_3`) THEN ('center_1')
110106
## WHEN (`center_2` < `center_1` AND `center_2` >= `center_2` AND `center_2` < `center_3`) THEN ('center_2')
111107
## WHEN (`center_3` < `center_1` AND `center_3` < `center_2` AND `center_3` >= `center_3`) THEN ('center_3')
112108
## END AS `center`
113109
## FROM (SELECT `mpg`, `cyl`, `disp`, `hp`, `drat`, `wt`, `qsec`, `vs`, `am`, `gear`, `carb`, SQRT(((20.6428571428571 - `mpg`) * (20.6428571428571 - `mpg`)) + ((3.07214285714286 - `wt`) * (3.07214285714286 - `wt`))) AS `center_1`, SQRT(((14.4583333333333 - `mpg`) * (14.4583333333333 - `mpg`)) + ((4.05866666666667 - `wt`) * (4.05866666666667 - `wt`))) AS `center_2`, SQRT(((30.0666666666667 - `mpg`) * (30.0666666666667 - `mpg`)) + ((1.873 - `wt`) * (1.873 - `wt`))) AS `center_3`
114110
## FROM `mtcars`))
115-
## WHERE (NOT(((`center`) IS NULL)))))
111+
## WHERE (NOT(((`center`) IS NULL))))
116112
## GROUP BY `center`)) AS `RHS`
117113
## ON (`LHS`.`k_center` = `RHS`.`k_center`)
118114
## )
@@ -123,20 +119,20 @@ This project is released with a [Contributor Code of
123119
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
124120
By contributing to this project, you agree to abide by its terms.
125121

126-
- For questions and discussions about tidymodels packages, modeling,
122+
- For questions and discussions about tidymodels packages, modeling,
127123
and machine learning, please [post on RStudio
128-
Community](https://rstd.io/tidymodels-community).
124+
Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).
129125

130-
- If you think you have encountered a bug, please [submit an
126+
- If you think you have encountered a bug, please [submit an
131127
issue](https://github.com/tidymodels/modeldb/issues).
132128

133-
- Either way, learn how to create and share a
134-
[reprex](https://rstd.io/reprex) (a minimal, reproducible example),
135-
to clearly communicate about your code. Check out [this helpful
136-
article on how to create
129+
- Either way, learn how to create and share a
130+
[reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html)
131+
(a minimal, reproducible example), to clearly communicate about your
132+
code. Check out [this helpful article on how to create
137133
reprexes](https://dbplyr.tidyverse.org/articles/reprex.html) for
138134
problems involving a database.
139135

140-
- Check out further details on [contributing guidelines for tidymodels
136+
- Check out further details on [contributing guidelines for tidymodels
141137
packages](https://www.tidymodels.org/contribute/) and [how to get
142138
help](https://www.tidymodels.org/help/).

0 commit comments

Comments
 (0)