mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
159 stars 52 forks source link

Fix to issue #182 #183

Closed Max-Bladen closed 2 years ago

Max-Bladen commented 2 years ago

Within the helpers.R file for tests, added the .quiet() function which prevents any calls to cat() or print() within a function from being printed. Also set progressBar = FALSE where needed. Changed the seed with test_tune.spls.R such that the algorithm converged and didn't raise a warning.

This allows for a much cleaner output when running tests and prevents confusion when trying to debug an issue

Max-Bladen commented 2 years ago

The main reason I pushed this fix was due to the inconsistency with which these outputs were shown. It was ambiguous where they were being produced from and caused formatting errors within the check logs, making resolving unrelated issues more time consuming. I am currently working on a large overhaul/expansion of the tests (PR #206) and will include these types of parameters as part of it

Max-Bladen commented 2 years ago

Also, the printing output can be tested without it showing in the log which in my opinion would be preferable. Rather than setting progress = FALSE (as was done here for simplicity), the quiet() function (or something similar) can enclose an expect_ ...() call such that we can test for specific printed output while keeping the logs uncluttered

aljabadi commented 2 years ago

Looks good @Max-Bladen. Feel free to merge it once you're ready