2DegreesInvesting/r2dii.climate.stress.test

Analyze the package systematically

maurolepore opened this issue · 0 comments

Relates to AB#3100

Before review, rOpenSci analyzes the quality of a package submission in a number of ways. That's done via pkgcheck::pkgcheck() but I found pkgcheck difficult to install so instead I bypass that package and call goodpractice::gp() directly. gp() detected a number of issue -- each of which could be tackled in its own issue/PR. Here is the report:

goodpractice::gp()

── GP r2dii.climate.stress.test ─────────────────────────────────────────

It is good practice to

✖ write unit tests for all functions, and all package code in
general. 86% of code lines are covered by test cases.

R/calculate_aum.R:19:NA
R/calculate.R:64:NA
R/calculate.R:99:NA
R/calculate.R:100:NA
R/check_and_filter_data.R:30:NA
... and 447 more lines

✖ add a "BugReports" field to DESCRIPTION, and point it to a
bug tracker. Many online code hosting services provide bug
trackers for free, https://github.com, https://gitlab.com,
etc.
✖ avoid long code lines, it is bad for readability. Also, many
people prefer editor windows that are about 80 characters
wide. Try make your lines shorter than 80 characters

R/annual_pd_change_company_sector.R:22:1
R/annual_pd_change_company_sector.R:23:1
R/annual_pd_change_sector_shock_year.R:19:1
R/annual_pd_change_sector_shock_year.R:20:1
R/apply_filters.R:37:1
... and 346 more lines

✖ avoid 1:length(...), 1:nrow(...), 1:ncol(...), 1:NROW(...)
and 1:NCOL(...) expressions. They are error prone and result
1:0 if the expression on the right hand side is zero. Use
seq_len() or seq_along() instead.

R/run_stress_test.R:73:33

✖ fix this R CMD check NOTE: Namespace in Imports field not
imported from: ‘config’ All declared Imports should be used.
─────────────────────────────────────────────────────────────────────────