-
Notifications
You must be signed in to change notification settings - Fork 11
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
Optimize, standardize, and add tests and coverage reports #47
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… accessors ~20% faster), and remove accessors stageNames and stageStatus (same functionality as MatrixClassOrganized and MatrixClassAuthor)
…ct slot access through @ b/c it's substantially faster
…ting, and add doc for CompadreLegacy
…or, and reformat code and error messages
merge @jonesor's vignette commits from upstream
…e documentation for CompadreDB class
Thanks @patrickbarks. Looks great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(1) Favour slot access with @ internally
It's substantially faster. Accessors aren't really slowing down any of our functions, but particularly for 'lower-level' functions that may be called repeatedly in users' loops or vectorized functions (e.g.
[
,$
,matA()
), I think it's a good idea to optimize.(2) Add methods for all mat-related accessors (
matA()
,matU()
, ...,matrixClass()
, etc.) for signature 'list', to enable e.g.matA(db$mat)
. The purpose is to make it easier to work with the tidyverse, e.g.(3) Re-incorporate @levisc8's unit tests, and expand to all fns (toward #13). Also added code coverage checks via covr, to check how much of our codebase is covered by unit tests. Results will be shown in badge on README. Will also give coverage reports for pull requests.
Other edits:
convertLegacyDB
and replace use withasCompadreDB
(they do the same thing)CompadreLegacy
subsample to distribute with package (for examples and testingasCompadreDB
)[
method to allow column drop withdb[,-j]
(still always retainsmat
column)?CompadreDB
doc