jonescompneurolab / hnn-core

Simulation and optimization of neural circuits for MEG/EEG source estimates
https://jonescompneurolab.github.io/hnn-core/
BSD 3-Clause "New" or "Revised" License
53 stars 52 forks source link

[MRG] ENH: Advanced Features and Optimization in `BatchSimulate` #811

Closed samadpls closed 1 month ago

samadpls commented 1 month ago

A follow-up PR to extend and refine the functionality of BatchSimulate.

ntolley commented 1 month ago

This is coming along great @samadpls! I think now is a good time to increase the robustness of the BatchSimulate class by adding more extensive type/option checks for the parameters passed into the __init__() and methods

You can use _validate_type() and _check_option() to do this: https://github.com/jonescompneurolab/hnn-core/blob/b2a211af18924070c64ab3cb3c6c1684ad53d3d4/hnn_core/externals/mne.py#L175

For each check you'll want to write a unit test to make sure an error is raised when you attempt to pass an invalid value. You can check out the unit tests elsewhere to see how this is done:

https://github.com/jonescompneurolab/hnn-core/blob/b2a211af18924070c64ab3cb3c6c1684ad53d3d4/hnn_core/tests/test_network.py#L74

ntolley commented 1 month ago

For the next PR here are the goals

To-do for me: figure out why linkcheck fails when BatchSimulate is added to the hnn_core __init__