-
Notifications
You must be signed in to change notification settings - Fork 1
ctry-specific model #5
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
Open
klau506
wants to merge
20
commits into
main
Choose a base branch
from
rhap_FEimprovement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e7b0e12
new functionality: ctry specific model
klau506 5e44c33
adapt base year in ResidEm_grp
klau506 efe5707
minor fixes and checkers
klau506 18a42af
fix1 github actions
klau506 3445fe0
fix2 github actions
klau506 2fa49e9
fix3 github actions
klau506 c2a315c
fix4 github actions
klau506 11448e6
fix5 github actions
klau506 ed715d1
fix6 github actions
klau506 752b28f
split calc_hap_impacts into data and prediction
klau506 852079f
update gitignore
klau506 ca7819b
fix7 github actions avoid devtools
klau506 a7b2824
loop all ctries for ctry-specific FE model
klau506 5f0c2df
clean code
klau506 e19aa9f
simplify output_dir name
klau506 d5b4aec
fix 2021 - ukraine mismatch
klau506 4375323
fix actions1
klau506 5c882ab
fix 2021 - ukraine mismatch - v2
klau506 b773c2f
minor fix fit-model fun
klau506 805a3ba
fix actions2
klau506 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,74 @@ | ||
| name: build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, k_dev] | ||
| pull_request: | ||
| branches: [main, k_dev] | ||
|
|
||
| jobs: | ||
| R-CMD: | ||
| runs-on: ${{ matrix.config.os }} | ||
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| - { os: ubuntu-latest, r: 'devel', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} | ||
|
|
||
| env: | ||
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
| GITHUB_PAT: ${{ secrets.GH_RHAP_TOKEN}} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: r-lib/actions/setup-r@v2-branch | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: r-lib/actions/setup-r@v2 | ||
| with: | ||
| r-version: '4.1' | ||
| - uses: r-lib/actions/setup-pandoc@v2-branch | ||
| - uses: r-lib/actions/setup-tinytex@v2-branch | ||
| r-version: ${{ matrix.config.r }} | ||
|
|
||
| - uses: r-lib/actions/setup-pandoc@v2 | ||
|
|
||
| - name: Install libraries | ||
| - uses: r-lib/actions/setup-tinytex@v2 | ||
|
|
||
| - name: Install system libraries | ||
| if: startsWith(matrix.config.os, 'ubuntu') | ||
| run: | | ||
| sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable | ||
| sudo apt-get update | ||
| sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev libmagick++-dev libavfilter-dev libharfbuzz-dev libfribidi-dev | ||
| sudo apt-get install -y \ | ||
| libcurl4-openssl-dev libssl-dev libxml2-dev \ | ||
| libudunits2-dev libgdal-dev libgeos-dev libproj-dev \ | ||
| libmagick++-dev libavfilter-dev \ | ||
| libharfbuzz-dev libfribidi-dev \ | ||
| libfontconfig1-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev \ | ||
| libuv1-dev | ||
|
|
||
| - name: Install dependencies | ||
| - name: Install R dependencies | ||
| run: | | ||
| install.packages(c("remotes","rcmdcheck","stringi"), repos = "https://cloud.r-project.org") | ||
| install.packages(c("evaluate"), repos = "https://cloud.r-project.org") | ||
| install.packages(c("knitr","rmarkdown","htmlwidgets", "plm"), repos = "https://cloud.r-project.org") | ||
| remotes::install_deps(dependencies = TRUE) | ||
| options(Ncpus = parallel::detectCores()) | ||
| options(repos = c(CRAN = "https://cloud.r-project.org")) | ||
| install.packages(c("remotes", "rcmdcheck", "covr", "fs", "usethis", "testthat")) | ||
| remotes::install_deps(dependencies = TRUE, upgrade = "never") | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Install the package | ||
| run: remotes::install_local(".") | ||
| shell: Rscript {0} | ||
|
|
||
| # - name: Install dependencies | ||
| # run: | | ||
| # install.packages(c("remotes", "rcmdcheck", "stringi", "devtools"), repos = "https://cloud.r-project.org") | ||
| # install.packages(c("evaluate"), repos = "https://cloud.r-project.org") | ||
| # install.packages(c("knitr", "rmarkdown", "htmlwidgets", "plm"), repos = "https://cloud.r-project.org") | ||
| # remotes::install_deps(dependencies = TRUE) | ||
| # shell: Rscript {0} | ||
| # | ||
| # - name: Install GitHub packages | ||
| # run: | | ||
| # remotes::install_github("JGCRI/rmap") | ||
| # remotes::install_github("JGCRI/gcamdata") | ||
| # shell: Rscript {0} | ||
|
|
||
| - name: Check | ||
| run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--ignore-vignettes", "--no-build-vignettes"), build_args = c("--no-manual", "--ignore-vignettes", "--no-build-vignettes"), error_on = "error") | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Run tests | ||
| run: testthat::test_local() | ||
| shell: Rscript {0} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,21 @@ | ||
| name: test_coverage | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lo mismo, da algún error esta acción |
||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| R-CMD: | ||
| runs-on: ${{ matrix.config.os }} | ||
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| - { os: ubuntu-latest, r: 'devel', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest" } | ||
|
|
||
| - { os: ubuntu-latest, r: 'release' } | ||
| env: | ||
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
| GITHUB_PAT: ${{ secrets.GH_RHAP_TOKEN }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
|
|
@@ -29,27 +24,31 @@ jobs: | |
| r-version: ${{ matrix.config.r }} | ||
|
|
||
| - uses: r-lib/actions/setup-pandoc@v2 | ||
|
|
||
| - uses: r-lib/actions/setup-tinytex@v2 | ||
|
|
||
| - name: Install system libraries | ||
| if: startsWith(matrix.config.os, 'ubuntu') | ||
| run: | | ||
| sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| libcurl4-openssl-dev libssl-dev libxml2-dev \ | ||
| libudunits2-dev libgdal-dev libgeos-dev libproj-dev \ | ||
| libmagick++-dev libavfilter-dev libharfbuzz-dev libfribidi-dev | ||
| libmagick++-dev libavfilter-dev \ | ||
| libharfbuzz-dev libfribidi-dev \ | ||
| libfontconfig1-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev \ | ||
| libuv1-dev | ||
|
|
||
| - name: Install R dependencies | ||
| run: | | ||
| install.packages(c("remotes", "rcmdcheck", "covr"), repos = "https://cloud.r-project.org") | ||
| remotes::install_deps(dependencies = TRUE) | ||
| options(Ncpus = parallel::detectCores()) | ||
| options(repos = c(CRAN = "https://cloud.r-project.org")) | ||
| install.packages(c("remotes", "rcmdcheck", "covr", "fs", "usethis", "testthat")) | ||
| remotes::install_deps(dependencies = TRUE, upgrade = "never") | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Install the package | ||
| run: | | ||
| remotes::install_local(".") | ||
| run: remotes::install_local(".") | ||
| shell: Rscript {0} | ||
|
|
||
| - name: Run tests and generate coverage | ||
|
|
@@ -60,7 +59,6 @@ jobs: | |
|
|
||
| - uses: codecov/codecov-action@v4.0.1 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} # Optional if repo is public | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| files: ./coverage.xml | ||
| verbose: true | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Algo le pasa a esta acción que no la pasa (Ubuntu)