tvb-gdist
tvb-gdist copied to clipboard
[Ctypes] TVB-2719 Use ctypes instead of cython
Closes #11 & closes #36
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 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.
Codecov Report
:exclamation: No coverage uploaded for pull request base (
trunk@106a7b8
). Click here to learn what that means. The diff coverage isn/a
.
@@ 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.
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 indata
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 insidegeodesic_library
?
Not really sure why macOS and Windows jobs are failing sometimes with segmentation fault.
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
.
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 :)