Back to the main page.
Bug 998 - Convert FT tutorials into testing functions
Status | CLOSED WONTFIX |
Reported | 2011-10-03 14:01:00 +0200 |
Modified | 2018-11-12 10:57:03 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P1 normal |
Assigned to: | Jan-Mathijs Schoffelen |
URL: | |
Tags: | |
Depends on: | 17191720 |
Blocks: | |
See also: | http://bugzilla.fcdonders.nl/show_bug.cgi?id=1907 |
Jörn M. Horschig - 2011-10-03 14:01:36 +0200
Since I ran into a bug and was not sure whether it was my fault or an error in the code, I went back to the FT beamformer tutorial and checked whether the same error occurs with the example data. I think we could use code from the tutorials as great testing scripts. If anything breaks in the tutorial scripts, then something is definitely going wrong in the code. Btw, I would take this one if agreed upon doing this.
Jan-Mathijs Schoffelen - 2011-10-03 14:24:36 +0200
I agree ;o)
Jörn M. Horschig - 2011-10-03 14:38:13 +0200
Created attachment 152 code from the beamformer tutorial I attached the beamformer code already, and should also have the statistic tutorials in one .m-file (but need to check whether they still work, because the path to the datafiles has changed)
Jan-Mathijs Schoffelen - 2011-10-05 15:09:42 +0200
@Lilla, Could you have a shot at this?
Jan-Mathijs Schoffelen - 2011-10-06 11:48:08 +0200
I would suggest to do the following: create for each tutorial a test-file in fieldtrip/test/ naming convention could be: test_tutorial_XXX, where XXX is a name identifying the tutorial I will kick off by creating one for the beamforming tutorial (courtesy of Jörn) and will also do the tutorials related to connectivity
Lilla Magyari - 2011-11-23 10:53:26 +0100
(In reply to comment # Hi, the location of the test-scripts are not clear for me. Is it a place that I could reach without having access to develop the code? Or should I just make the matlab scripts and someone will copy them to the right location? Lilla
Jörn M. Horschig - 2011-11-23 11:04:39 +0100
Test scripts are located in FieldTrip/test or in any other subfolder/test, e.g. FieldTrip/plotting/test. However, these test folders are not included in the download version, only in the svn repository So maybe, if you don't have access to SVN, upload them here and someone will put them in the test-folder?
Lilla Magyari - 2011-11-23 11:12:42 +0100
(In reply to comment #6) Hi, Yes, the problem is that I do not have access to the svn repository. I can put them under my folder as well, I guess anyone can access it. But could you, please, send me one or two already existing test script? I would like to see how does it look like. (E.g. the data should be downloaded from some where too, right? And does it have to be a function?... etc.) li
Jörn M. Horschig - 2011-11-23 11:22:04 +0100
Created attachment 192 test_tutorial files which are already available sure, I put all test_tutorial in the attached .zip, so that you don't need to make those that have already been made ;) I guess you remember, but just to be sure: The comments behind the capital % TEST are functions that are tested with this test-function. So e.g. in case of test_tutorial_beamformer, ft_redefinetrial will be tested. So, if anyone updates ft_redefinetrials, this test function will be automatically called (because it can verify whether ft_redefinetrial still works correctly)
Lilla Magyari - 2012-01-11 12:07:58 +0100
I commited the test_tutorial_preprocessing.m file in fieldtrip/test. I can't load .ds data, so my solution was that it cd-s into the /home/common/fieldtrip/data directory (there is the .ds in this directory) and at the end it returns to the current directory. I could not put in the mytrialfun part because ft_definetrial looks for the mytrialfun.
Lilla Magyari - 2012-01-11 12:22:16 +0100
(In reply to comment #9) instead of cd-ing, I just have changed the path to the data: /home/common/fieldtrip/data/Subject01.ds
Eelke Spaak - 2012-01-11 14:39:53 +0100
I will make one for the beamformer tutorial, since I need the data created by that tutorial for fixing bug 1141.
Eelke Spaak - 2012-01-11 14:41:16 +0100
(In reply to comment #11) Never mind, this one already exists... (note to self: read comments before posting)
Jörn M. Horschig - 2012-05-07 16:50:13 +0200
In order to get some load off of Lilla right now, and since I am testing the statistics tutorials anyway, I just quickly copied all the code into test functions - tomorrow I'll also convert the cluster frequency tutorial $ svn ci test_tutorial_eventrelatedstatistics.m test_tutorial_clusterpermutationtimelock.m -m "made test scripts out of ER statistics and cluster timelock tutorials - freq to come" Adding test_tutorial_clusterpermutationtimelock.m Adding test_tutorial_eventrelatedstatistics.m Transmitting file data .. Committed revision 5743.
Jörn M. Horschig - 2012-05-08 13:12:12 +0200
547 $ svn ci test_tutorial_clusterpermutationfreq.m -m "added cluster-based permutation freq tutorial" Adding test_tutorial_clusterpermutationfreq.m Transmitting file data . Committed revision 5745.
Robert Oostenveld - 2012-09-19 17:16:34 +0200
I have asked Bart to do this for the spike and spikefield tutorials.
Robert Oostenveld - 2012-12-23 12:27:23 +0100
I created a test script for http://fieldtrip.fcdonders.nl/tutorial/eventrelatedaveraging roboos@mentat001> svn commit test_tutorial_eventrelatedaveraging.m Adding test_tutorial_eventrelatedaveraging.m Transmitting file data . Committed revision 7262.
Lilla Magyari - 2013-07-23 23:09:24 +0200
I reassign it to joint development user.
Jan-Mathijs Schoffelen - 2018-03-10 22:05:42 +0100
I think most of these are now available. Due to lack of manpower there is nobody who can commit to fix the last few percent