pachadotdev / cpp11armadillo

The idea is to pass matrices/vectors from R to C++, write pure C++/Armadillo code for the computation, and then export the result back to R with the proper data structures.
http://pacha.dev/cpp11armadillo/
Apache License 2.0
6 stars 0 forks source link

migrate from testthat to tinytest? #5

Open reikoch opened 2 months ago

reikoch commented 2 months ago

I would like to raise attention to tinytest as a no-dependencies replacement for testthat, see for instance https://www.r-bloggers.com/2022/01/reduce-dependency-hell-from-testthat-to-tinytest/. Here it would have the additional benefit that the well developed test suite from Rcpparmadillo could be used.

What do you think?

pachadotdev commented 1 month ago

I would like to raise attention to tinytest as a no-dependencies replacement for testthat, see for instance https://www.r-bloggers.com/2022/01/reduce-dependency-hell-from-testthat-to-tinytest/. Here it would have the additional benefit that the well developed test suite from Rcpparmadillo could be used.

What do you think?

Yes and no.

Yes, it is a good idea to use tinytest,

No, I will not use parts of Rcpparmadillo. It is a package released under GPL-3, and cpp11armadillo uses the Apache License 2.0, meaning that I would need to re-license everything as GPL-3 and face a lot of legal shenanigans at UofT.

pachadotdev commented 1 month ago

hi @reikoch what do you think of this? https://github.com/pachadotdev/cpp11armadillo/commit/92b8f2d0ba0ba7b4cf00f9b3ca70cb2a29416f00

there is only one test I could not port https://github.com/pachadotdev/cpp11armadillo/commit/92b8f2d0ba0ba7b4cf00f9b3ca70cb2a29416f00#diff-ec401e0acfc9b8e514ab3d78a6c3fdaf6f5b48d4822bb5cea1a60a4be9efb1dbL2

reikoch commented 1 month ago

Oh yes, stay away from legal troubles! Your conversion to tinytest has progressed well, let me look at it in detail.

reikoch commented 1 month ago

On my mac m2, running R 4.4.1 all tinytest tests work fine (6 in cpp11armadillo, 40 in cpp11armadillotest).

Which test did not port?

pachadotdev commented 6 days ago

On my mac m2, running R 4.4.1 all tinytest tests work fine (6 in cpp11armadillo, 40 in cpp11armadillotest).

Which test did not port?

this one https://github.com/pachadotdev/cpp11armadillo/blob/main/tests/testthat/test-vendor.R#L2

and this ignores all the tests inside cpp11armadillotest

is there any reason to use tinytest?