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

Feature try GitHub actions #1

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7d5e989
Create main.yml
pschil Mar 28, 2020
f4890e9
Update main.yml
pschil Mar 28, 2020
e7ab0f3
Update main.yml
pschil Mar 28, 2020
f60205a
Update main.yml
pschil Mar 28, 2020
3aceb5f
Update main.yml
pschil Mar 28, 2020
e814b65
Update main.yml
pschil Mar 28, 2020
fba72eb
Update main.yml
pschil Mar 28, 2020
966103f
Update main.yml
pschil Mar 28, 2020
1f41d4a
Update main.yml
pschil Mar 28, 2020
b6d5f36
Update main.yml
pschil Mar 28, 2020
b2a608c
Update main.yml
pschil Mar 28, 2020
78c78c7
Update main.yml
pschil Mar 28, 2020
06bf818
Update main.yml
pschil Mar 28, 2020
806d81c
Update main.yml
pschil Mar 28, 2020
abecceb
Update main.yml
pschil Mar 28, 2020
d264af4
Update version num and date to silence warning
pschil Mar 28, 2020
269e7bd
Update main.yml
pschil Mar 28, 2020
d833c6b
Update main.yml
pschil Mar 28, 2020
b22e12a
Update main.yml
pschil Mar 28, 2020
07a709b
Update main.yml
pschil Mar 28, 2020
9a17836
Update main.yml
pschil Mar 29, 2020
829c3db
Update main.yml
pschil Mar 29, 2020
2c98e2a
Update main.yml
pschil Mar 29, 2020
742eb57
Update main.yml
pschil Mar 29, 2020
9f2561e
Update main.yml
pschil Mar 29, 2020
f516edf
as string
pschil Mar 29, 2020
98e33aa
separate files for workflows
pschil Mar 29, 2020
f6e940b
try with other rtools version
pschil Mar 29, 2020
00a0ba9
hacky rtools 4 selection
pschil Mar 29, 2020
bb2513e
try pkgdown
pschil Mar 31, 2020
0a11ca3
change branch when to creat pkgdown
pschil Mar 31, 2020
85ceb33
add bookdown to suggestions to build pkdown
pschil Mar 31, 2020
1102747
push to redo
pschil Mar 31, 2020
aba8d1a
trigger gh pages
pschil Apr 28, 2020
9a59089
Update NEWS.md
pschil Apr 28, 2020
27fc7b6
subtitle formatting
pschil Apr 28, 2020
731f79f
Update NEWS.md
pschil Apr 28, 2020
83843ba
Update NEWS.md
pschil Apr 28, 2020
be394ef
add config yml
pschil Apr 30, 2020
ecde690
update r version for githubactions pkgdown
pschil Apr 30, 2020
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
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ cran-comments.md
^appveyor\.yml$
^\.travis\.yml$
vignettes/REndo-introduction_cache
^\.github$
^/Users/patrik/StudentAssi/REndo/GIT/pschil/REndo/_pkgdown\.yml$
^_pkgdown\.yml$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
74 changes: 74 additions & 0 deletions .github/workflows/R-CMD-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: R-CMD-checks
on: [push, pull_request]
jobs:
# job for R CMD checks on win, mac, ubuntu
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: R-CMD-check-${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: '3.6.2'}
- {os: macOS-latest, r: '3.6.2'}
- {os: ubuntu-16.04, r: '3.6.2', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}
rtools-version: '../testing/rtools40-x86_64.exe'

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-

- name: Install system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y qpdf

- name: Install gsl for mac
if: runner.os == 'macOS'
run: |
brew install gsl

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
# install from source for ubuntu, binary does not work
remotes::install_cran("RcppGSL", repos = "https://cran.rstudio.com/")
print(RcppGSL::LdFlags())
print(RcppGSL::CFlags())
if(file.exists('depends.Rds')) {file.remove('depends.Rds')}
# check if can build a rcppgsl package from source
install.packages("flan", type="source", repos="https://cran.rstudio.com/")
library(flan)
shell: Rscript {0}

