Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert packagedocs to pkgdown #335

Merged
merged 6 commits into from
May 28, 2020
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
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ ggduo_paper.txt
^scripts/
^revdep$
^\.github/
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
97 changes: 97 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: R-CMD-check

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: 'devel'}
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: macOS-latest, r: 'oldrel'}
- {os: windows-latest, r: 'oldrel'}
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
branches:
- master
- pkgdown


name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ vignettes/rd_files/
_gh-pages
ggduo_paper.txt
.httr-oauth
docs
inst/doc
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
r_binary_packages:
# install locally to avoid rev dep
- covr # code coverage check
r_github_packages:
- schloerke/travisDrat
- rstudio/crosstalk
# r_github_packages:
# - schloerke/travisDrat
# - rstudio/crosstalk
script:
- Rscript -e 'remotes::install_local()'
- Rscript -e 'covr::codecov()'
- CAN_PRINT=TRUE Rscript -e "packagedocs::deploy_travis(valid_branches = 'dev', push_branch = 'gh-pages-dev')"
- CAN_PRINT=TRUE Rscript -e "packagedocs::deploy_travis(valid_branches = 'master')"
- Rscript -e "travisDrat::deploy_drat(valid_branches = 'master', drat_repo = 'schloerke/drat')"
# - CAN_PRINT=TRUE Rscript -e "packagedocs::deploy_travis(valid_branches = 'dev', push_branch = 'gh-pages-dev')"
# - CAN_PRINT=TRUE Rscript -e "packagedocs::deploy_travis(valid_branches = 'master')"
# - Rscript -e "travisDrat::deploy_drat(valid_branches = 'master', drat_repo = 'schloerke/drat')"

notifications:
email:
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ Suggests:
rmarkdown,
roxygen2,
testthat,
crosstalk
crosstalk,
knitr
Roxygen: list(markdown = FALSE)
RoxygenNote: 7.1.0
VignetteBuilder: packagedocs
VignetteBuilder: knitr
SystemRequirements: openssl
Encoding: UTF-8
1 change: 0 additions & 1 deletion R/ggpairs.R
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ add_and_overwrite_aes <- function(current, new) {
#' Replace the fill with the color and make color NULL.
#'
#' @param current the current aesthetics
#' @keywords internal
#' @export
mapping_color_to_fill <- function(current) {
if (is.null(current)) {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


<!-- badges: start -->
[![R build status](https://github.com/ggobi/ggally/workflows/R-CMD-check/badge.svg)](https://github.com/ggobi/ggally)
[![R build status](https://github.com/ggobi/ggally/workflows/R-CMD-check/badge.svg)](https://github.com/ggobi/ggally/actions)
[![codecov.io](https://codecov.io/github/ggobi/ggally/coverage.svg?branch=master)](https://codecov.io/github/ggobi/ggally?branch=master)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/GGally)](https://cran.r-project.org/package=GGally)
[![](http://cranlogs.r-pkg.org/badges/GGally)](https://cran.r-project.org/package=GGally)
Expand Down
150 changes: 150 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
url: https://ggobi.github.io/ggally

# template:
# params:
# docsearch:
# api_key: API_KEY
# index_name: INDEX_NAME


reference:
- title: Plot Matrix
# desc: >
# here
# here
# here
contents:
- '`ggmatrix`'
- '`ggpairs`'
- '`ggduo`'
- '`ggscatmat`'
- '`ggfacet`'
- '`ggts`'

- title: "ggmatrix() Helpers"
contents:
- '`wrap_fn_with_param_arg`'
- '`eval_data_col`'
- '`print.ggmatrix`'
- '`ggmatrix_gtable`'
- '`grab_legend`'
- '`putPlot`'
- '`getPlot`'
- '`+.gg`'
- '`mapping_color_to_fill`'
- '`mapping_swap_x_y`'
- '`fn_switch`'
- '`str.ggmatrix`'
- '`print_if_interactive`'
- '`ggmatrix_progress`'

- title: Modeling Diagnostics
contents:
- '`ggnostic`'
- '`broomify`'
- '`ggally_nostic_cooksd`'
- '`ggally_nostic_hat`'
- '`ggally_nostic_line`'
- '`ggally_nostic_resid`'
- '`ggally_nostic_se_fit`'
- '`ggally_nostic_sigma`'
- '`ggally_nostic_std_resid`'

- title: Major Plotting Functions
contents:
- '`ggcoef`'
- '`ggcorr`'
- '`ggparcoord`'
- '`ggsurv`'

- title: High-Level Plots (Bivariate - Continuous)
contents:
- '`ggally_autopoint`'
- '`ggally_cor`'
- '`ggally_density`'
- '`ggally_points`'
- '`ggally_smooth`'

- title: High-Level Plots (Bivariate - Combination)
contents:
- '`ggally_autopoint`'
- '`ggally_box`'
- '`ggally_denstrip`'
- '`ggally_dot`'
- '`ggally_dot_and_box`'
- '`ggally_facetdensity`'
- '`ggally_facethist`'

- title: High-Level Plots (Bivariate - Discrete)
contents:
- '`ggally_autopoint`'
- '`ggally_facetbar`'
- '`ggally_ratio`'

- title: High-Level Plots (Univariate - Continuous)
contents:
- '`ggally_barDiag`'
- '`ggally_densityDiag`'

- title: High-Level Plots (Univariate - Discrete)
contents:
- '`ggally_barDiag`'
- '`ggally_densityDiag`'
- '`ggally_barDiag`'

- title: High-Level Plots (Text)
contents:
- '`ggally_statistic`'
- '`ggally_text`'
- '`signif_stars`'

- title: High-Level Plots (Misc.)
contents:
- '`ggally_blank`'
- '`ggally_diagAxis`'
- '`ggally_na`'
- '`gglegend`'

- title: Glyph Plot
contents:
- '`glyphs`'
- '`add_ref_boxes`'
- '`add_ref_lines`'
- '`glyphplot`'
# - '`rescale01`'

- title: Network Plots
contents:
- '`ggnet`'
- '`ggnet2`'
- '`ggnetworkmap`'

- title: Datasets
contents:
- '`australia_PISA2012`'
- '`flea`'
- '`happy`'
- '`nasa`'
- '`pigs`'
- '`psychademic`'
- '`twitter_spambots`'

- title: Plot Utilities
contents:
- '`brew_colors`'
- '`find_plot_type`'
- '`is_horizontal`'
- '`lowertriangle`'
- '`mapping_string`'
- '`model_response_variables`'
- '`scag_order`'
- '`scatmat`'
- '`singleClassOrder`'
- '`skewness`'
- '`uppertriangle`'

- title: Legacy
contents:
- '`v1_ggmatrix_theme`'
- '`ggally_cor_v1_5`'

4 changes: 2 additions & 2 deletions man/ggcoef.Rd

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

1 change: 0 additions & 1 deletion man/mapping_color_to_fill.Rd

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

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
Loading