PennLINC / fw-heudiconv

Heuristic-based Data Curation on Flywheel
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

[ENH] Add a default reproin heuristic #23

Closed mattcieslak closed 5 years ago

mattcieslak commented 5 years ago

Ideas:

  1. Make it a commandline option: just have some basic pattern matching that ignores fieldmaps
  2. Make it an importable function that can be included in a heuristic. Something like:
from fw_heudiconv import reproin

infotodict = reproin

IntendedFor = { ... }
MetadataExtras = { ... }
TinasheMTapera commented 5 years ago

@mattcieslak went over our options today. I like the importable function option as it's less overhead. In fact, if they want to use reproin in their heuristic.py, then it's simply a matter of them knowing how to import it from heudiconv. You can do it like this:

import importlib

module = importlib.import_module('heudiconv.heuristics.{}'.format(<heuristic_in_heudiconv>))
infotodict = module.infotodict

So in the CLI there's really not much to change. The next thing I'll be working on is how to add this as an option in the gear

TinasheMTapera commented 5 years ago

Should work now, keeping the branch separate for a little in case something comes up