valette / ACVD

Fast simplification of 3D surface meshes
https://www.creatis.insa-lyon.fr/~valette/public/project/acvd/
Other
266 stars 57 forks source link

add regression tests #41

Open kayarre opened 3 years ago

kayarre commented 3 years ago

I think I was able to replace vtkSimpleCriticalSection.h with mutex it compiles but wondered if there is any regression test that we could make to check the code still works the same as before.

valette commented 3 years ago

Generally speaking, a regression test would be a nice thing to implement! But in that specific case (threading remeshing) it would be difficult as in the threaded case, energy minimization is not deterministic. Hence, two different execution would lead to two different (but very close) meshes. But for single thread code this should be possible. Do you have a suggestion for a good testing framework?

kayarre commented 3 years ago

doctest seems lightweight and fast enough I think it would be a good candidate.

Another thought that is not strictly testing would be testing from the README. e.g. from python land pytest-codeblocks and this post testing code in markdown. I could see this being immediately useful to sanity check things while keeping things lightweight.

Other thoughts: Is there an approach that makes sense like dice coefficient used for image segmentation but surface meshes? Is energy minimization bounded? or are the bounds much larger than would be useful in a regression test or testing in general?

There was a project I looked into a long time ago that was intended for benchmarking surface meshing algorithms, maybe that would be worth investigating? reconbench

valette commented 3 years ago

Thank you for all the pointers, I will look into that! As a side note, I have just exposed more clearly the parallel versions : ACVDP, ACVDQP, AnisotropicRemeshingQP

valette commented 2 years ago

I have just added a basic continuous integration script to the repository. It uses github actions. It checks that compilation works well, and that the code executes on the provided examples without segfaults. Next : checking the validity of results...