Skip to content

Commit

Permalink
use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Jan 15, 2025
1 parent 0cc6d39 commit e8703fd
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 45 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
^\.Rproj\.user$
^LICENSE\.md$
^README\.Rmd$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
51 changes: 51 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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:

name: R-CMD-check.yaml

permissions: read-all

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: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# rods

<!-- badges: start -->
[![R-CMD-check](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

Download datasets from [OpenDataSoft](https://www.opendatasoft.com/en/) platforms.
Expand Down
92 changes: 47 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# rods

<!-- badges: start -->

[![R-CMD-check](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

Download datasets from [OpenDataSoft](https://www.opendatasoft.com/en/)
Expand Down Expand Up @@ -38,11 +40,11 @@ download_dataset(
#> 4: France Données temps réel 2023-05-16 11:45 2023-05-16 09:45:00
#> 5: France Données temps réel 2023-05-16 12:30 2023-05-16 10:30:00
#> ---
#> 68828: France Données temps réel 2024-10-17 20:30 2024-10-17 18:30:00
#> 68829: France Données temps réel 2024-10-17 21:00 2024-10-17 19:00:00
#> 68830: France Données temps réel 2024-10-17 22:15 2024-10-17 20:15:00
#> 68831: France Données temps réel 2024-10-17 22:30 2024-10-17 20:30:00
#> 68832: France Données temps réel 2024-10-17 23:30 2024-10-17 21:30:00
#> 68828: France Données temps réel 2024-07-05 15:15 2024-07-05 13:15:00
#> 68829: France Données temps réel 2024-07-05 16:45 2024-07-05 14:45:00
#> 68830: France Données temps réel 2024-07-05 17:15 2024-07-05 15:15:00
#> 68831: France Données temps réel 2024-07-05 17:30 2024-07-05 15:30:00
#> 68832: France Données temps réel 2024-07-05 19:15 2024-07-05 17:15:00
#> consommation prevision_j1 prevision_j fioul charbon gaz nucleaire
#> <int> <int> <int> <int> <int> <int> <int>
#> 1: 36134 36650 36550 146 41 964 35276
Expand All @@ -51,11 +53,11 @@ download_dataset(
#> 4: 50111 50800 50600 143 37 1157 33919
#> 5: 50975 50500 50500 141 35 1190 33878
#> ---
#> 68828: 48375 49100 49300 81 0 983 40731
#> 68829: 46535 47300 47400 81 0 1019 40574
#> 68830: 45183 45000 44950 81 0 665 40869
#> 68831: 45188 45600 45500 81 0 668 40598
#> 68832: 44821 45600 45300 80 0 642 40144
#> 68828: 45680 45500 45750 123 0 419 30626
#> 68829: 44250 43900 44000 123 0 437 32542
#> 68830: 44069 43650 43850 123 0 422 34302
#> 68831: 44434 43900 44200 123 0 418 35325
#> 68832: 45657 45300 45450 123 0 464 37422
#> eolien eolien_terrestre eolien_offshore solaire hydraulique pompage
#> <int> <char> <char> <int> <int> <int>
#> 1: 6861 ND ND 0 5932 -967
Expand All @@ -64,11 +66,11 @@ download_dataset(
#> 4: 7764 ND ND 9089 6895 0
#> 5: 7707 ND ND 10126 6717 -51
#> ---
#> 68828: 3865 3443 422 0 11013 -2
#> 68829: 4219 3775 444 0 10236 0
#> 68830: 4672 4215 458 0 9997 0
#> 68831: 4554 4120 434 0 9561 -1
#> 68832: 4821 4418 403 0 9835 0
#> 68828: 4536 3749 787 11911 7584 -1388
#> 68829: 4001 3422 579 10166 7878 -3
#> 68830: 3688 3271 416 9355 8254 -47
#> 68831: 3645 3256 389 8994 8963 -14
#> 68832: 3272 2998 274 4203 10025 -14
#> bioenergies ech_physiques taux_co2 ech_comm_angleterre ech_comm_espagne
#> <int> <int> <int> <int> <int>
#> 1: 715 -12834 19 NA NA
Expand All @@ -77,11 +79,11 @@ download_dataset(
#> 4: 703 -9596 17 NA NA
#> 5: 706 -9474 17 -4028 2300
#> ---
#> 68828: 897 -9229 16 -991 2249
#> 68829: 901 -10530 16 -1000 -466
#> 68830: 901 -12033 14 -1000 577
#> 68831: 904 -11174 14 -1000 577
#> 68832: 901 -11634 14 -1000 827
#> 68828: 807 -8929 12 -3028 -2200
#> 68829: 816 -11706 12 -3028 -1856
#> 68830: 820 -12845 12 -3028 -647
#> 68831: 833 -13852 12 -3028 -647
#> 68832: 829 -10663 13 -4028 2100
#> ech_comm_italie ech_comm_suisse ech_comm_allemagne_belgique fioul_tac
#> <int> <int> <int> <int>
#> 1: NA NA NA 2
Expand All @@ -90,11 +92,11 @@ download_dataset(
#> 4: NA NA NA 2
#> 5: -2929 -2227 -2731 2
#> ---
#> 68828: -2248 -2950 -5096 1
#> 68829: -2041 -3200 -5198 1
#> 68830: -2041 -2100 -6097 1
#> 68831: -2041 -2088 -6039 1
#> 68832: -1986 -3173 -5835 0
#> 68828: -2344 -621 -1955 1
#> 68829: -2344 -510 -4251 1
#> 68830: -2344 -191 -6985 1
#> 68831: -2344 -389 -7131 1
#> 68832: -3077 900 -5978 1
#> fioul_cogen fioul_autres gaz_tac gaz_cogen gaz_ccg gaz_autres
#> <int> <int> <int> <int> <int> <int>
#> 1: 31 113 0 490 475 0
Expand All @@ -103,11 +105,11 @@ download_dataset(
#> 4: 31 110 0 575 583 0
#> 5: 31 108 0 570 621 0
#> ---
#> 68828: 80 0 328 523 132 0
#> 68829: 80 0 329 526 163 0
#> 68830: 80 0 0 526 139 0
#> 68831: 80 0 0 527 142 0
#> 68832: 80 0 0 500 142 0
#> 68828: 122 0 0 312 108 0
#> 68829: 122 0 0 327 112 0
#> 68830: 122 0 0 311 112 0
#> 68831: 122 0 0 311 109 0
#> 68832: 122 0 0 357 108 0
#> hydraulique_fil_eau_eclusee hydraulique_lacs hydraulique_step_turbinage
#> <int> <int> <int>
#> 1: 5164 552 216
Expand All @@ -116,11 +118,11 @@ download_dataset(
#> 4: 5576 832 487
#> 5: 5364 697 656
#> ---
#> 68828: 5157 3405 2451
#> 68829: 5107 2986 2143
#> 68830: 5098 2969 1930
#> 68831: 5204 2824 1533
#> 68832: 5306 2910 1619
#> 68828: 5428 1782 375
#> 68829: 5358 1904 616
#> 68830: 5540 2068 645
#> 68831: 5559 2054 1350
#> 68832: 5868 2292 1866
#> bioenergies_dechets bioenergies_biomasse bioenergies_biogaz
#> <int> <int> <int>
#> 1: 93 374 245
Expand All @@ -129,11 +131,11 @@ download_dataset(
#> 4: 87 370 245
#> 5: 95 371 245
#> ---
#> 68828: 318 324 255
#> 68829: 320 327 255
#> 68830: 320 326 255
#> 68831: 322 328 255
#> 68832: 319 327 255
#> 68828: 248 311 248
#> 68829: 244 323 248
#> 68830: 248 324 248
#> 68831: 249 336 248
#> 68832: 248 333 248
#> stockage_batterie destockage_batterie
#> <char> <char>
#> 1: 4 7
Expand All @@ -142,11 +144,11 @@ download_dataset(
#> 4: 3 4
#> 5: 7 2
#> ---
#> 68828: -3 38
#> 68829: -2 37
#> 68830: -1 33
#> 68831: -35 32
#> 68832: -1 35
#> 68828: -8 0
#> 68829: -4 1
#> 68830: -2 0
#> 68831: -1 0
#> 68832: -3 0

# Advanced request to select and filter data
download_dataset(
Expand Down

0 comments on commit e8703fd

Please sign in to comment.