mikldk / roxytest

Inline testthat tests with roxygen2
95 stars 3 forks source link

roxytest cannot work #13

Closed ShixiangWang closed 4 years ago

ShixiangWang commented 4 years ago

I upgrade my R to v4.0 and find that this package cannot work anymore.

Loading sigminer
sigminer version 1.0.3, run hello() to see usage and citation.
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/add_labels.R:46] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_adj_p.R:66] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_bayesian_result.R:22] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_cn_ploidy.R:16] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_genome_annotation.R:27] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_sig_exposure.R:25] @testexamples unknown tag
Warning: [/Users/wsx/Documents/GitHub/sigminer/R/get_sig_similarity.R:51] @testexamples unknown tag

Could you take a look at this problem?

pdiakumis commented 4 years ago

I'm having the same issue - happy to provide more info or take a look at the code if you give me some pointers, @mikldk

CODE ``` $ R R version 4.0.0 (2020-04-24) -- "Arbor Day" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin17.0 (64-bit) > sessionInfo() R version 4.0.0 (2020-04-24) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6 > packageVersion("roxytest") [1] ‘0.0.0.9102’ > packageVersion("roxygen2") [1] ‘7.1.0’ > packageVersion("testthat") [1] ‘2.3.2’ > require(roxytest) Loading required package: roxytest > require(roxygen2) Loading required package: roxygen2 > roxygen2::roxygenise() Loading gpgr Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:17] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:79] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:151] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:203] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:266] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:292] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:318] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:346] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/purple.R:373] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/sv.R:16] @testexamples unknown tag Warning: [/Users/pdiakumis/Desktop/projects/umccr/gpgr/R/sv.R:58] @testexamples unknown tag Writing NAMESPACE Writing NAMESPACE ```
rubak commented 4 years ago

I will have a quick look at this later this week, but we might need help from @mikldk to get anywhere. I was just trying to define the tag functions, roclets etc. in a live R session by copy/pasting from roxytest source code. Then the tags @tests and @testexamples appear to be working OK. Maybe it is a scoping thing about finding the functions in the roxytest package and not in the global environment. I have no idea why this problem should be introduced in R 4.0.

mikldk commented 4 years ago

Thanks for reporting this. I will look into it.

mikldk commented 4 years ago

This was caused by faulty entries in NAMESPACE and should be fixed by 0fbba62a20c7dc44026002643796d82e217ef1d8. Can you please try with the newest commit and report back if it now works? I apologise for the long waiting time. Hopefully, that shouldn't happen again.

ShixiangWang commented 4 years ago

thanks I will try

ShixiangWang commented 4 years ago

It works @mikldk, thanks.