Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to show the "directory" tree of the files in each mne.datasets? #10799

Open
adam2392 opened this issue Jun 21, 2022 · 3 comments
Labels

Comments

@adam2392
Copy link
Member

adam2392 commented Jun 21, 2022

Describe the new feature or enhancement

When a developer is using the datasets available in mne.datasets e.g. https://mne.tools/stable/generated/mne.datasets.sample.data_path.html

then usually they actually don't know what's in the dataset, so they probably would need to inspect the entire folder to understand the filenames and subdirectories. It would be nice to see the file directory within each docstring to enable a more seamless dev experience.

Describe your proposed implementation

Idk how, but somehow piping the output of something like print_dir_tree of each datasets into their respective docstring?

Describe possible alternatives

Someone can just download the dataset I suppose and inspect it.

Alternatively, perhaps this page can be updated and linked within each dataset function? https://mne.tools/stable/overview/datasets_index.html#datasets

Additional comments

The idea came up in mne-tools/mne-connectivity#100 (comment)

@adam2392 adam2392 added the ENH label Jun 21, 2022
@drammock
Copy link
Member

$ cd /path/to/mne_data
$ tree mTRF_1.5
mTRF_1.5
├── coherentmotion_data.mat
├── contrast_data.mat
├── lagGen.m
├── mTRFcrossval.m
├── mTRFmulticrossval.m
├── mTRFpredict.m
├── mTRFtrain.m
├── mTRFtransform.m
├── README.txt
└── speech_data.mat

0 directories, 10 files

repeat as needed for other datasets besides mTRF

@adam2392
Copy link
Member Author

Is it worth adding those code to the datasets docstring?

@drammock
Copy link
Member

🤷🏻 seems like it would have helped you if that note were in the docstring right? It ought to work on Windows and Linux at least; I'd say if you can verify it (or something similar) works for Mac, go ahead and add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants