Skip to content

Commit b7820cf

Browse files
authored
Merge pull request #591 from tidymodels/poisson_reg-pkgdown
move doc for `update.poisson_reg()`
2 parents 3fd6a35 + f087429 commit b7820cf

File tree

11 files changed

+110
-235
lines changed

11 files changed

+110
-235
lines changed

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

Lines changed: 27 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# NOTE: This workflow is overkill for most R packages
2-
# check-standard.yaml is likely a better choice
3-
# usethis::use_github_action("check-standard") will install it.
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
43
#
5-
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6-
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
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.
77
on:
88
push:
9-
branches:
10-
- main
11-
- master
9+
branches: [main, master]
1210
pull_request:
13-
branches:
14-
- main
15-
- master
11+
branches: [main, master]
1612

1713
name: R-CMD-check
1814

@@ -27,62 +23,41 @@ jobs:
2723
matrix:
2824
config:
2925
- {os: macOS-latest, r: 'release'}
26+
3027
- {os: windows-latest, r: 'release'}
31-
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32-
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
33-
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
34-
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35-
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/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'}
3636

3737
env:
38-
RSPM: ${{ matrix.config.rspm }}
3938
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
39+
R_KEEP_PKG_SOURCE: yes
4040

4141
steps:
4242
- uses: actions/checkout@v2
4343

44+
- uses: r-lib/actions/setup-pandoc@v1
45+
4446
- uses: r-lib/actions/setup-r@v1
45-
id: install-r
4647
with:
4748
r-version: ${{ matrix.config.r }}
4849
http-user-agent: ${{ matrix.config.http-user-agent }}
50+
use-public-rspm: true
4951

