-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement for #205 #206
Enhancement for #205 #206
Conversation
test: first commit to trial the new test system which draws the ground truth values from external RData files
Hey @aljabadi I'd love your feedback for this PR as I'm still in the early stages of it and any changes you suggest would be better now rather than later. For a given test case (that isnt testing for a specific error), rather than just testing for a single numeric output, example:
I am saving the entire output to a repo (found here) and loading it in within each test and testing the function against that entire output object, example:
where My rationale is that when testing for individual numeric values, there is potentially unintended changes to the output values/structure outside of this one value that are being totally missed. The one downside I see to this is the runtime, such that running You can see that I'm trying to impose more of a structure to each test document, such that new tests can be added easily. I also want the analytical and graphical methods to have all (or most) of their potential input objects tested for, as well as ensuring each is tested on a variety of datasets. This structure and expansion to the test sets is outlined on this wiki page. |
Hi @Max-Bladen, This would be a great idea to extend the tests to further elements in the output. However, we want to keep tests as isolated from the outside of the repo as possible. We also need to be aware that some of the output elements are generated by the dependencies (say a graph), and as long as they adjust their visualisation based on those, changes to them should not break the tests. Here is what I suggest for expanding the tests to further elements:
You can event separate the definition of these ground truth elements inside |
Thanks for the feedback @aljabadi . I agree with everything you mentioned. I didn't know about
Do you feel something like this more appropriate
|
Oh also, are you happy with the different types of tests and how I'm structuring things? |
Sorry for the repeated messages @aljabadi. I've just been adjusting the |
test: second trial commit for new test system. draws ground truths from internal structure objects
fix: minor error in the new `test-auroc.R` meant a test was failing
Hi @Max-Bladen, Please be mindful that currently our package size exceeds the standard size of 5MB so this should be a last resort. The scripts that generate these files must be included within the test functions and only commented out. |
Hi @Max-Bladen, looks awesome. Happy to see the files don't take much space. |
If a function is improved and the outcomes change, what is the procedure for changing the fixture data? Is this documented and easy to implement? |
The procedure is quite simple. I have some notes written down locally. Once I've worked my way through most of the work for this PR (see the last page of the Wiki), I'll change this page to contain a step-by-step process on how to changing this data. I've tried to design this with adaptability and expansion in mind |
test: added test cases for `tune.spls()`. These are just placeholders as more robust testing criteria needs to be established as well as this document will be fully updated as part of PR #206
test: updated the test cases for the following functions: circosPlot, block.splsda, network, pca, perf.diablo, perf.mint.splsda, plotIndiv, plotLoadings, plotVar, predict. Using these to estimate the increase in coverage once this overhaul is complete
fix: temporarily uncommented out test cases that were failing. Unknown source of error
test: added test cases for `tune.block.splsda()`. Additionally, adjusted `MCV.block.splsda()` so that `n` and `repeat.measures` are calculated at the correct point
test: added test cases for `tune.mint.splsda()`.
fix: adjusted functionality of `.minimal_train_test_subset` to allow for greater user control and consistency. adjusted test cases which utilised these accordingly
refactor: changed notation slightly. "edge cases" are now just referred to as "warnings" as that is all they were used for
tests: added new tests for `tune.splsda()`
tests: added `set.seed` to multilevel `tune.splsda()` test to ensure consistency
fix: temporarily removed a couple tests causing conflict in `test-plotLoadings.R`
fix: attempting to revert `test-plotLoadings.R` back to form seen in master to see if this resolves conflict
fix: commented out tune.splsda multilevel test and repaired error causing plotVar tests to fail. also renamed the `quiet` function to `.quiet` to bring in line with naming structure of helper functions
tests: implemented way to condense the ground truth files by combining any Testable.Components or Ground.Truths which are identical. implemented for `tune.splsda` as trial
tests: readded tests for `plotLoadings()`
fix: temporarily removed the entire `test-plotLoadings.R` file to allow for rebasing of branch
fix: returned `test-plotLoadings.R`
tests: condensed existing `auroc` tests and expanded on its coverage.
After disucssion, this idea was to be scraped. |
test: added test cases for `tune.spls()`. These are just placeholders as more robust testing criteria needs to be established as well as this document will be fully updated as part of PR #206
test: added test cases for `tune.spls()`. These are just placeholders as more robust testing criteria needs to be established as well as this document will be fully updated as part of PR #206
fix: implemented BiocParallel functionality into `tune.spls()` via restructuring of the main portion of the function. bplapply() iterates over all pairs of input keepX/Y so only reduces runtime for long lists of test.keepX/Y refactor: previous PR left duplicate function used for development. this is rectified and more comments are added test: added test cases for `tune.spls()`. These are just placeholders as more robust testing criteria needs to be established as well as this document will be fully updated as part of PR #206 tests: updated tests to assess actual values alongside RNG control of parallel function calls. refactor: replaced all calls to `cpus` to `BPPARAM` in `tune()` docs: updated `tune.Rd` file with cpus -> BPPARAM shift
test: first commit to trial the new test system which draws the ground truth values from external RData files