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

Fix failing tests #146

Closed
talgalili opened this issue Nov 12, 2024 · 9 comments
Closed

Fix failing tests #146

talgalili opened this issue Nov 12, 2024 · 9 comments
Labels

Comments

@talgalili
Copy link
Owner

Log from winbuild

* using log directory 'd:/RCompile/CRANguest/R-devel/dendextend.Rcheck'
* using R Under development (unstable) (2024-11-11 r87319 ucrt)
* using platform: x86_64-w64-mingw32
* R was compiled by
    gcc.exe (GCC) 13.3.0
    GNU Fortran (GCC) 13.3.0
* running under: Windows Server 2022 x64 (build 20348)
* using session charset: UTF-8
* checking for file 'dendextend/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'dendextend' version '1.19.0'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... [51s] OK
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking serialization versions ... OK
* checking whether package 'dendextend' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking code files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking whether startup messages can be suppressed ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [26s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from Rd file 'all.equal.dendrogram.Rd':
all.equal.dendlist
  Code: function(target, current, ...)
  Docs: function(target, current, use.edge.length = TRUE,
                 use.tip.label.order = FALSE, use.tip.label = TRUE,
                 use.topology = TRUE, tolerance =
                 .Machine$double.eps^0.5, scale = NULL, ...)
  Argument names in docs not in code:
    use.edge.length use.tip.label.order use.tip.label use.topology
    tolerance scale
  Mismatches in argument names:
    Position: 3 Code: ... Docs: use.edge.length

* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ... [17s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ... [117s] ERROR
  Running 'testthat.R' [117s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > 
  > library(dendextend)
  
  ---------------------
  Welcome to dendextend version 1.19.0
  Type citation('dendextend') for how to cite the package.
  
  Type browseVignettes(package = 'dendextend') for the package vignette.
  The github page is: https://github.com/talgalili/dendextend/
  
  Suggestions and bug-reports can be submitted at: https://github.com/talgalili/dendextend/issues
  You may ask questions at stackoverflow, use the r and dendextend tags: 
  	 https://stackoverflow.com/questions/tagged/dendextend
  
  	To suppress this message use:  suppressPackageStartupMessages(library(dendextend))
  ---------------------
  
  
  Attaching package: 'dendextend'
  
  The following object is masked from 'package:stats':
  
      cutree
  
  > test_check("dendextend")
  ch. 1 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 1 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; Tracing dendrogram_data(dend) step 6 
  ch. 1 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; Tracing dendrogram_data(dend) step 15 
  ch. 1 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; Tracing dendrogram_data(dend) step 15 
  ch. 1 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; Tracing dendrogram_data(dend) step 15 
  ch. 1 @ h= 1 ; ch. 1 @ h= ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; Tracing dendrogram_data(dend) step 15 
  ch. 1 @ h= 1 ; ch. 1 @ h= ; ch. 2 @ h= 0 ; ch. 2 @ h= 2 ; ch. 1 @ h= 0 ; ch. 2 @ h= 1 ; ch. 1 @ h= 0 ; ch. 2 @ h= 0 ; [ FAIL 4 | WARN 1 | SKIP 0 | PASS 800 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-color_branches.R:33:4'): color_branches works ────────────────
  color_branches(hc) not equal to color_branches(dend).
  Attributes: < Names: 3 string mismatches >
  Attributes: < Length mismatch: comparison on first 4 components >
  Attributes: < Component 2: Modes: list, numeric >
  Attributes: < Component 2: names for target but not for current >
  Attributes: < Component 2: Component 1: Modes: character, numeric >
  Attributes: < Component 2: Component 1: target is character, current is numeric >
  Attributes: < Component 3: Mean relative difference: 0.25 >
  Attributes: < Component 4: Mean relative difference: 0.675 >
  Component 1: Attributes: < Names: 3 string mismatches >
  ...
  ── Failure ('test-color_branches.R:50:4'): color_branches works ────────────────
  `result1` not equal to `result2`.
  Component 1: Attributes: < Names: 3 string mismatches >
  Component 1: Attributes: < Length mismatch: comparison on first 4 components >
  Component 1: Attributes: < Component "edgePar": Length mismatch: comparison on first 1 components >
  Component 1: Attributes: < Component 3: Mean relative difference: 1 >
  Component 1: Attributes: < Component 4: Mean relative difference: 0.75 >
  Component 2: Attributes: < Names: 3 string mismatches >
  Component 2: Attributes: < Length mismatch: comparison on first 4 components >
  Component 2: Attributes: < Component "edgePar": Length mismatch: comparison on first 1 components >
  Component 2: Attributes: < Component 3: Mean relative difference: 0.5 >
  ...
  ── Failure ('test-prune.R:38:4'): prune works for non-dendrogram objects ───────
  as.dendrogram(result) not equal to prune_leaf(dend, "Florida").
  Component 2: Component 2: Component 1: Component 2: Component 2: Mean relative difference: 0.111
  ── Failure ('test-prune.R:43:4'): prune works for non-dendrogram objects ───────
  as.dendrogram(result) not equal to prune_leaf(dend, "Florida").
  Component 2: Component 2: Component 1: Component 2: Component 2: Mean relative difference: 0.111
  
  [ FAIL 4 | WARN 1 | SKIP 0 | PASS 800 ]
  Error: Test failures
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking re-building of vignette outputs ... [151s] OK
* checking PDF version of manual ... [29s] OK
* checking HTML version of manual ... [24s] OK
* DONE
Status: 1 ERROR, 1 WARNING
@talgalili talgalili added the bug label Nov 12, 2024
@talgalili
Copy link
Owner Author

Hi @alecbuetow
I ran the most recent version in winbuild and found the above errors, could you please take a look?

@alecbuetow
Copy link
Contributor

On it

@alecbuetow
Copy link
Contributor

It looks like the windows version doesn't like expect_equal(dend1, dend2) even if the dendrograms are the same. I changed the tests to account for this

@talgalili
Copy link
Owner Author

Thanks @alecbuetow
I'm taking a look.

Ref: ed39cec

@talgalili
Copy link
Owner Author

Thanks for the work @alecbuetow
I checked the latest version and it's now does not raise any errors or warnings.

And also I see we're at 98% - amazing!

Horray :)

@talgalili
Copy link
Owner Author

@alecbuetow in terms of next steps, some questions:

  1. Do you intend to work some more on the test coverage? (we're at 98%, are you going to try to reach 100%, of stop around here?)
  2. Are you interested in more tasks for me to tag you on?

@alecbuetow
Copy link
Contributor

I'm shooting for 100%! I'd love to keep working on tasks; I'm gonna stick to dendextend for now since I'll be fairly busy for the next few months. Happy to get acquainted with other packages in the future

@talgalili
Copy link
Owner Author

@alecbuetow sounds amazing!

Some tasks I'd love for you to take a look:

  1. Rotate labels for ggplot dendrogram, this can help with creating circular dendrograms using ggdend: Rotate labels for ggplot dendrogram #44
  2. related: circlize_dendrogram can benefit from some work, see:
    Distance between leaf and label in circlize_dendrogram() #116
  3. Feel free to go over other open tasks and discuss if the issue is already resolved, or if it should be resolved: https://github.com/talgalili/dendextend/issues
  4. In the future, feel free to also contribute to heatmaply (which relies on dendextend): https://github.com/talgalili/heatmaply/issues

@alecbuetow
Copy link
Contributor

Excellent, will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants