vegandevs / vegan

R package for community ecologists: popular ordination methods, ecological null models & diversity analysis
https://vegandevs.github.io/vegan/
GNU General Public License v2.0
436 stars 95 forks source link

CRAN breaking monitor #647

Open jarioksa opened 1 month ago

jarioksa commented 1 month ago

Next vegan release after 2.6-6 is scheduled to have changes that can break CRAN packages (discussion #645). This issue monitors breakage and the goal is to fix all these before the release. I run occasionally test of reverse dependencies agains CRAN release using tools package and post here the latest tests with comments. These tests are not completely fool-proof, but they are similar as ran by the CRAN team. 231 CRAN and Bioconductor packages depended on the vegan when 2.6-6 was released (but the number is volatile). I cannot build all reverse dependencies for reasons not dependent on vegan – Bioconductor packages are particularly painful.

Currently vegan master has these changes that can break other packages:

Here test changes against 2.6-6 with comments (last tested with vegan 2.6-7-181-g2466f4bd on 2024-07-04):

adonis

summary.cca

pca, ca & pco

There may also be cases where the use of defunct functions is not detected, because the code is not tested. From the CRAN point of view these do not bother us, but naturally that code should be fixed as well, because intended functionality fails. However, it is difficult to detect those cases. Scanning the reverse dependence test directory for possible cases of adonis found some packages that do not appear in the list above:

$ grep -l "adonis(" rdepends_*/00_pkg_src/*/R/*R | cut -d / -f 3,5
BiodiversityR/nested.npmanova.R
GUniFrac/GUniFrac.R
MicrobiotaProcess/method-binary_offspring.R
MicrobiotaProcess/method-mp_adonis_anosim.R
PCPS/FUN.ADONIS.R
QFASA/All_Rep_Code.R
RVAideMemoire/adonis.II.R
SigTree/adonis.tree.R
betaper/adonis_pertables.R
microbial/Functions.R
microbiomeExplorer/inter_module.R
multiWGCNA/diffModuleExpAnalysis.R
omicplotR/internal.R
smartsnp/smart_mva.R
smartsnp/smart_permanova.R

It seems that GUniFrac, PCPS, microbiomeExplorer, multiWGCNA and omicplot should be fixed and move from adonis to adonis2 although they do not fail in tests. Superficially it looks like most of these cases are trivial: internal structure is not accessed and all you need to do is to use vegan::adonis2. BiodiversityR (for adonis2), MicrobiotaProcess and QFASA seem to be OK, and the other packages are dealt with those that fail tests.