lmfit/lmfit-py — pull request #131 by danielballan (2014-09-11 13:57:55+00:00)
Title: REF: Organize Fitter file structure.

@newville If you have a better idea, have at it. I am not attached to this at all.

Here's how this works:

from lmfit import Fitter # delegates to the "fanciest" Fitter available

I think `MPLFitter` is not a UI fitter, and it's a very simple elaboration on `BaseFitter`, so they both live in `fitter.py`. The import below will run with or without matplotlib installed, but if you actually try to *call* MPLFitter without matplotlib, an informative error will be raised.

from lmfit.fitter import BaseFitter, MPLFitter

As you suggested, `NotebookFitter` and any future GUI subclasses have to be imported from `lmfit.ui`.

from lmfit.ui import NotebookFitter

The other fitters are available there too, for ease. Feel free to disagree and change that.

from lmfit.ui import NotebookFitter, BaseFitter, MPLFitter