-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ENH: add the lite_data dataset (JupyterLite split 1/5) #14128
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
Draft
natinew77-creator
wants to merge
11
commits into
mne-tools:main
Choose a base branch
from
natinew77-creator:lite-data-dataset
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6d35a57
ENH: add the lite_data dataset
natinew77-creator 8ac037b
DOC: add the changelog entry for the lite_data dataset
natinew77-creator 88a8000
Merge branch 'main' into lite-data-dataset
natinew77-creator 5dc10c2
Merge branch 'main' into lite-data-dataset
natinew77-creator 51ad109
Merge branch 'main' into lite-data-dataset
natinew77-creator 8df393a
Merge branch 'main' into lite-data-dataset
natinew77-creator 9499996
Merge branch 'main' into lite-data-dataset
natinew77-creator 3a2a7c7
DOC: clarify what lite_data is for, per review
natinew77-creator 60ff4e5
Merge branch 'main' into lite-data-dataset
natinew77-creator a30f46b
Merge branch 'main' into lite-data-dataset
natinew77-creator 26c5484
Merge branch 'main' into lite-data-dataset
natinew77-creator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add the :func:`mne.datasets.lite_data.data_path` fetcher for the curated data subset used by the browser documentation, by `Natneal B`_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Authors: The MNE-Python contributors. | ||
| # License: BSD-3-Clause | ||
| # Copyright the MNE-Python contributors. | ||
|
|
||
| """Curated data subset for the JupyterLite browser documentation.""" | ||
|
|
||
| from .lite_data import data_path, get_version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Authors: The MNE-Python contributors. | ||
| # License: BSD-3-Clause | ||
| # Copyright the MNE-Python contributors. | ||
|
|
||
| """Curated data subset used by the JupyterLite browser documentation. | ||
|
|
||
| ``lite_data`` holds the data files needed to run the tutorials and examples in | ||
| the browser, taken from ``sample``, ``kiloword``, ``erp_core``, ``mtrf`` and | ||
| ``eegbci``. The files are unchanged and keep the same checksums as the full | ||
| datasets. It extracts to ``MNE-lite-data/`` with each file under its original | ||
| dataset folder (``MNE-sample-data/``, ``MNE-kiloword-data/``, ...), so paths | ||
| match. | ||
|
|
||
| Those datasets ship as separate multi-GB archives, so without this the | ||
| documentation build would download several gigabytes to serve a handful of | ||
| files. | ||
|
|
||
| The ``somato`` dataset is not included, so the somatosensory tutorials and | ||
| examples do not run in the browser. | ||
| """ | ||
|
|
||
| from ...utils import verbose | ||
| from ..utils import _data_path_doc, _download_mne_dataset, _get_version, _version_doc | ||
|
|
||
|
|
||
| @verbose | ||
| def data_path( | ||
| path=None, force_update=False, update_path=True, download=True, *, verbose=None | ||
| ): # noqa: D103 | ||
| return _download_mne_dataset( | ||
| name="lite_data", | ||
| processor="untar", | ||
| path=path, | ||
| force_update=force_update, | ||
| update_path=update_path, | ||
| download=download, | ||
| ) | ||
|
|
||
|
|
||
| data_path.__doc__ = _data_path_doc.format( | ||
| name="lite_data", conf="MNE_DATASETS_LITE_DATA_PATH" | ||
| ) | ||
|
|
||
|
|
||
| def get_version(): # noqa: D103 | ||
| return _get_version("lite_data") | ||
|
|
||
|
|
||
| get_version.__doc__ = _version_doc.format(name="lite_data") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a note that it currently does not support the somatosensory examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Both the dataset docs and the docstring now say somato is not included, so those examples are not available in the browser.