Bioconductor / BiocCheck

http://bioconductor.org/packages/BiocCheck
8 stars 26 forks source link

`BiocCheck` reports false function lengths #183

Closed kakopo closed 1 year ago

kakopo commented 1 year ago

I am running BiocCheck on the BSgenomeForge package which has the following output:

> BiocCheck::BiocCheck("BSgenomeForge")
─ BiocCheckVersion: 1.35.9
─ BiocVersion: 3.17
─ Package: BSgenomeForge
─ PackageVersion: 0.99.0
─ sourceDir: /home/dell/Documents/GitHub/BSgenomeForge
─ installDir: /tmp/Rtmp6Hqmhx/file36bb5373b1d4
─ BiocCheckDir: /home/dell/Documents/GitHub/BSgenomeForge.BiocCheck
─ platform: unix
─ isTarBall: FALSE

* Installing package...
* Checking for deprecated package usage...
* Checking for remote package usage...
* Checking for 'LazyData: true' usage...
* Checking version number...
* Checking version number validity...
    Package version 0.99.0; pre-release
* Checking R version dependency...
* Checking package size...
      Skipped... only checked on source tarball
* Checking individual file sizes...
* Checking biocViews...
* Checking that biocViews are present...
* Checking package type based on biocViews...
    Software
* Checking for non-trivial biocViews...
* Checking that biocViews come from the same category...
* Checking biocViews validity...
* Checking for recommended biocViews...
* Checking build system compatibility...
* Checking for blank lines in DESCRIPTION...
* Checking if DESCRIPTION is well formatted...
* Checking for proper Description: field...
* Checking for whitespace in DESCRIPTION field names...
* Checking that Package field matches directory/tarball name...
* Checking for Version field...
* Checking for valid maintainer...
    * NOTE: Consider adding the maintainer's ORCID iD in 'Authors@R'
      with 'comment=c(ORCID="...")'
* Checking License: for restrictive use...
* Checking for pinned package versions...
* Checking DESCRIPTION/NAMESPACE consistency...
* Checking .Rbuildignore...
* Checking for stray BiocCheck output folders...
* Checking for inst/doc folders...
* Checking vignette directory...
* Checking package installation calls in R code...
* Checking for library/require of BSgenomeForge...
* Checking coding practice...
* Checking parsed R code in R directory, examples, vignettes...
* Checking function lengths...
    * NOTE: The recommended function length is 50 lines or less. There
      are 30 functions greater than 50 lines.
* Checking man page documentation...
* Checking package NEWS...
* Checking unit tests...
* Checking skip_on_bioc() in tests...
* Checking formatting of DESCRIPTION, NAMESPACE, man pages, R source,
  and vignette source...
    * NOTE: Consider shorter lines; 3 lines (0%) are > 80 characters
      long.
    * NOTE: Consider multiples of 4 spaces for line indents; 222 lines
      (17%) are not.
    See https://contributions.bioconductor.org/r-code.html
    See styler package: https://cran.r-project.org/package=styler as
      described in the BiocCheck vignette.
* Checking if package already exists in CRAN...
* Checking for bioc-devel mailing list subscription...
    * NOTE: Cannot determine whether maintainer is subscribed to the
      Bioc-Devel mailing list (requires admin credentials). Subscribe
      here: https://stat.ethz.ch/mailman/listinfo/bioc-devel
* Checking for support site registration...
    Maintainer is registered at support site.
    Package name is in support site watched tags.

─ BiocCheck results ──
0 ERRORS | 0 WARNINGS | 5 NOTES

See the BSgenomeForge.BiocCheck folder and run
    browseVignettes(package = 'BiocCheck')
for details.

The information in the 00BiocCheck.log regarding the issue is more detailed, as shown below;

* Checking function lengths...
* NOTE: The recommended function length is 50 lines or less. There are 30 functions greater than 50 lines.
The longest 5 functions are:
forgeBSgenomeDataPkgFromUCSC() (R/forgeBSgenomeDataPkgFromUCSC.R): 82 lines
forgeBSgenomeDataPkgFromNCBI() (R/forgeBSgenomeDataPkgFromNCBI.R): 75 lines
abbreviate_organism_name() (R/utils.R): 30 lines
get_circ_seqs_for_unregistered_assembly_or_genome() (R/utils.R): 29 lines
.sort_and_rename() (R/fastaTo2bit.R): 25 lines

Only 2 functions in the package are greater than 50 lines, and the package itself contains 30 functions exactly.

LiNk-NY commented 1 year ago

Hi Kirabo, Thanks for reporting. This was fixed here: https://github.com/Bioconductor/BiocCheck/pull/182/ Best, Marcel

hpages commented 1 year ago

@kakopo Looks like the reason we didn't get the fix is because for some reason the available version of BiocCheck (1.35.9) is lagging several versions behind the version on GitHub (1.35.12). See landing page https://bioconductor.org/packages/3.17/BiocCheck for currently available version. However, this will change today (maybe in the next 20 min or so) because, as indicated by the green LEDs on the build report here https://bioconductor.org/checkResults/3.17/bioc-LATEST/BiocCheck/, version 1.35.12 is about to propagate to the public repos.

Remember to provide your sessionInfo() when you report a bug so we know what package versions you used. Thanks!

LiNk-NY commented 1 year ago

Thanks Hervé,

FWIW the BiocCheck version is also included in the output (see line 2)

> BiocCheck::BiocCheck("BSgenomeForge")
─ BiocCheckVersion: 1.35.9

But sessionInfo() would be more comprehensive.