miso-sound / misosoupy

Misophonia Stimulus Organization Using Python
MIT License
0 stars 0 forks source link

Adding tests #4

Open danibene opened 11 months ago

danibene commented 11 months ago

I think it would be nice to add some automated tests to the codebase, to make sure the code is doing what we want it to/to try to prevent accidentally breaking it while making changes. One way we could start is by breaking up some parts of the code (especially the psychopy-independent logic) into smaller functions. I was thinking we could start with functions to "refine" the first list of stimuli and get the final ranked list of stimuli?

hansen508 commented 11 months ago

Ooh that's a good idea. For clarification, by smaller functions do you mean separate "def function(input1,input2):" chunks within the python script, or separate "function.py" scripts?

danibene commented 11 months ago

I would normally separate into separate .py files (and even separate those .py files into separate folders/modules), but I would suggest starting with one branch just separating them into functions in the same file (e.g. "change/refactor_to_functions") & then we can figure out how to reorganize into files at a later stage?