tvb-gdist icon indicating copy to clipboard operation
tvb-gdist copied to clipboard

[Ctypes] TVB-2719 Use ctypes instead of cython

Open ayan-b opened this issue 4 years ago • 7 comments

Closes #11 & closes #36

ayan-b avatar Jun 16 '20 03:06 ayan-b

A last minor comment: I don't see why C++14 is needed, and it would be easier to not worry about MSVC if you were using C++11 or earlier.

maedoc avatar Jun 16 '20 12:06 maedoc

@maedoc Thanks! The PR is still in WIP and I am working on it.

A last minor comment: I don't see why C++14 is needed, and it would be easier to not worry about MSVC if you were using C++11 or earlier.

I am using range-based for loop (which can easily be changed to standard for loop), so added c++14 to command line arguments.

ayan-b avatar Jun 16 '20 12:06 ayan-b

Codecov Report

:exclamation: No coverage uploaded for pull request base (trunk@106a7b8). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             trunk      #40   +/-   ##
========================================
  Coverage         ?   81.96%           
========================================
  Files            ?        4           
  Lines            ?      122           
  Branches         ?        0           
========================================
  Hits             ?      100           
  Misses           ?       22           
  Partials         ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 106a7b8...120c1b5. Read the comment docs.

codecov[bot] avatar Jun 22 '20 14:06 codecov[bot]

These are cosmetics, but:

  • I suggest to have one unit-test comparing the currently computed geodesic matrix of distances with a matrix that was saved from the previous stable version of tvb-gdist (version 2.0.1 for example). Maybe use cortex_16384.zip in this test (then it will need to be committed in data folder).
  • Also, I see the root folder https://github.com/the-virtual-brain/tvb-gdist getting crowded. Could we maybe move some of the files inside geodesic_library ?

liadomide avatar Jun 29 '20 12:06 liadomide

Not really sure why macOS and Windows jobs are failing sometimes with segmentation fault.

ayan-b avatar Jun 30 '20 08:06 ayan-b

I suggest to have one unit-test comparing the currently computed geodesic matrix of distances with a matrix that was saved from the previous stable version of tvb-gdist (version 2.0.1 for example). Maybe use cortex_16384.zip in this test (then it will need to be committed in data folder).

cortex_16384 takes a lot of time, so I have tested with outer_skull_642, inner_skull_642 and scalp_1082.

Also, I see the root folder https://github.com/the-virtual-brain/tvb-gdist getting crowded. Could we maybe move some of the files inside geodesic_library ?

gdist.pyx, geodesic.py and alternative_geodesic.py can be removed and gdist_c_cpi.h, gdist_c_api.cpp can go inside geodesic_library.

ayan-b avatar Jun 30 '20 08:06 ayan-b

Lia's previous comment about comparing versions is very pertinent. I would also recommend some "synthetic" geometry like a circle and compare distances to known geodesic arc distances.

If you are feeling curious you could even implement something more interesting such as a surface with a known path integral e.g. https://math.stackexchange.com/questions/45089/what-is-the-length-of-a-sine-wave-from-0-to-2-pi

no obligation though really :)

maedoc avatar Jun 30 '20 10:06 maedoc