50-
- uses: r-lib/actions/setup-pandoc@v1
51-
52-
- name: Install pak and query dependencies
53-
run: |
54-
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
55-
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
56-
shell: Rscript {0}
57-
58-
- name: Restore R package cache
59-
uses: actions/cache@v2
52+
- uses: r-lib/actions/setup-r-dependencies@v1
6053
with:
61-
path: |
62-
${{ env.R_LIBS_USER }}/*
63-
!${{ env.R_LIBS_USER }}/pak
64-
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
65-
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
66-
67-
- name: Install system dependencies
68-
if: runner.os == 'Linux'
69-
run: |
70-
pak::local_system_requirements(execute = TRUE)
71-
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
72-
pak::pkg_system_requirements("textshaping", execute = TRUE)
73-
pak::pkg_system_requirements("gert", execute = TRUE)
74-
shell: Rscript {0}
75-
76-
- name: Install dependencies
77-
run: |
78-
pak::local_install_dev_deps(upgrade = TRUE)
79-
pak::pkg_install("rcmdcheck")
80-
shell: Rscript {0}
54+
extra-packages: rcmdcheck
8155

8256
- name: Install Miniconda
8357
run: |
84-
Rscript -e "pak::pkg_install('rstudio/reticulate')"
85-
Rscript -e "reticulate::install_miniconda()"
58+
pak::pkg_install('rstudio/reticulate')
59+
reticulate::install_miniconda()
60+
shell: Rscript {0}
8661

8762
- name: Find Miniconda on macOS
8863
if: runner.os == 'macOS'
@@ -94,20 +69,7 @@ jobs:
9469
tensorflow::install_tensorflow(version='1.14.0')
9570
shell: Rscript {0}
9671

97-
- name: Session info
98-
run: |
99-
options(width = 100)
100-
pkgs <- installed.packages()[, "Package"]
101-
sessioninfo::session_info(pkgs, include_base = TRUE)
102-
shell: Rscript {0}
103-
104-
- name: Check
105-
env:
106-
_R_CHECK_CRAN_INCOMING_: false
107-
run: |
108-
options(crayon.enabled = TRUE)
109-
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
110-
shell: Rscript {0}
72+
- uses: r-lib/actions/check-r-package@v1
11173

11274
- name: Show testthat output
11375
if: always()
@@ -118,10 +80,5 @@ jobs:
11880
if: failure()
11981
uses: actions/upload-artifact@main
12082
with:
121-
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
83+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
12284
path: check
123-
124-
- name: Don't use tar from old Rtools to store the cache
125-
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
126-
shell: bash
127-
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

.github/workflows/pkgdown.yaml

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,38 @@
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
2422

25-
- name: System dependencies
26-
run: brew install harfbuzz fribidi
27-
28-
- name: Install pak and query dependencies
29-
run: |
30-
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
31-
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
32-
shell: Rscript {0}
33-
34-
- name: Cache R packages
35-
uses: actions/cache@v2
23+
- uses: r-lib/actions/setup-r@v1
3624
with:
37-
path: ${{ env.R_LIBS_USER }}
38-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/r-depends.rds') }}
39-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
40-
41-
- name: Install system dependencies
42-
run: |
43-
pak::local_system_requirements(execute = TRUE)
44-
pak::pkg_system_requirements("pkgdown", execute = TRUE)
45-
pak::pkg_system_requirements("textshaping", execute = TRUE)
46-
pak::pkg_system_requirements("gert", execute = TRUE)
47-
shell: Rscript {0}
48-
49-
- name: Install dependencies
50-
run: |
51-
pak::local_install_dev_deps(upgrade = TRUE, dependencies = c("all", "Config/Needs/website"))
52-
pak::pkg_install("pkgdown")
53-
shell: Rscript {0}
54-
55-
- name: Install Miniconda
56-
run: |
57-
Rscript -e "pak::pkg_install('rstudio/reticulate')"
58-
Rscript -e "reticulate::install_miniconda()"
25+
use-public-rspm: true
5926

60-
- name: Find Miniconda on macOS
61-
if: runner.os == 'macOS'
62-
run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile
27+
- uses: r-lib/actions/setup-r-dependencies@v1
28+
with:
29+
extra-packages: r-lib/pkgdown
30+
needs: website
6331

64-
- name: Install TensorFlow
32+
- name: Install Miniconda + TensorFlow
6533
run: |
34+
pak::pkg_install('rstudio/reticulate')
35+
reticulate::install_miniconda()
6636
reticulate::conda_create('r-reticulate', packages = c('python==3.6.9'))
6737
tensorflow::install_tensorflow(version='1.14.0')
6838
shell: Rscript {0}
@@ -71,13 +41,13 @@ jobs:
7141
run: R CMD INSTALL .
7242

7343
- name: Build site
74-
if: github.ref != 'refs/heads/master'
44+
if: github.event_name == 'pull_request'
7545
run: |
7646
Rscript -e 'pkgdown::build_site()'
7747
7848
- name: Deploy package
79-
if: github.ref == 'refs/heads/master'
49+
if: github.event_name == 'push'
8050
run: |
81-
git config --local user.email "[email protected]"
82-
git config --local user.name "GitHub Actions"
51+
git config --local user.name "$GITHUB_ACTOR"
52+
git config --local user.email "[email protected]"
8353
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +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:
7-
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') }}
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
18+
1419
- uses: r-lib/actions/pr-fetch@v1
1520
with:
1621
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
1723
- uses: r-lib/actions/setup-r@v1
18-
- name: Install dependencies
19-
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
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: |
24-
git config --local user.email "[email protected]"
25-
git config --local user.name "GitHub Actions"
36+
git config --local user.name "$GITHUB_ACTOR"
37+
git config --local user.email "[email protected]"
2638
git add man/\* NAMESPACE
2739
git commit -m 'Document'
40+
2841
- uses: r-lib/actions/pr-push@v1
2942
with:
3043
repo-token: ${{ secrets.GITHUB_TOKEN }}
44+
3145
style:
32-
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') }}
3347
name: style
34-
runs-on: macOS-latest
48+
runs-on: ubuntu-latest
3549
env:
3650
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3751
steps:
3852
- uses: actions/checkout@v2
53+
3954
- uses: r-lib/actions/pr-fetch@v1
4055
with:
4156
repo-token: ${{ secrets.GITHUB_TOKEN }}
57+
4258
- uses: r-lib/actions/setup-r@v1
59+
4360
- name: Install dependencies
4461
run: Rscript -e 'install.packages("styler")'
62+
4563
- name: Style
4664
run: Rscript -e 'styler::style_pkg()'
65+
4766
- name: commit
4867
run: |
49-
git config --local user.email "[email protected]"
50-
git config --local user.name "GitHub Actions"
68+
git config --local user.name "$GITHUB_ACTOR"
69+
git config --local user.email "[email protected]"
5170
git add \*.R
5271
git commit -m 'Style'
72+
5373
- uses: r-lib/actions/pr-push@v1
5474
with:
5575
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)