mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
140 stars 67 forks source link

MAINT: DRY kwarg passing #746

Closed larsoner closed 1 year ago

larsoner commented 1 year ago

Before merging …

I went to work on #574 and the sheer volume of kwargs in get_config that must be used to import_*_data made it really hard to start from one of the steps/preprocessing/*.py files to add a new step. This PR is a no-op from the user standpoint but refactors to:

  1. _bids_kwargs function that returns some standard BIDS kwargs like cfg.space. Eventually we should use this everywhere probably but I'm just starting with steps/preprocessing for now.
  2. _import_data_kwargs function that gets the config params needed for reading raw data

Should be a lot more red than green here. I don't expect the first version to pass -- locally I've only run ds004229 -- but hopefully it won't require many more iterations to get right!