Skip to content
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

test: implement testing and benchmarking #12

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

rbasu101
Copy link
Contributor

No description provided.

rbasu101 and others added 6 commits January 29, 2024 15:33
    -Moved drug application test examples
    -Supressed Expected Warning in process_gene()
test-dgidb.R:
    -Now Uses testthat package for R unit testing
        -Supports three unique tests
            -get_interactions(search='genes')
            -get_interactions(search='drugs')
            -get_drug_applications()
        -Currently the tests only expect that no error occurs during the test
    -Moved to seperate test folder
    -Now Uses microbenchmark package for R benchmarking
        -A benchmark is run on the each test function following the inital test
            -Currently the benchmark samples 10 runs of the function and reports the average,min,max,etc execution time
Performed lintr styling to test.dgidb.R
Fixed testthat file structure using usethis::use_testthat()
Used usethis::create_package() to setup barebone structure of an R package
in testthat.R: library(rdgidb) does not function, as rdgidb needs to be installed locally as a package to be loaded. Now: the devtools package is used to load the local instance of rdgidb and use it for testing without need for installing the package.
@rbasu101 rbasu101 added priority:medium Medium priority test Changes to test code only labels Nov 29, 2024
@rbasu101 rbasu101 self-assigned this Nov 29, 2024
@rbasu101 rbasu101 linked an issue Nov 29, 2024 that may be closed by this pull request
@rbasu101
Copy link
Contributor Author

One important thing with this PR is that the parent directory/repo name 'r-dgidb' should, at least for now, be renamed to 'rdgidb', as 'r-dgidb' is considered to be an invalid package name.

Added project dependencies in DESCRIPTION. Additionally, the sub package of tidyverse, tidyr, was specified as a dependency, as opposed to all of tidyverse.
Added data.table and httr to imports in DESCRIPTION
@mcannon068nw
Copy link
Contributor

@jsstevenson any clues on why the lint.yaml github action is failing? We tried doing some googling and dependency resolution but it still is failing. Not sure would love some help on this.

@mcannon068nw
Copy link
Contributor

update: @rbasu101 found the fix (comma placement error) but now the test seems to be installing every R package under the sun while testing the lock file? These are not all dependencies for this package. Is it somehow grabbing these from his environment or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium Medium priority test Changes to test code only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Benchmarking/Testing
2 participants