software-review icon indicating copy to clipboard operation
software-review copied to clipboard

World Magnetic Model (WMM)

Open wfrierson opened this issue 3 years ago • 57 comments
trafficstars

Submitting Author Name: Will Frierson Submitting Author Github Handle: @wfrierson Repository: https://github.com/wfrierson/wmm Version submitted: 1.1.1 Submission type: Standard Editor: @maelle Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en

  • Paste the full DESCRIPTION file inside a code block below:
Package: wmm
Type: Package
Title: World Magnetic Model
Version: 1.1.1
Authors@R: person("Will", "Frierson", email = "[email protected]",
  role = c("aut", "cre"))
Maintainer: Will Frierson <[email protected]>
Description: Calculate magnetic field at a given location and time according to 
  the World Magnetic Model (WMM). Both the main field and secular variation 
  components are returned. This functionality is useful for physicists and 
  geophysicists who need orthogonal components from WMM. Currently, this package 
  supports annualized time inputs between 2000 and 2025. If desired, users can
  specify which WMM version to use, e.g., the original WMM2015 release or the 
  recent out-of-cycle WMM2015 release. Methods used to implement WMM, including 
  the Gauss coefficients for each release, are described in the following 
  publications: Chulliat et al (2020) <doi:10.25923/ytk1-yx35>,
  Chulliat et al (2019) <doi:10.25921/xhr3-0t19>, 
  Chulliat et al (2015) <doi:10.7289/V5TB14V7>, 
  Maus et al (2010) <https://www.ngdc.noaa.gov/geomag/WMM/data/WMMReports/WMM2010_Report.pdf>, 
  McLean et al (2004) <https://www.ngdc.noaa.gov/geomag/WMM/data/WMMReports/TRWMM_2005.pdf>,
  and Macmillian et al (2000) <https://www.ngdc.noaa.gov/geomag/WMM/data/WMMReports/wmm2000.pdf>.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: 
  R (>= 2.10)
RoxygenNote: 6.1.1
Suggests:
  testthat (>= 2.0.1),
  data.table (>= 1.12.2)
URL: https://github.com/wfrierson/wmm
BugReports: https://github.com/wfrierson/wmm/issues
Language: en-US

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • [X] data retrieval
    • [ ] data extraction
    • [X] data munging
    • [ ] data deposition
    • [ ] workflow automation
    • [ ] version control
    • [ ] citation management and bibliometrics
    • [ ] scientific software wrappers
    • [ ] field and lab reproducibility tools
    • [ ] database software bindings
    • [ ] geospatial data
    • [ ] text analysis
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences): The wmm package retrieves magnetic field components given a location and time. I'm including "data munging" as recommended by @noamross (link).

  • Who is the target audience and what are scientific applications of this package? Physicists, geophysicists, & navigators could find the magnetic field components useful. Geo/physics students could find the construction of the magnetic field components helpful to their understanding.

  • Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category? To my knowledge, the most similar package is oce which has the function magnetic.declination that uses NOAA's WMM coefficients. However, the oce package does not provide magnetic field components, which are included in wmm.

  • (If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research? n/a

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted. Pre-submission inquiry: https://github.com/ropensci/software-review/issues/461

  • Explain reasons for any pkgcheck items which your package is unable to pass. As noted in the pre-submission inquiry, I could not get pkgcheck to work. However, I read the guidelines associated with pkgcheck and I think wmm complies.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • [X] Do you intend for this package to go on CRAN?

  • [ ] Do you intend for this package to go on Bioconductor?

  • [ ] Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:

MEE Options
  • [ ] The package is novel and will be of interest to the broad readership of the journal.
  • [ ] The manuscript describing the package is no longer than 3000 words.
  • [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

  • [X] I agree to abide by rOpenSci's Code of Conduct during the review process and in maintaining my package should it be accepted.

wfrierson avatar Mar 27 '22 23:03 wfrierson

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot avatar Mar 27 '22 23:03 ropensci-review-bot

Checks for wmm (v1.1.1)

git hash: 0fe1132f

  • :heavy_check_mark: Package is already on CRAN.
  • :heavy_multiplication_x: does not have a 'codemeta.json' file.
  • :heavy_multiplication_x: does not have a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_multiplication_x: Package has no HTML vignettes
  • :heavy_multiplication_x: These functions do not have examples: [.CalcLegendre, .CalcLegendreComponents, .CalcPolynomialComponents, .CalculateGaussCoef, .CalculateGeocentricFieldSum, .CalculateMagneticElements, .CalculateMagneticField, .CalculateRadiusCurvature, .CheckBlackoutZone, .CheckVersionWMM, .ConvertGeocentricToGeodeticFieldComponents, .ConvertGeodeticToGeocentricGPS, .DeriveVersionInfo, wmm].
  • :heavy_multiplication_x: Package has no continuous integration checks.
  • :heavy_check_mark: Package coverage is 90.7%.
  • :heavy_check_mark: R CMD check found no errors.
  • :heavy_check_mark: R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: MIT + file LICENSE


1. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 6 files) and
  • 1 authors
  • no vignette
  • no internal data file
  • 1 imported package
  • 14 exported functions (median 15 lines of code)
  • 15 non-exported functions in R (median 22 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 6 40.3
files_vignettes 0 0.0 TRUE
files_tests 4 79.0
loc_R 345 36.3
loc_tests 186 53.2
num_vignettes 0 0.0 TRUE
n_fns_r 29 39.2
n_fns_r_exported 14 56.3
n_fns_r_not_exported 15 32.7
n_fns_per_file_r 2 43.8
num_params_per_fn 2 11.9
loc_per_fn_r 17 52.0
loc_per_fn_r_exp 15 35.6
loc_per_fn_r_not_exp 22 66.9
rel_whitespace_R 21 43.1
rel_whitespace_tests 9 31.9
doclines_per_fn_exp 15 6.0
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 11 34.5

1a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


2. goodpractice and other checks

Details of goodpractice and other checks (click to open)


3b. goodpractice results

R CMD check with rcmdcheck

rcmdcheck found no errors, warnings, or notes

Test coverage with covr

Package coverage: 90.68

Cyclocomplexity with cyclocomp

No functions have cyclocomplexity >= 15

Static code analyses with lintr

lintr found the following 39 potential issues:

message number of times
Lines should not be more than 80 characters. 38
Use <-, not =, for assignment. 1

Package Versions

package version
pkgstats 0.0.3.94
pkgcheck 0.0.2.275

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Mar 28 '22 08:03 ropensci-review-bot

Dear @wfrierson, thank you for your submission following your pre-submission.

Could you address the issues regarding the codemeta.json file, the contributing file, the vignette(s), and the examples. I see that you have continuous integration checks on Travis-CI so this X can be ignored. Please see the packaging guide and feel free to ask any questions if you need help. Thanks, Julia

jooolia avatar Apr 01 '22 11:04 jooolia

Dear @wfrierson, Do you have any updates here? If I do not hear back from you in a week I will close this issue (but feel free to reopen). Thanks, Julia

jooolia avatar Apr 29 '22 08:04 jooolia

Thanks, Julia. Sorry for the delay! I'm working on these now.

Re: the examples, all the listed functions with a '.' prefix are not exported (and therefore not intended for end users). I added roxygen frameworks for these functions for curious users. The last 'wmm' reference is for the package-level wmm.R file, i.e., it's not a function.

Do I still need examples for these?

wfrierson avatar Apr 29 '22 21:04 wfrierson

Hi @wfrierson, Thanks for the update. Regarding the functions without examples, if you add the Roxygen "@keywords internal" to these functions then this check should be ok for your "." fucntions.

Thanks, Julia

jooolia avatar May 01 '22 08:05 jooolia

One minor update on @jooolia's comment: the rOpenSci DevGuide recommends using @noRd instead of @Keywords internal.

mpadge avatar May 02 '22 07:05 mpadge

Hello @wfrierson, Do you have any updates on your submission? Do you need any support from our side? Thanks, Julia

jooolia avatar Jun 03 '22 14:06 jooolia

Apologies for the delay. I'm updating my package on CRAN to be consistent with the ropensci changes and am waiting for their approval. I'll check on its status since it's been awhile.

  • Will

On Fri, Jun 3, 2022, 7:28 AM Julia Gustavsen @.***> wrote:

Hello @wfrierson https://github.com/wfrierson, Do you have any updates on your submission? Do you need any support from our side? Thanks, Julia

— Reply to this email directly, view it on GitHub https://github.com/ropensci/software-review/issues/522#issuecomment-1146021195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYZJLM44WIISXSSJT5XK5DVNII6ZANCNFSM5RZPSZPQ . You are receiving this because you were mentioned.Message ID: @.***>

wfrierson avatar Jun 03 '22 16:06 wfrierson

thanks @wfrierson! let us know when you get some updates.

jooolia avatar Jun 10 '22 07:06 jooolia

@jooolia, is it possible for my latest changes to be reviewed before I submit to CRAN? If I submit to CRAN and then realize I missed something for ropensci, the CRAN volunteers will be less than excited to review a 2nd submission within the same month.

My changes to be compliant with ropensci are in the ropensci_updates branch (link).

wfrierson avatar Jun 12 '22 01:06 wfrierson

Hi @wfrierson, I had a quick look and most of the issues appear to be fixed (I don't know why our CI checks are not being picked up, I will ask the other editors). Let me know when your changes will be merged into main and then I will find a handling editor who can then start looking for reviewers. Cheers, Julia

jooolia avatar Jun 14 '22 18:06 jooolia

Ok, will do. Thanks!

On Tue, Jun 14, 2022, 11:38 AM Julia Gustavsen @.***> wrote:

Hi @wfrierson https://github.com/wfrierson, I had a quick look and most of the issues appear to be fixed (I don't know why our CI checks are not being picked up, I will ask the other editors). Let me know when your changes will be merged into main and then I will find a handling editor who can then start looking for reviewers. Cheers, Julia

— Reply to this email directly, view it on GitHub https://github.com/ropensci/software-review/issues/522#issuecomment-1155588103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKYZJLIQKPESC4SRZGOFDA3VPDGQ5ANCNFSM5RZPSZPQ . You are receiving this because you were mentioned.Message ID: @.***>

wfrierson avatar Jun 14 '22 18:06 wfrierson

@jooolia, I've merged the feature branch into main. Let me know if there are any questions.

Thanks again!

wfrierson avatar Jun 14 '22 22:06 wfrierson

@ropensci-review-bot check package

jooolia avatar Jun 15 '22 20:06 jooolia

Thanks, about to send the query.

ropensci-review-bot avatar Jun 15 '22 20:06 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Jun 15 '22 20:06 ropensci-review-bot

Oops, something went wrong with our automatic package checks. Our developers have been notified and package checks will appear here as soon as we've resolved the issue. Sorry for any inconvenience.

ropensci-review-bot avatar Jun 15 '22 20:06 ropensci-review-bot

Hi, I am going to ask about what is going on with the bot.

jgustavsen avatar Jun 16 '22 14:06 jgustavsen

@ropensci-review-bot check package

jooolia avatar Jun 17 '22 08:06 jooolia

Thanks, about to send the query.

ropensci-review-bot avatar Jun 17 '22 08:06 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Jun 17 '22 08:06 ropensci-review-bot

Oops, something went wrong with our automatic package checks. Our developers have been notified and package checks will appear here as soon as we've resolved the issue. Sorry for any inconvenience.

ropensci-review-bot avatar Jun 17 '22 08:06 ropensci-review-bot

Hello, @mpadge will be looking into this later. Cheers, Julia

jooolia avatar Jun 17 '22 08:06 jooolia

Checks for wmm (v1.1.2)

git hash: d9d4a37a

  • :heavy_check_mark: Package is already on CRAN.
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_multiplication_x: These functions do not have examples: [.CalcLegendre, .CalcLegendreComponents, .CalcPolynomialComponents, .CalculateGaussCoef, .CalculateGeocentricFieldSum, .CalculateMagneticElements, .CalculateMagneticField, .CalculateRadiusCurvature, .CheckBlackoutZone, .CheckVersionWMM, .ConvertGeocentricToGeodeticFieldComponents, .ConvertGeodeticToGeocentricGPS, .DeriveVersionInfo].
  • :heavy_multiplication_x: Package has no continuous integration checks.
  • :heavy_check_mark: Package coverage is 90.7%.
  • :heavy_multiplication_x: Package has renv activated
  • :heavy_check_mark: R CMD check found no errors.
  • :heavy_check_mark: R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 43
internal stats 1
imports NA NA
suggests testthat NA
suggests data.table NA
suggests knitr NA
suggests rmarkdown NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

list (12), sqrt (4), t (4), sin (3), atan2 (2), cos (2), do.call (2), length (2), outer (2), asin (1), if (1), mode (1), rbind (1), rowSums (1), seq (1), seq_along (1), union (1), vector (1), with (1)

stats

time (1)

NOTE: No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 6 files) and
  • 1 authors
  • 1 vignette
  • no internal data file
  • 1 imported package
  • 14 exported functions (median 15 lines of code)
  • 15 non-exported functions in R (median 22 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 6 40.3
files_vignettes 2 85.7
files_tests 4 79.0
loc_R 345 36.3
loc_vignettes 62 12.8
loc_tests 186 53.2
num_vignettes 1 64.8
n_fns_r 29 39.2
n_fns_r_exported 14 56.3
n_fns_r_not_exported 15 32.7
n_fns_per_file_r 2 43.8
num_params_per_fn 2 11.9
loc_per_fn_r 17 52.0
loc_per_fn_r_exp 15 35.6
loc_per_fn_r_not_exp 22 66.9
rel_whitespace_R 21 43.1
rel_whitespace_vignettes 85 40.8
rel_whitespace_tests 9 31.9
doclines_per_fn_exp 15 6.0
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 11 34.5

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)


3b. goodpractice results

R CMD check with rcmdcheck

rcmdcheck found no errors, warnings, or notes

Test coverage with covr

Package coverage: 90.68

Cyclocomplexity with cyclocomp

No functions have cyclocomplexity >= 15

Static code analyses with lintr

lintr found the following 39 potential issues:

message number of times
Lines should not be more than 80 characters. 38
Use <-, not =, for assignment. 1

4. Other Checks

Details of other checks (click to open)


Package Versions

package version
pkgstats 0.0.4.89
pkgcheck 0.0.3.62

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Jun 17 '22 10:06 ropensci-review-bot

@jooolia Our automated system only checks for continuous integration on GitHub. This package uses travis for CI, so that failing check may be ignored. (We officially advise using alternatives to travis, but that advice itself may need updating?)


Edit: rOpenSci's updated statement on travis is here.

mpadge avatar Jun 17 '22 10:06 mpadge

@jooolia, I just realized that I didn't update the NAMESPACE to reflect the @noRd changes. This is resolved in the latest commit. My apologies for that!

I see that ropensci-review-bot has noted the renv library. wmm is pure R, but I use renv for the packages used for unit tests. When installed from CRAN, no other packages are installed (noted in the DESCRIPTION file). Do I really need to remove renv?

wfrierson avatar Jun 20 '22 00:06 wfrierson

@wfrierson No, you don't need to remove renv, just deactivate it. That only changes the local .Rprofile file by commenting out the source line. Alternatively, just remove that file from the repo and keep a local version only.

mpadge avatar Jun 20 '22 09:06 mpadge

Thanks, @mpadge!

@jooolia, I've deactivated renv, which should be the last requested change. Are there any other changes needed?

wfrierson avatar Jun 25 '22 21:06 wfrierson

Hi @wfrierson, To me it is looking good. I will look for a handling editor who can then look for reviewers. Thanks!

@mpadge do you know why the internal functions are coming up as not having examples? This is why I suggested using "@keyword internal" because then for me the check was ok with pkgcheck(https://github.com/ropensci/software-review/issues/522#issuecomment-1114566751). Do you see the issue why it is not working with “@noRd“?

jooolia avatar Jun 27 '22 06:06 jooolia