INT-NIT / BEP032tools

Software tools supporting the BIDS Extension Proposal (BEP) dedicated to adding support for electrophysiological data recorded in animal models (BEP032)
MIT License
3 stars 8 forks source link

add tests for correct generation of data file names #84

Closed JuliaSprenger closed 3 years ago

JuliaSprenger commented 3 years ago
JuliaSprenger commented 3 years ago

Clarification for point 1) Currently in line https://github.com/INT-NIT/AnDO/blob/cef40788bddb2ffc11966b3e60ae6e36a2482853/ando/tools/generator/AnDOGenerator.py#L99 we are using the string key as a key in case no other, more specific key can be constructed. However in lines https://github.com/INT-NIT/AnDO/blob/cef40788bddb2ffc11966b3e60ae6e36a2482853/ando/tools/generator/AnDOGenerator.py#L200 we are not taking care of dealing with this dummy key in a separate fashion, but treat it as any other constructed string and incorporate it in the resulting file name. I haven't run a test on this yet, but just read the code. @Slowblitz can you verify if the constructed file name contains the string key if no other parameters are provided?

Slowblitz commented 3 years ago

Ok so for the moment if I understand right no key are provide because https://github.com/INT-NIT/AnDO/blob/cef40788bddb2ffc11966b3e60ae6e36a2482853/ando/tools/generator/AnDOGenerator.py#L90 and here the result of the filenames after https://github.com/INT-NIT/AnDO/blob/cef40788bddb2ffc11966b3e60ae6e36a2482853/ando/tools/generator/tests/test_AnDOGenerator.py#L51

sub-sub5_ses-ses1_split-0_ephys.nix
sub-sub5_ses-ses1_split-1_ephys.nwb
JuliaSprenger commented 3 years ago

So the name generation is correct, but still https://github.com/INT-NIT/AnDO/blob/cef40788bddb2ffc11966b3e60ae6e36a2482853/ando/tools/generator/AnDOGenerator.py#L99 should use key instead of 'key'. @Slowblitz Can you add a test that deals with more than 1 test file per key? This should make this bug more obvious.

JuliaSprenger commented 3 years ago

solved via #89