mne-tools/mne-python — pull request #341 by Eric89GXL (2013-01-04 07:54:59+00:00)
Title: WIP ENH: Improving sample dataset tracking

Designed to address #11 and #275, and future dataset additions.

The changes are kind of difficult to follow because I restructured the utils.py function, but basically I

1. Restructured utils.py with comments and (more) logical grouping.
2. Added .`mne/mne-python.conf` as a config file, so users can store and edit settings like `MNE_LOGGING_LEVEL` there. I don't like having to set env vars unless I have to, so I'm happy about the transition here. For a given parameter, env vars take precedence, then values in the config file, then whatever the defaults are. I think this is the sanest behavior.
3. I also added convenience functions (`get_config`, `set_config`, and `get_mne_python_config_path`) for getting and setting config / preference variables in case the user wants to do it in Python instead of manually editing the config file in a text editor.
4. Made it so the sample dataset path doesn't need to be specified every time.
5. Restructured `datasets/sample` to be more consistent with other parts of mne-python. Basically I moved what was formerly `__init__.py` to `sample.py`, and made an appropriate `__init__.py`.
6. Put skeleton in for megsim loading.
7. Removed relative path useage for sample dataset in nosetest modules, e.g. replaced `sample.data_path('..')` with `sample.data_path()` since the function is "smart" now.

I still need to:

1. Remove relative paths in examples.
2. Make it prompt the user and/or "guess" a good path for the sample dataset by default.
3. Actually add Megsim support (right now it is just skeleton setup).

Comments welcome while it's WIP, or people can wait 'til it's "complete".