cole-trapnell-lab / leidenbase

13 stars 13 forks source link

"Failure (test-leidenbase.R:253:5): modularity and significance return values" for architectures arm64, i386, ppc64el and s390x #36

Open tillea opened 1 year ago

tillea commented 1 year ago

Hi, the Debian packaged version of leidenbase has to pass its test on different architectures. This works well for amd64 and others. However, for some architectures there is a failure. You might like to look at the full log of the CI test for arm64. It contains this snippet which seems to be relevant:

BEGIN TEST testthat.R

R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> testthat::test_check("leidenbase")
Loading required package: leidenbase
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 27 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure (test-leidenbase.R:253:5): modularity and significance return values ──
`t11_v01` not equal to `t11_v01_expect`.
1/1 mismatches
[1] 0.71 - 0.71 == 0.000133

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 27 ]
Error: Test failures
Execution halted

This error occurs for the architectures arm64, i386, ppc64el and s390x. For i386 there are even more errors ( here you can find the log ) but may be I should open a different issue once the issue above is fixed. Kind regards, Andreas.

tillea commented 1 year ago

This issue for all other architectures than i386 was obviously solved in version 0.1.14. Unfortunately problems for i386 only are remaining which has the following failures:

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-leidenbase.R:72'): ModularityVertexPartition membership and quality ──
isTRUE(all.equal(t02_v01, t02_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:90'): RBERVertexPartition membership and quality ──
isTRUE(all.equal(t03_v01, t03_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:126'): SurpriseVertexPartition membership and quality ──
isTRUE(all.equal(t05_v01, t05_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:148'): resolution_parameter parameter ───────────
isTRUE(all.equal(t06_v01, t06_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:166'): num_iter parameter ───────────────────────
isTRUE(all.equal(t07_v01, t07_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:189'): initial_membership parameter ─────────────
isTRUE(all.equal(t08_v01, t08_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:212'): edge_weights parameter ───────────────────
isTRUE(all.equal(t09_v01, t09_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE
── Failure ('test-leidenbase.R:235'): node_sizes parameter ─────────────────────
isTRUE(all.equal(t10_v01, t10_v01_expect)) is not TRUE

`actual`:   FALSE
`expected`: TRUE

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 20 ]
Error: Test failures

I admit I have no idea how to cope with this. Kind regards, Andreas.

brgew commented 1 year ago

Hi Andreas,

I appreciate the feedback.

I don't have an i386 machine that I can use for testing. Does Debian use an i386 machine? Or is there an emulator? If so can you point it out to me?

I appreciate your consideration and guidance.

Thank you.

Ever grateful, Brent

On Wed, Jan 11, 2023 at 3:09 AM Andreas Tille @.***> wrote:

This issue for all other architectures than i386 was obviously solved in version 0.1.14. Unfortunately problems for i386 only https://urldefense.com/v3/__https://ci.debian.net/data/autopkgtest/testing/i386/r/r-cran-leidenbase/29511408/log.gz__;!!K-Hz7m0Vt54!nGIF7Br6ujGv7RetKibjUlGqwxd3iuyi4HASKR3-5gJAOZ4ua4NrCgWWlWcytGxWWI3JrYFoeuRiKwNmJt6X$ are remaining which has the following failures:

══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-leidenbase.R:72'): ModularityVertexPartition membership and quality ── isTRUE(all.equal(t02_v01, t02_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:90'): RBERVertexPartition membership and quality ── isTRUE(all.equal(t03_v01, t03_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:126'): SurpriseVertexPartition membership and quality ── isTRUE(all.equal(t05_v01, t05_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:148'): resolution_parameter parameter ─────────── isTRUE(all.equal(t06_v01, t06_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:166'): num_iter parameter ─────────────────────── isTRUE(all.equal(t07_v01, t07_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:189'): initial_membership parameter ───────────── isTRUE(all.equal(t08_v01, t08_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:212'): edge_weights parameter ─────────────────── isTRUE(all.equal(t09_v01, t09_v01_expect)) is not TRUE

actual: FALSE expected: TRUE ── Failure ('test-leidenbase.R:235'): node_sizes parameter ───────────────────── isTRUE(all.equal(t10_v01, t10_v01_expect)) is not TRUE

actual: FALSE expected: TRUE

[ FAIL 8 | WARN 0 | SKIP 0 | PASS 20 ] Error: Test failures

I admit I have no idea how to cope with this. Kind regards, Andreas.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/cole-trapnell-lab/leidenbase/issues/36*issuecomment-1378586486__;Iw!!K-Hz7m0Vt54!nGIF7Br6ujGv7RetKibjUlGqwxd3iuyi4HASKR3-5gJAOZ4ua4NrCgWWlWcytGxWWI3JrYFoeuRiK7fCQM8t$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ACXSPQZWXKAUTSJQWKGEQHLWR2IFZANCNFSM6AAAAAARDK75U4__;!!K-Hz7m0Vt54!nGIF7Br6ujGv7RetKibjUlGqwxd3iuyi4HASKR3-5gJAOZ4ua4NrCgWWlWcytGxWWI3JrYFoeuRiK2cwlyYj$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tillea commented 1 year ago

Hi Brent,

Am Fri, Jan 13, 2023 at 04:00:18PM -0800 schrieb brgew:

I appreciate the feedback.

You are welcome.

I don't have an i386 machine that I can use for testing. Does Debian use an i386 machine? Or is there an emulator? If so can you point it out to me?

Debian has autobuilders for quite a lot of architectures. I personally was able to reproduce the issue even with an i386 chroot.

Luckily a Debian developer found a working solution:

https://salsa.debian.org/r-pkg-team/r-cran-leidenbase/-/blob/master/debian/patches/fix-i386.patch

Hope this helps, Andreas.