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

Fix senadores #11

Merged
merged 4 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update actions
  • Loading branch information
dieghernan committed Apr 12, 2024
commit 34efd0d4542b8c93cf1aeca447cb6821890fb5de
3 changes: 2 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

Expand All @@ -47,3 +47,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
86 changes: 0 additions & 86 deletions .github/workflows/roscron-check-standard.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
branches: [main, master]
tags: ['*']

name: rostemplate-gh-pages
permissions: write-all

jobs:
rostemplate-gh-pages:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

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

Expand All @@ -31,6 +33,6 @@ jobs:

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE, run_dontrun = TRUE)'
8 changes: 4 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -31,20 +31,20 @@ jobs:
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
4 changes: 2 additions & 2 deletions R/composicion.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ grupos <- function(legislatura){
senadores <- function() {
# Iterate through legislaturas

# Up to 20
legislat <- seq(1, 20)
# Up to 24 (opinionated, since 1978 there are 14 as of 2024)
legislat <- seq(1, 24)
senad_list <- lapply(legislat, function(x) {
# Try and in error return NULL
df <- try(senadores_lappl(x), silent = TRUE)
Expand Down
4 changes: 2 additions & 2 deletions vignettes/senadoRES.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ sessions <- do.call(rbind, s)
ggplot(sessions) +
stat_sum(aes(sesionLegislatura, sesionHoraInicio,
fill = after_stat(n), size = 1), geom = "tile") +
guides(size = FALSE) +
guides(size = "none") +
theme_minimal() +
labs(title = "Hour of sessions", x = "Legislature", y = "Starting hour",
fill = "Sessions") +
Expand All @@ -118,7 +118,7 @@ So most of the times they meet at the afternoon.
If you want more detailed information of each session you can use the fichUrlDetalleSesion details:

```{r detalles}
details <- detalles(paste0("https://www.senado.es", sessions$fichUrlDetalleSesion[1]))
details <- detalles(paste0("https://www.senado.es", sessions$fichUrlDetalleSesion[3]))
details[1:5, c("asunto_id", "asunto_hora_inicio", "asunto_hora_fin", "punto_literal", "intervencion_orador_desc", "intervencion_orador_idWeb")]
```

Expand Down