- name: Check
run: rcmdcheck::rcmdcheck(args = c("--no-tests", "--as-cran", "--no-manual"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

43 changes: 43 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches: feature-try-github-actions

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: macOS-r-4.0-${{ hashFiles('depends.Rds') }}
restore-keys: macOS-r-4.0-

- name: Install dependencies
run: |
install.packages("remotes")
remotes::install_deps(dependencies = TRUE)
remotes::install_dev("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Deploy package
run: pkgdown::deploy_to_branch(new_process = FALSE)
shell: Rscript {0}

46 changes: 46 additions & 0 deletions .github/workflows/test-and-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: test-and-coverage
on: pull_request
jobs:
# job for test on ubunutu only
tests-and-coverage-ubuntu-16-04-R-3-6:
runs-on: ubuntu-16.04
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
# to install binaries on ubuntu
RSPM: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
with:
r-version: 3.6
- name: Install system dependencies
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "install.packages(c('remotes', 'rcmdcheck'))"
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install package dependencies
# RcppGSL and stringi can currently not load or link when installed from RSPM,
# therefore install from cran (source)
run: |
remotes::install_deps(dependencies = TRUE)
print(getOption("repos"))
remotes::install_cran("testthat", repos = "https://cran.rstudio.com/")
remotes::install_cran("devtools", repos = "https://cran.rstudio.com/")
remotes::install_cran("covr", repos = "https://cran.rstudio.com/")
shell: Rscript {0}

- name: Run tests
run: |
library(testthat)
library(devtools)
devtools::test(reporter=RstudioReporter)
shell: Rscript {0}

- name: Test coverage, if tests succeeded
if: success()
# run: covr::codecov()
run: covr::package_coverage(type = "tests", quiet = FALSE)
shell: Rscript {0}
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: REndo
Title: Fitting Linear Models with Endogenous Regressors using Latent Instrumental Variables
Version: 2.3.1
Date: 2020-02-15
Version: 2.3.2
Date: 2020-03-28
Authors@R: c(
person(given="Raluca", family="Gui", email = "[email protected]", role = c("cre","aut")),
person(given="Markus", family="Meierer", email = "[email protected]", role = "aut"),
Expand Down Expand Up @@ -35,7 +35,8 @@ Imports:
Suggests:
testthat,
covr,
R.rsp
R.rsp,
bookdown
Encoding: UTF-8
RoxygenNote: 7.0.2
VignetteBuilder: R.rsp
42 changes: 21 additions & 21 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# CHANGES IN REndo 2.3.1
# REndo 2.3.1
* None. Version bump in order to resubmit to CRAN after package was archived.


# CHANGES IN REndo 2.3.0
# REndo 2.3.0

## SIGNIFICANT USER-VISIBLE CHANGES
#### SIGNIFICANT USER-VISIBLE CHANGES
* Add support for predictions through method `predict` for every model

## BUG FIXES
#### BUG FIXES
* Fix wrong calculations for the fitted values and residuals in the enhanced OLS cases of `copulaCorrection`
* Improved documentation



# CHANGES IN REndo 2.2.1
# REndo 2.2.1

## SIGNIFICANT USER-VISIBLE CHANGES
#### SIGNIFICANT USER-VISIBLE CHANGES
* To tweak the lmer model fit in `multilevelIV` to their linking, users can supply a parameter `lmer.control`

## NEW FEATURES
#### NEW FEATURES
* Warning in `confint` if there are NAs in the bootstrapped estimates for `copulaCorrection`
* Updated vignette

## BUG FIXES
#### BUG FIXES
* The coefficient estimates for `multilevelIV` are more consistent and independent of data sorting due to different standard settings for fitting `lmer`
* Bootstrapped parameter estimates for `copualCorrection` result in fewer NAs when using L-BFGS-B as optimization method



# CHANGES IN REndo 2.2.0
# REndo 2.2.0

## SIGNIFICANT USER-VISIBLE CHANGES
#### SIGNIFICANT USER-VISIBLE CHANGES
* The augmented OLS method in `copulaCorrection` also bootstraps parameter estimates
* The summary output for results from `copulaCorrection` was adapted to reflect that standard errors are bootstrapped
* Removed support for the S3 method `labels` because of inconsistent behavior across methods

## NEW FEATURES
#### NEW FEATURES
* Bootstrapping for `copulaCorrection` case 1 is now considerably faster
* New data was generated for `dataMultilevelIV`

## BUG FIXES
#### BUG FIXES
* The sigma matrix in `latentIV` is constructed as in the paper by Ebbes et al. what improves results. Special thanks to Jordan Henderson for investigating and pointing this out!
* In `latentIV`, the parameter for group membership (`theta5`) is now transformed back and reported correctly.
* The vcov matrix for `latentIV` is corrected for the transformation in `theta5`.
Expand All @@ -48,43 +48,43 @@



# CHANGES IN REndo 2.1.0
# REndo 2.1.0

## SIGNIFICANT USER-VISIBLE CHANGES
#### SIGNIFICANT USER-VISIBLE CHANGES
* The reworked method `multilevelIV` and accompanying data was added back to the package
* Vignette `REndo-introduction` was added to showcase package usage
* Users can supply a parameter `optimx.args` to tweak the LL optimization to their liking

## NEW FEATURES
#### NEW FEATURES
* Method `confint` was added for methods `latentIV` and `copulaCorrection`
* Examples and documentation were improved for all methods
* New data was generated for `dataHetIV`
* The default number of iterations for all optimizations was increased to 100'000

## BUG FIXES
#### BUG FIXES
* To avoid infrequent warnings, the parameter `sigma` used in `copulaCorrection` was constrained to > 0
* Various spelling mistakes were fixed



# CHANGES IN REndo 2.0.0
# REndo 2.0.0

## SIGNIFICANT USER-VISIBLE CHANGES
#### SIGNIFICANT USER-VISIBLE CHANGES
* Remodeled all methods' user-interface
* Added detailed input checks for every provided parameter
* Adapted all visible outputs
* Parameter `verbose` allows to turn on or off printing
* Updated documentation to reflect all changes and added theoretical background

## NEW FEATURES
#### NEW FEATURES
* Formulas support transformations
* Improve all code to be more reliable and stable
* Provide new example datasets and accompanying documentation for all methods
* Added extensive testing for all aspects of the package
* Increased numerical stability for log-likelihood optimization methods `latentIV` and `copualCorrection`

## BUG FIXES
#### BUG FIXES
* Many

# DEPRECATED AND DEFUNCT
#### DEPRECATED AND DEFUNCT
* The multilevel function is temporarily removed from the package due to ongoing work on it
1 change: 1 addition & 0 deletions R/REndo-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#' \item{\code{multilevelIV()}}{multilevel GMM method proposed by Kim and Frees (2007)}
#' }
#'
#'
#' \strong{Differences between current (2.0.0) and previous version of REndo}
#'
#' Note that with version 2.0.0 sweeping changes were which greatly improve functionality but break backwards compatibility.
Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template:
params:
bootswatch: cerulean