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

Transform R notebooks to Rmd; Add checks for R notebooks; Small mod to checks in Python notebooks #10

Merged
merged 286 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
11a2bab
Update r-ols-and-lasso-for-wage-prediction.irnb
vsyrgkanis Jul 14, 2024
7c48589
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
632fe76
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
b0186b1
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
8cb5b70
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
26e56c2
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
b3c0b71
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
4977144
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
73c819b
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
e497ea2
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
1e283f1
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
5f7dbf6
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
c36775e
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
7251e2b
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
4a17dc7
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
1dfd168
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
105c746
Update r-ols-and-lasso-for-wage-prediction.irnb
vsyrgkanis Jul 14, 2024
ca77cb0
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 14, 2024
2ccc83c
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 14, 2024
9b885d4
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
757af80
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 14, 2024
3c8a41a
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
189b5d6
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
26bcf6f
Update r_convergence_hypothesis_double_lasso.irnb
vsyrgkanis Jul 15, 2024
53b12a8
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
0d2f2d6
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
b0d857a
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
3f7bc9d
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
e53a828
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
e63768d
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
0595ea0
Update r_convergence_hypothesis_double_lasso.irnb
vsyrgkanis Jul 15, 2024
0b5cbbd
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
1eed968
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
96f81f1
Update r_experiment_non_orthogonal.irnb
vsyrgkanis Jul 15, 2024
bb29b90
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
15f2820
Update r_heterogenous_wage_effects.irnb
vsyrgkanis Jul 15, 2024
e1f1683
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
76139a4
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
4ba388a
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
8606b8c
Update r_convergence_hypothesis_double_lasso.irnb
vsyrgkanis Jul 15, 2024
154c9ce
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
df42f81
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
8694625
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
15fb3e8
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
7adf2e6
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
e2df161
linting errors
vsyrgkanis Jul 15, 2024
b5f7b0a
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
d20e4a3
Create .lintr
vsyrgkanis Jul 15, 2024
182bbee
linting R
vsyrgkanis Jul 15, 2024
db7b167
Update .lintr
vsyrgkanis Jul 15, 2024
334c41a
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
976d57f
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
31afef1
linting fixes
vsyrgkanis Jul 15, 2024
98b6346
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 15, 2024
6c89112
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 15, 2024
485a791
linting
vsyrgkanis Jul 15, 2024
498cd67
Linting errors
vsyrgkanis Jul 15, 2024
2e6d334
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
d42c676
linting errors
vsyrgkanis Jul 15, 2024
6159707
Update r_experiment_non_orthogonal.irnb
vsyrgkanis Jul 15, 2024
09b3ec9
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
6dc20f0
Linting errors
vsyrgkanis Jul 15, 2024
dff992c
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 15, 2024
efa8643
Removing the object_usage_linter
vsyrgkanis Jul 15, 2024
17b1a6b
Update r_functional_approximation_by_nn_and_rf.irnb
vsyrgkanis Jul 15, 2024
b43542c
Update .lintr
vsyrgkanis Jul 16, 2024
0904e08
Update .lintr
vsyrgkanis Jul 16, 2024
0079c12
added traceback printing
vsyrgkanis Jul 16, 2024
879c839
Update r_dml_inference_for_gun_ownership.irnb
vsyrgkanis Jul 16, 2024
de7bf9b
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
57dbf78
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
3547a6c
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
eda58da
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
8d407ea
Update r_ml_wage_prediction.irnb
vsyrgkanis Jul 16, 2024
ca0919a
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
30b9901
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
d7242bc
Update r-dml-401k.irnb
vsyrgkanis Jul 16, 2024
f32de68
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 16, 2024
c03ebf1
Update r_ml_wage_prediction.irnb
vsyrgkanis Jul 16, 2024
340c73b
Update r-identification-analysis-of-401-k-example-w-dags.irnb
vsyrgkanis Jul 16, 2024
87a61b7
Moved the R version of Bert to in-progress
vsyrgkanis Jul 16, 2024
8a5ae99
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
1444d48
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
491c432
Linting CM1
vsyrgkanis Jul 16, 2024
a74e803
Linting CM1
vsyrgkanis Jul 16, 2024
df2d12d
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
7e5d8a4
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
67a0777
Linting errors
vsyrgkanis Jul 16, 2024
5b7d810
Linting errors
vsyrgkanis Jul 16, 2024
05efce2
Update r-colliderbias-hollywood.irnb
vsyrgkanis Jul 16, 2024
a7cea63
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
da46ae7
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
db78db2
AC1 linting
vsyrgkanis Jul 16, 2024
012be66
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 16, 2024
9660fce
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
be2fdb7
Linting AC2
vsyrgkanis Jul 16, 2024
91dc804
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 16, 2024
4a81253
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 16, 2024
41c0dec
Linting errors for all remaining folders
vsyrgkanis Jul 16, 2024
c0048e7
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 16, 2024
c46ebaa
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
918c643
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
46aafe7
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
0a45d56
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 16, 2024
f92a567
Update r_functional_approximation_by_nn_and_rf.irnb
vsyrgkanis Jul 16, 2024
09d0a8c
Added install::keras
vsyrgkanis Jul 17, 2024
5f931e9
Added upper bound on tensorflow for keras to work in R
vsyrgkanis Jul 17, 2024
91213d1
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 17, 2024
d8beb6f
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 17, 2024
b993d10
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 17, 2024
8947b02
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 17, 2024
fdecbf9
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 17, 2024
b2d7222
Update dml-for-conditional-average-treatment-effect.irnb
vsyrgkanis Jul 17, 2024
ad084b2
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 17, 2024
9ebc5c9
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 17, 2024
6fbbd4b
Executions errors in AC2
vsyrgkanis Jul 17, 2024
fc6230c
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 17, 2024
8472c2f
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 17, 2024
39db4dd
Linting and execution errors
vsyrgkanis Jul 18, 2024
2bd5db9
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 18, 2024
ca4d753
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 18, 2024
811339f
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 18, 2024
34ab8e9
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 18, 2024
02b156f
Update r-dml-401k-IV.irnb
vsyrgkanis Jul 18, 2024
f08bde7
Testing download problem for extralearners
vsyrgkanis Jul 18, 2024
cb3d480
Update r-ols-and-lasso-for-wage-prediction.irnb
vsyrgkanis Jul 18, 2024
3c8aca9
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 18, 2024
8daa36f
Made RDFlex.R deprecated
vsyrgkanis Jul 18, 2024
f8f0818
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 18, 2024
6a08d7d
testing github installation
vsyrgkanis Jul 18, 2024
4514c8a
github installation
vsyrgkanis Jul 19, 2024
d9d9376
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 19, 2024
e909f3d
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 19, 2024
de5c753
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 19, 2024
5f17dd9
Delete AC2/aa.irnb
vsyrgkanis Jul 19, 2024
999809a
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 19, 2024
8930a17
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 19, 2024
68e45e8
Update r_ml_for_wage_prediction.irnb
vsyrgkanis Jul 19, 2024
21285c3
Mistakes in PM2 from linting changes
vsyrgkanis Jul 19, 2024
6f3d685
Update r_linear_penalized_regs.irnb
vsyrgkanis Jul 19, 2024
9e86ced
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 19, 2024
9d33bc2
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 19, 2024
3a5f3ea
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
ce79cec
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
55fef5f
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
6d2ea3e
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
d544e3e
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
7f2851a
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
7260a2b
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
8137ef4
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
32eb9b9
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
ef4d9d8
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
d3ca405
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
d965c44
Update r-colliderbias-hollywood.irnb
vsyrgkanis Jul 20, 2024
62716a1
Update r-colliderbias-hollywood.irnb
vsyrgkanis Jul 20, 2024
d1df00d
Update transform-R-to-Rmd.yml
vsyrgkanis Jul 20, 2024
9e99443
Update and rename transform-R-to-Rmd.yml to check-and-transform-R-not…
vsyrgkanis Jul 20, 2024
db62573
Update check-and-transform-R-notebooks.yml
vsyrgkanis Jul 20, 2024
5ad0ed9
Merged python actions into one for both PR and schedule
vsyrgkanis Jul 20, 2024
ce920f2
Update python-notebooks.yml
vsyrgkanis Jul 20, 2024
bc63d5c
updated the two test jobs
vsyrgkanis Jul 20, 2024
9f8a38f
updated name of jobs
vsyrgkanis Jul 20, 2024
cac2379
folder->directory in yaml file
vsyrgkanis Jul 20, 2024
031bc42
Strip outputs from .ipynb files in AC1
github-actions[bot] Jul 20, 2024
c36de39
Strip outputs from .ipynb files in PM3
github-actions[bot] Jul 20, 2024
d0e5e66
Strip outputs from .ipynb files in T
github-actions[bot] Jul 20, 2024
50afb74
Strip outputs from .ipynb files in AC2
github-actions[bot] Jul 20, 2024
efe6fff
Limit on push to only main branch
vsyrgkanis Jul 20, 2024
c4adbfc
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 20, 2024
a8ba9f8
Strip outputs from .ipynb files in PM4
github-actions[bot] Jul 20, 2024
b072d94
Strip outputs from .ipynb files in PM2
github-actions[bot] Jul 20, 2024
f915914
Added check for changes to .Rmd files.
vsyrgkanis Jul 20, 2024
906343d
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 20, 2024
46fb4e2
Update python-notebooks.yml
vsyrgkanis Jul 20, 2024
666d063
Update check-and-transform-R-notebooks.yml
vsyrgkanis Jul 20, 2024
3dd8654
Update check-and-transform-R-notebooks.yml
vsyrgkanis Jul 20, 2024
afa4dcf
checkout branch when in PR
vsyrgkanis Jul 20, 2024
1bbe9e0
Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execu…
github-actions[bot] Jul 20, 2024
9fa38c0
added fetch all
vsyrgkanis Jul 20, 2024
3b38875
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 20, 2024
433f75c
Update python-linear-model-overfitting.ipynb
vsyrgkanis Jul 20, 2024
ae0e802
Strip outputs from .ipynb files in PM1
github-actions[bot] Jul 20, 2024
bccceb4
Testing PR continuous integration
vsyrgkanis Jul 20, 2024
57742b0
Strip outputs from .ipynb files in PM1 [skip ci]
github-actions[bot] Jul 20, 2024
fc90b4d
Update r-colliderbias-hollywood.irnb
vsyrgkanis Jul 20, 2024
bd9fd7a
Update r-colliderbias-hollywood.irnb
vsyrgkanis Jul 20, 2024
b973e4b
Added new workflow
vsyrgkanis Jul 22, 2024
e68c336
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
345979b
Testing stripping
vsyrgkanis Jul 22, 2024
7e833a5
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
d75604a
Update r-linear-model-overfitting.irnb
vsyrgkanis Jul 22, 2024
51104f0
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
4b2cdbf
Strip outputs from .ipynb files [skip ci]
github-actions[bot] Jul 22, 2024
8937dfa
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
46f2319
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 22, 2024
d01e773
update strip action
vsyrgkanis Jul 22, 2024
24452bd
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
8c6e125
Testing strip
vsyrgkanis Jul 22, 2024
86339f6
Strip outputs from .ipynb files [skip ci]
github-actions[bot] Jul 22, 2024
c99e311
testing strip
vsyrgkanis Jul 22, 2024
ab55be2
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 22, 2024
15a85e3
Update python-linear-model-overfitting.ipynb
vsyrgkanis Jul 22, 2024
c8f6854
Strip outputs from .ipynb files [skip ci]
github-actions[bot] Jul 22, 2024
991ad5b
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
e013a5a
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 22, 2024
49b7d82
Update python-linear-model-overfitting.ipynb
vsyrgkanis Jul 22, 2024
380ecd5
Strip outputs from .ipynb files [skip ci]
github-actions[bot] Jul 22, 2024
ab0de70
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
dcd9ffd
Update strip-python-notebooks.yml
vsyrgkanis Jul 22, 2024
b40a21b
Update check-and-transform-R-notebooks.yml
vsyrgkanis Jul 22, 2024
ef0a50d
Merge branch 'transform-R-notebooks-to-Rmd' of https://github.com/Cau…
vsyrgkanis Jul 22, 2024
03c6bc8
Update python-notebooks.yml
vsyrgkanis Jul 22, 2024
a59ea99
Update python-notebooks.yml
vsyrgkanis Jul 22, 2024
b423c6b
Removed .Rmd files
vsyrgkanis Jul 22, 2024
70324bd
Rename check-and-transform-R-notebooks.yml to check-R-notebooks.yml
vsyrgkanis Jul 22, 2024
8661df3
Rename python-notebooks.yml to check-python-notebooks.yml
vsyrgkanis Jul 22, 2024
842cd18
Rename strip-python-notebooks.yml to transform-notebooks.yml
vsyrgkanis Jul 22, 2024
c38efaa
re-committing old deprecated .Rmd files
vsyrgkanis Jul 22, 2024
7f30063
Create r-colliderbias-hollywood.irnb.Rmd
vsyrgkanis Jul 22, 2024
0e04131
recommitting old
vsyrgkanis Jul 22, 2024
ac8b293
recommitting old
vsyrgkanis Jul 22, 2024
a29c315
ολδ
vsyrgkanis Jul 22, 2024
730134e
ολδ
vsyrgkanis Jul 22, 2024
72abcaa
old
vsyrgkanis Jul 22, 2024
edc2401
Create automl-for-wage-prediction.irnb.Rmd
vsyrgkanis Jul 22, 2024
774266c
old
vsyrgkanis Jul 22, 2024
3bdbc74
old
vsyrgkanis Jul 22, 2024
6066677
Create dml-for-conditional-average-treatment-effect.irnb.Rmd
vsyrgkanis Jul 22, 2024
93e00a2
Merge branch 'main' into transform-R-notebooks-to-Rmd
vsyrgkanis Jul 22, 2024
5413524
Create ml-for-wage-prediction.irnb.Rmd
vsyrgkanis Jul 22, 2024
4223a52
old
vsyrgkanis Jul 22, 2024
d2fa69b
pattern matching only to highlevel dir
vsyrgkanis Jul 22, 2024
d2eed80
Merge branch 'main' into transform-R-notebooks-to-Rmd
vsyrgkanis Jul 22, 2024
bb9544a
Update check-python-notebooks.yml
vsyrgkanis Jul 23, 2024
7aae3c3
Email sending after tests
vsyrgkanis Jul 23, 2024
f7cdd42
updated title
vsyrgkanis Jul 23, 2024
47d31d4
testing failures
vsyrgkanis Jul 23, 2024
8cc642a
testing error reporting
vsyrgkanis Jul 23, 2024
82a37ec
Update check-R-notebooks.yml
vsyrgkanis Jul 23, 2024
a1ec9f0
update R workflow
vsyrgkanis Jul 23, 2024
1bd344b
Update check-R-notebooks.yml
vsyrgkanis Jul 23, 2024
a7742b5
Update check-R-notebooks.yml
vsyrgkanis Jul 23, 2024
8a7b4f6
Update check-R-notebooks.yml
vsyrgkanis Jul 23, 2024
fd68b29
Update r-rct-penn-precision-adj.irnb
vsyrgkanis Jul 23, 2024
66d6898
sending emails only for scheduled triggers
vsyrgkanis Jul 23, 2024
66f458f
Update check-R-notebooks.yml
vsyrgkanis Jul 23, 2024
b35567d
Update transform-notebooks.yml
vsyrgkanis Jul 29, 2024
1db7dd4
Update transform-notebooks.yml
vsyrgkanis Jul 30, 2024
406b77f
update to keras3 for compatibility with newst R (see https://github.c…
OliverSchacht Jul 31, 2024
3a3a442
revert last commit
OliverSchacht Aug 1, 2024
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
307 changes: 307 additions & 0 deletions .github/workflows/check-R-notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
name: Check R Notebooks

on:
pull_request:
branches:
- main
schedule:
- cron: '0 12 * * 0' # Runs every Sunday at 12 PM UTC

concurrency:
group: test-R-notebooks-${{ github.ref }}
cancel-in-progress: true

jobs:
test-R-notebooks:
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['PM1', 'PM2', 'PM3', 'PM4', 'PM5', 'CM1', 'CM2', 'CM3', 'AC1', 'AC2', 'T']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

- name: Find changed notebooks in PR
if: github.event_name == 'pull_request'
id: find_notebooks_pr
run: |
# git fetch origin ${{ github.event.pull_request.base.ref }} ${{ github.event.pull_request.head.ref }}
# git diff --name-only origin/${{ github.event.pull_request.base.ref }}...origin/${{ github.event.pull_request.head.ref }} > changed_files.txt
git diff --name-only -r HEAD^1 HEAD > changed_files.txt
if grep -q -E '^${{ matrix.directory }}/[^/]+\.Rmd$' changed_files.txt; then
echo "Changing directly the .Rmd files is prohibited. You should only be changing the .irnb files"
echo "The .Rmd files will be automatically generated and updated when the PR is merged in the main branch"
echo "It seems that you changed directly the following files:"
grep -E '^${{ matrix.directory }}/[^/]+\.Rmd$' changed_files.txt
exit 1
fi
grep -E '^${{ matrix.directory }}/[^/]+\.irnb$|^${{ matrix.directory }}/.*\.R|\.github/workflows/check-and-transform-R-notebooks.yml$' changed_files.txt > changed_notebooks.txt || echo "No notebooks changed" > changed_notebooks.txt

- name: Find changed notebooks in Push
if: github.event_name == 'push'
id: find_notebooks_push
run: |
git diff --name-only ${{ github.event.before }} ${{ github.event.after }} > changed_files.txt
grep -E '^${{ matrix.directory }}/[^/]+\.irnb$|^${{ matrix.directory }}/.*\.R|\.github/workflows/check-and-transform-R-notebooks.yml$' changed_files.txt > changed_notebooks.txt || echo "No notebooks changed" > changed_notebooks.txt

- name: Check if any notebooks changed in PR or Push
if: (github.event_name == 'push') || (github.event_name == 'pull_request')
id: check_notebooks
run: |
cat changed_notebooks.txt
if grep -q -E '^${{ matrix.directory }}/[^/]+\.irnb$|^${{ matrix.directory }}/.*\.R|\.github/workflows/check-and-transform-R-notebooks.yml$' changed_notebooks.txt; then
echo "notebooks_changed=true" >> $GITHUB_ENV
else
echo "notebooks_changed=false" >> $GITHUB_ENV
echo "No R notebooks changed in folder ${{ matrix.directory }} in this PR."
fi

- name: Set notebooks changed to true for schedule
if: "! ((github.event_name == 'push') || (github.event_name == 'pull_request'))"
id: set_check_notebooks_true
run: |
# we run all folders if it is the weekly scheduled run to
# check if something broke due to changes in dependencies
echo "notebooks_changed=true" >> $GITHUB_ENV

- name: Install system dependencies
if: env.notebooks_changed == 'true'
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev

- name: Set up Python
if: env.notebooks_changed == 'true'
uses: actions/setup-python@v2
with:
python-version: '3.10' # Specify your Python version here

- name: Install Python dependencies
if: env.notebooks_changed == 'true'
run: |
python -m pip install --upgrade pip
pip install nbstripout
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
shell: bash

- name: Set up R
if: env.notebooks_changed == 'true'
uses: r-lib/actions/setup-r@v2

- name: Install rmarkdown, knitr, and lintr packages
if: env.notebooks_changed == 'true'
run: |
R -e 'install.packages(c("rmarkdown", "knitr", "lintr", "xfun", "remotes"), repos="https://cloud.r-project.org")'

- name: Strip outputs from .irnb files
if: env.notebooks_changed == 'true'
run: |
for notebook in ${{ matrix.directory }}/*.irnb; do
ipynb_notebook="${notebook%.irnb}.ipynb"
mv "$notebook" "$ipynb_notebook"
nbstripout "$ipynb_notebook"
mv "$ipynb_notebook" "$notebook"
done

- name: Convert .irnb to .Rmd and .R
if: env.notebooks_changed == 'true'
run: |
R -e '
files <- list.files(path = "${{ matrix.directory }}", pattern = "\\.irnb$", full.names = TRUE, recursive = FALSE)
lapply(files, function(input) {
rmarkdown::convert_ipynb(input)
rmd_file <- xfun::with_ext(input, "Rmd")
knitr::purl(rmd_file, output = xfun::with_ext(input, "R"))
})
'

- name: Lint .Rmd files
if: env.notebooks_changed == 'true'
id: lint
run: |
R -e '
library(lintr)
linters <- with_defaults(line_length_linter = line_length_linter(120),
object_name_linter = object_name_linter(styles = c("snake_case", "CamelCase", "camelCase")),
object_usage_linter = NULL)
rmd_files <- list.files(path = "${{ matrix.directory }}", pattern = "\\.Rmd$", full.names = TRUE)
linting_error <- FALSE
for (rfile in rmd_files) {
lints <- lint(rfile, linters)
if (length(lints) > 0) {
cat("Warnings found during linting:\n")
print(lints)
# stop("Linting failed with warnings")
linting_error <- TRUE
}
}
if (linting_error) {
writeLines("linting_errors_found=true", "linting_errors_check.txt")
} else {
writeLines("linting_errors_found=false", "linting_errors_check.txt")
}
'

- name: Publish result of linting error check
if: env.notebooks_changed == 'true'
run: |
cat linting_errors_check.txt >> $GITHUB_ENV
rm linting_errors_check.txt

- name: Execute R scripts and log output
if: "((env.notebooks_changed == 'true') && (env.linting_errors_found == 'false'))"
id: execute
run: |
log_file="${{ matrix.directory }}_r_script_execution.log"
R -e '
options(show.error.locations = TRUE)
files <- list.files(path = "${{ matrix.directory }}", pattern = "\\.R$", full.names = TRUE, recursive = FALSE)
log_con <- file("'$log_file'", open = "wt")
sink(log_con, type = "output")
sink(log_con, type = "message")
errors <- list()
for (gitrfile in files) {
withCallingHandlers(
withRestarts(
source(gitrfile),
muffleStop = function() NULL
),
error = function(e) {
traceback_info <- sys.calls()
errors[[length(errors) + 1]] <<- list(gitrfile = gitrfile, location = capture.output(print(e$call)), message = e$message, traceback = traceback_info)
invokeRestart("muffleStop")
}
)
}
sink(type = "output")
sink(type = "message")
close(log_con)
if (length(errors) > 0) {
writeLines("errors_found=true", "errors_check.txt")
for (error in errors) {
cat("Error found in file:", error$gitrfile, "\n")
cat("at line::", error$location, "\n")
cat("Error message:", error$message, "\n")
print("Traceback:\n")
cat(paste(error$traceback, collapse = "\n"))
print("\n")
}
# quit(status = 1, save = "no") # Exit with an error status if errors are found
} else {
writeLines("errors_found=false", "errors_check.txt")
}
' 2>/dev/null
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Upload execution log
if: "((env.notebooks_changed == 'true') && (env.linting_errors_found == 'false'))"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.directory }}-r-script-execution-log
path: ${{ matrix.directory }}_r_script_execution.log

- name: Zip .R files
if: env.notebooks_changed == 'true'
run: |
mkdir r_scripts
mv ${{ matrix.directory }}/*.R r_scripts/
zip -r ${{ matrix.directory }}_r_scripts.zip r_scripts

- name: Upload artifact
if: env.notebooks_changed == 'true'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.directory }}-r-scripts
path: ${{ matrix.directory }}_r_scripts.zip

- name: Delete .R files and zip
if: env.notebooks_changed == 'true'
run: |
rm -rf r_scripts
rm ${{ matrix.directory }}_r_scripts.zip

- name: Publish result of error check
if: "((env.notebooks_changed == 'true') && (env.linting_errors_found == 'false'))"
run: |
cat errors_check.txt >> $GITHUB_ENV
rm errors_check.txt

- name: Send failure mail
if: "((github.event_name == 'schedule') && (env.notebooks_changed == 'true') && ((env.linting_errors_found == 'true') || (env.errors_found == 'true')))"
uses: dawidd6/action-send-mail@v3
with:
# Required mail server address if not connection_url:
server_address: smtp.gmail.com
# Server port, default 25:
server_port: 465
# Optional whether this connection use TLS (default is true if server_port is 465)
secure: true
# Optional (recommended) mail server username:
username: ${{secrets.MAIL_USERNAME}}
# Optional (recommended) mail server password:
password: ${{secrets.MAIL_PASSWORD}}
# Required mail subject:
subject: FAILURE R (${{matrix.directory}}) test Github Action job failed!
# Required recipients' addresses:
to: [email protected]
# Required sender full name (address can be skipped):
from: GA-MetricsML-Notebooks <[email protected]>
# Optional plain body:
body: R notebook tests of directory ${{matrix.directory}} in Git repo ${{github.repository}} failed.
ignore_cert: true

- name: fail if errors
if: "((env.notebooks_changed == 'true') && ((env.linting_errors_found == 'true') || (env.errors_found == 'true')))"
run: exit 1

- name: Send success mail
if: "((github.event_name == 'schedule') && (env.notebooks_changed == 'true'))"
uses: dawidd6/action-send-mail@v3
with:
# Required mail server address if not connection_url:
server_address: smtp.gmail.com
# Server port, default 25:
server_port: 465
# Optional whether this connection use TLS (default is true if server_port is 465)
secure: true
# Optional (recommended) mail server username:
username: ${{secrets.MAIL_USERNAME}}
# Optional (recommended) mail server password:
password: ${{secrets.MAIL_PASSWORD}}
# Required mail subject:
subject: SUCCESS R (${{matrix.directory}}) test Github Action job succeeded!
# Required recipients' addresses:
to: [email protected]
# Required sender full name (address can be skipped):
from: GA-MetricsML-Notebooks <[email protected]>
# Optional plain body:
body: R notebook tests of directory ${{matrix.directory}} in Git repo ${{github.repository}} succedded.
ignore_cert: true

# - name: Check out the branch for pull request
# if: "(github.event_name == 'pull_request') && (env.notebooks_changed == 'true')"
# run: |
# git fetch --all
# git checkout ${{ github.event.pull_request.head.ref }}

# - name: Check if there are any changes
# if: env.notebooks_changed == 'true'
# id: verify_diff
# run: |
# git pull
# git diff --quiet ${{ matrix.directory }}/*.irnb ${{ matrix.directory }}/*.Rmd || echo "changed=true" >> $GITHUB_OUTPUT

# - name: Commit and push stripped .irnb and .Rmd files
# if: "(env.notebooks_changed == 'true') && (steps.verify_diff.outputs.changed == 'true')"
# run: |
# git config --global user.name 'github-actions[bot]'
# git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# git pull
# git add ${{ matrix.directory }}/*.irnb ${{ matrix.directory }}/*.Rmd
# git commit -m 'Strip outputs from .irnb, convert to .Rmd, lint .Rmd files, and execute .R files in ${{ matrix.directory }} [skip ci]'
# git push --force-with-lease
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading