ropensci-review-tools / srr

Software Review Roclets
https://docs.ropensci.org/srr/
Other
4 stars 2 forks source link

srr not parsing standards found in .Rmd files #40

Open abigailkeller opened 1 month ago

abigailkeller commented 1 month ago

Hi! I'm creating this issue related to my ROpenSci statistical software package submission (submission issue here, package repo here).

I am working on including probability distribution statistical standards, and I'm hoping to document some of these in the inst folder that contains Stan code of my model specifications (since this would be the easiest way to connect the standards to the probability distributions used in the package).

I created a .Rmd file in the inst folder (see here) that is rendered into the folder README on Github. However, srr does not seem to be parsing these two standards (PD1.0, PD2.0).

Similarly, I have one standard in the overall package README (see the associated .Rmd file here) that also does not get parsed by srr.

I'm wondering if you have any tips to ensure that srr is recognizing the documentation of these standards?

mpadge commented 1 month ago

Sorry for the inconvenience @abigailkeller. The above commits now catch all files in the inst/ directory, and also fix the small :bug: that prevented picking up your README.Rmd in the main directory.

library (srr)
packageVersion ("srr")
#> [1] '0.1.2.13'

path <- "/<local>/<path>/<to>/eDNAjoint"
srr_stats_pre_submit (path) # does nothing if no missing standards
rep <- srr_report (path, view = FALSE, roxygenise = FALSE)
#> ✔ Downloaded general standards
#> ✔ Downloaded bayesian standards
#> ✔ Downloaded distributions standards
#> processing file: filea68930bac4b2.Rmd
#> output file: filea68930bac4b2.knit.md
#> Output created: /tmp/Rtmp34XtPp/filea68930bac4b2.html

head (rep, 15)
#>  [1] "# srr report for [eDNAjoint](https://github.com/abigailkeller/eDNAjoint)"                       
#>  [2] ""                                                                                               
#>  [3] "[Click here for full text of all standards](https://stats-devguide.ropensci.org/standards.html)"
#>  [4] ""                                                                                               
#>  [5] ""                                                                                               
#>  [6] ""                                                                                               
#>  [7] "## Standards with `srrstats` tag"                                                               
#>  [8] ""                                                                                               
#>  [9] "**Numbers of standards:**"                                                                      
#> [10] "-  BS :  25  /  56"                                                                             
#> [11] "-  G :  40  /  68"                                                                              
#> [12] "-  PD :  4  /  14"                                                                              
#> [13] "- Total : 69 / 138"                                                                             
#> [14] ""                                                                                               
#> [15] ""

Created on 2024-05-31 with reprex v2.1.0

No standards missing, and the three extra ones now successfully picked up. With that, you'll be able to call check package in the software review issue yourself to get the updated report - but not until I comment again here to let you know that our system has been rebuilt with the above changes. That might take until early next week, alas, so please bear with me.

mpadge commented 1 month ago

Note to self: Had to switch off windows tests which now fail because of these lines: https://github.com/ropensci-review-tools/srr/blob/f751305a91c5b967b232d0a28fbd88108d332c8a/R/roclet.R#L242-L244

TODO:

Fix to accommodate windows path as well ("\", not just "/"), and reinstate all tests on windows.