From e5f84bad056e06d167bcbba488101cb7ffa792c1 Mon Sep 17 00:00:00 2001 From: Vries Date: Mon, 29 Jan 2024 21:52:10 +0100 Subject: [PATCH] added pkgdown --- .Rbuildignore | 5 +- .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 48 ++++++++++++++++ .gitignore | 2 + DESCRIPTION | 102 ++++++++++++++++----------------- _pkgdown.yml | 4 ++ 6 files changed, 110 insertions(+), 52 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index e7d5b7a..c6eb367 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,4 +2,7 @@ ^\.Rproj\.user$ ^LICENSE\.md$ ^\.github$ -^README\.Rmd$ \ No newline at end of file +^README\.Rmd$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..ed7650c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,48 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + 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: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 5b6a065..3b304d2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ .Rhistory .RData .Ruserdata +docs +pkgdown \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 0d911ea..edd4da2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,51 +1,51 @@ -Package: ECOTOXr -Type: Package -Title: Download and Extract Data from US EPA's ECOTOX Database -Version: 1.0.9 -Date: 2024-01-07 -Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre", "dtc"), - email = "pepijn.devries@outlook.com", - comment = c(ORCID = "0000-0002-7961-6646"))) -Author: - Pepijn de Vries [aut, cre, dtc] (0000-0002-7961-6646) -Maintainer: Pepijn de Vries -Description: The US EPA ECOTOX database is a freely available database - with a treasure of aquatic and terrestrial ecotoxicological data. - As the online search interface doesn't come with an API, this - package provides the means to easily access and search the database - in R. To this end, all raw tables are downloaded from the EPA website - and stored in a local SQLite database. -Depends: - R (>= 4.1.0), - RSQLite (>= 2.3.4) -Imports: - crayon (>= 1.5.2), - dbplyr (>= 2.4.0), - dplyr (>= 1.1.4), - httr2 (>= 1.0.0), - jsonlite (>= 1.8.8), - lifecycle (>= 1.0.4), - purrr (>= 1.0.2), - rappdirs (>= 0.3.3), - readr (>= 2.1.4), - readxl (>= 1.4.3), - rlang (>= 1.1.2), - rvest (>= 1.0.3), - stringr (>= 1.5.1), - tibble (>= 3.2.1), - tidyr (>= 1.3.0), - tidyselect (>= 1.2.0), - utils -Suggests: - DBI, - standartox, - testthat (>= 3.0.0), - webchem -URL: https://github.com/pepijn-devries/ECOTOXr -BugReports: https://github.com/pepijn-devries/ECOTOXr/issues -License: GPL (>= 3) -Encoding: UTF-8 -LazyData: true -RoxygenNote: 7.2.3 -Config/testthat/edition: 3 -Roxygen: list(markdown = TRUE) +Package: ECOTOXr +Type: Package +Title: Download and Extract Data from US EPA's ECOTOX Database +Version: 1.0.9 +Date: 2024-01-07 +Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre", "dtc"), + email = "pepijn.devries@outlook.com", + comment = c(ORCID = "0000-0002-7961-6646"))) +Author: + Pepijn de Vries [aut, cre, dtc] (0000-0002-7961-6646) +Maintainer: Pepijn de Vries +Description: The US EPA ECOTOX database is a freely available database + with a treasure of aquatic and terrestrial ecotoxicological data. + As the online search interface doesn't come with an API, this + package provides the means to easily access and search the database + in R. To this end, all raw tables are downloaded from the EPA website + and stored in a local SQLite database. +Depends: + R (>= 4.1.0), + RSQLite (>= 2.3.4) +Imports: + crayon (>= 1.5.2), + dbplyr (>= 2.4.0), + dplyr (>= 1.1.4), + httr2 (>= 1.0.0), + jsonlite (>= 1.8.8), + lifecycle (>= 1.0.4), + purrr (>= 1.0.2), + rappdirs (>= 0.3.3), + readr (>= 2.1.4), + readxl (>= 1.4.3), + rlang (>= 1.1.2), + rvest (>= 1.0.3), + stringr (>= 1.5.1), + tibble (>= 3.2.1), + tidyr (>= 1.3.0), + tidyselect (>= 1.2.0), + utils +Suggests: + DBI, + standartox, + testthat (>= 3.0.0), + webchem +URL: https://github.com/pepijn-devries/ECOTOXr, https://pepijn-devries.github.io/ECOTOXr/ +BugReports: https://github.com/pepijn-devries/ECOTOXr/issues +License: GPL (>= 3) +Encoding: UTF-8 +LazyData: true +RoxygenNote: 7.2.3 +Config/testthat/edition: 3 +Roxygen: list(markdown = TRUE) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..bbed747 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://pepijn-devries.github.io/ECOTOXr/ +template: + bootstrap: 5 +