Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
michalovadek committed Aug 9, 2023
1 parent f584221 commit 3467765
Show file tree
Hide file tree
Showing 14 changed files with 361 additions and 323 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# 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:
Expand All @@ -12,8 +14,13 @@ 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

Expand All @@ -25,11 +32,17 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
extra-packages: any::pkgdown, local::.
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- 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/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
4 changes: 3 additions & 1 deletion doc/eurlexpkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ rec_eurovoc %>%
# we can use purrr::map() to play that role
library(purrr)

# wrapping in possibly() catches errors in case there is a server issue
# wrapping in possibly() would catch errors in case there is a server issue
dir_titles <- results[1:5,] %>% # take the first 5 directives only to save time
mutate(work = paste("http://publications.europa.eu/resource/cellar/", work, sep = "")) |>
mutate(title = map_chr(work, possibly(elx_fetch_data, otherwise = NA_character_),
"title")) %>%
as_tibble() %>%
Expand Down Expand Up @@ -133,6 +134,7 @@ dirs %>%
dirs_1970_title <- dirs %>%
filter(between(as.Date(date), as.Date("1970-01-01"), as.Date("1973-01-01")),
force == "true") %>%
mutate(work = paste("http://publications.europa.eu/resource/cellar/", work, sep = "")) |>
mutate(title = map_chr(work, possibly(elx_fetch_data, otherwise = NA_character_),
"title")) %>%
as_tibble()
Expand Down
4 changes: 3 additions & 1 deletion doc/eurlexpkg.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ One of the most sought-after data in the Eur-Lex dataverse is the text. It is po
# we can use purrr::map() to play that role
library(purrr)
# wrapping in possibly() catches errors in case there is a server issue
# wrapping in possibly() would catch errors in case there is a server issue
dir_titles <- results[1:5,] %>% # take the first 5 directives only to save time
mutate(work = paste("http://publications.europa.eu/resource/cellar/", work, sep = "")) |>
mutate(title = map_chr(work, possibly(elx_fetch_data, otherwise = NA_character_),
"title")) %>%
as_tibble() %>%
Expand Down Expand Up @@ -237,6 +238,7 @@ We want to know a bit more about some directives from the early 1970s that are s
dirs_1970_title <- dirs %>%
filter(between(as.Date(date), as.Date("1970-01-01"), as.Date("1973-01-01")),
force == "true") %>%
mutate(work = paste("http://publications.europa.eu/resource/cellar/", work, sep = "")) |>
mutate(title = map_chr(work, possibly(elx_fetch_data, otherwise = NA_character_),
"title")) %>%
as_tibble()
Expand Down
536 changes: 267 additions & 269 deletions doc/eurlexpkg.html

Large diffs are not rendered by default.

56 changes: 27 additions & 29 deletions docs/articles/eurlexpkg.html

Large diffs are not rendered by default.

Binary file modified docs/articles/eurlexpkg_files/figure-html/firstplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/eurlexpkg_files/figure-html/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/eurlexpkg_files/figure-html/wordcloud-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/news/index.html

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

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pandoc: 2.19.2
pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
eurlexpkg: eurlexpkg.html
last_built: 2023-04-12T21:54Z
last_built: 2023-08-09T11:02Z

7 changes: 6 additions & 1 deletion docs/reference/elx_fetch_data.html

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

10 changes: 10 additions & 0 deletions docs/reference/elx_make_query.html

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

24 changes: 12 additions & 12 deletions docs/reference/elx_run_query.html

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

5 changes: 4 additions & 1 deletion man/elx_fetch_data.Rd

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

0 comments on commit 3467765

Please sign in to comment.