eegdash 0.3.7.dev183881899__tar.gz → 0.3.9.dev114__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of eegdash might be problematic. Click here for more details.

Files changed (69) hide show
  1. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/MANIFEST.in +1 -1
  2. {eegdash-0.3.7.dev183881899/eegdash.egg-info → eegdash-0.3.9.dev114}/PKG-INFO +12 -5
  3. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/README.md +9 -4
  4. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/Makefile +2 -2
  5. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/conf.py +69 -1
  6. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/dataset_summary.rst +2 -3
  7. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/index.rst +2 -2
  8. eegdash-0.3.9.dev114/eegdash/__init__.py +10 -0
  9. eegdash-0.3.9.dev114/eegdash/api.py +1045 -0
  10. eegdash-0.3.9.dev114/eegdash/bids_eeg_metadata.py +254 -0
  11. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/const.py +48 -0
  12. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/data_utils.py +177 -45
  13. eegdash-0.3.9.dev114/eegdash/dataset/__init__.py +4 -0
  14. eegdash-0.3.9.dev114/eegdash/dataset/dataset.py +161 -0
  15. eegdash-0.3.9.dev114/eegdash/dataset/dataset_summary.csv +256 -0
  16. {eegdash-0.3.7.dev183881899/eegdash → eegdash-0.3.9.dev114/eegdash/dataset}/registry.py +9 -20
  17. eegdash-0.3.9.dev114/eegdash/hbn/__init__.py +17 -0
  18. eegdash-0.3.9.dev114/eegdash/hbn/windows.py +305 -0
  19. eegdash-0.3.9.dev114/eegdash/paths.py +28 -0
  20. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/utils.py +1 -1
  21. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114/eegdash.egg-info}/PKG-INFO +12 -5
  22. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash.egg-info/SOURCES.txt +10 -6
  23. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash.egg-info/requires.txt +2 -0
  24. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/pyproject.toml +10 -7
  25. eegdash-0.3.9.dev114/tests/test_cache_folder_suffix.py +59 -0
  26. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_challenge_kwargs.py +1 -1
  27. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_correctness.py +1 -1
  28. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_dataset.py +36 -6
  29. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_dataset_registration.py +3 -1
  30. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_functional.py +1 -1
  31. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_minirelease.py +1 -1
  32. eegdash-0.3.9.dev114/tests/test_offline.py +156 -0
  33. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_query.py +3 -2
  34. eegdash-0.3.7.dev183881899/eegdash/__init__.py +0 -10
  35. eegdash-0.3.7.dev183881899/eegdash/api.py +0 -979
  36. eegdash-0.3.7.dev183881899/eegdash/data_config.py +0 -34
  37. eegdash-0.3.7.dev183881899/eegdash/dataset.py +0 -118
  38. eegdash-0.3.7.dev183881899/eegdash/dataset_summary.csv +0 -256
  39. eegdash-0.3.7.dev183881899/tests/test_database.py +0 -0
  40. eegdash-0.3.7.dev183881899/tests/test_offline.py +0 -51
  41. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/LICENSE +0 -0
  42. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/install/install.rst +0 -0
  43. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/install/install_pip.rst +0 -0
  44. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/install/install_source.rst +0 -0
  45. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/docs/source/overview.rst +0 -0
  46. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/__init__.py +0 -0
  47. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/datasets.py +0 -0
  48. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/decorators.py +0 -0
  49. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/extractors.py +0 -0
  50. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/__init__.py +0 -0
  51. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/complexity.py +0 -0
  52. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/connectivity.py +0 -0
  53. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/csp.py +0 -0
  54. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/dimensionality.py +0 -0
  55. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/signal.py +0 -0
  56. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/spectral.py +0 -0
  57. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/feature_bank/utils.py +0 -0
  58. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/inspect.py +0 -0
  59. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/serialization.py +0 -0
  60. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/features/utils.py +0 -0
  61. {eegdash-0.3.7.dev183881899/eegdash → eegdash-0.3.9.dev114/eegdash/hbn}/preprocessing.py +0 -0
  62. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash/mongodb.py +0 -0
  63. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash.egg-info/dependency_links.txt +0 -0
  64. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/eegdash.egg-info/top_level.txt +0 -0
  65. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/setup.cfg +0 -0
  66. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_api.py +0 -0
  67. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_eegdash.py +0 -0
  68. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_init.py +0 -0
  69. {eegdash-0.3.7.dev183881899 → eegdash-0.3.9.dev114}/tests/test_mongo_connection.py +0 -0
@@ -1,7 +1,7 @@
1
1
  include README.md
2
2
  include LICENSE
3
3
 
4
- include eegdash/dataset_summary.csv
4
+ include eegdash/dataset/dataset_summary.csv
5
5
 
6
6
  recursive-include docs *.ipynb *.rst conf.py Makefile
7
7
  recursive-exclude docs *checkpoint.ipynb
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eegdash
3
- Version: 0.3.7.dev183881899
3
+ Version: 0.3.9.dev114
4
4
  Summary: EEG data for machine learning
5
5
  Author-email: Young Truong <dt.young112@gmail.com>, Arnaud Delorme <adelorme@gmail.com>, Aviv Dotan <avivd220@gmail.com>, Oren Shriki <oren70@gmail.com>, Bruno Aristimunha <b.aristimunha@gmail.com>
6
6
  License-Expression: GPL-3.0-only
@@ -40,6 +40,7 @@ Requires-Dist: h5io>=0.2.4
40
40
  Requires-Dist: pymatreader
41
41
  Requires-Dist: eeglabio
42
42
  Requires-Dist: tabulate
43
+ Requires-Dist: docstring_inheritance
43
44
  Provides-Extra: tests
44
45
  Requires-Dist: pytest; extra == "tests"
45
46
  Requires-Dist: pytest-cov; extra == "tests"
@@ -62,6 +63,7 @@ Requires-Dist: memory_profiler; extra == "docs"
62
63
  Requires-Dist: ipython; extra == "docs"
63
64
  Requires-Dist: lightgbm; extra == "docs"
64
65
  Requires-Dist: plotly; extra == "docs"
66
+ Requires-Dist: nbformat; extra == "docs"
65
67
  Provides-Extra: all
66
68
  Requires-Dist: eegdash[docs]; extra == "all"
67
69
  Requires-Dist: eegdash[dev]; extra == "all"
@@ -106,7 +108,7 @@ EEGDash queries return a **Pytorch Dataset** formatted to facilitate machine lea
106
108
 
107
109
  ## Data preprocessing
108
110
 
109
- EEGDash datasets are processed using the popular [BrainDecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are BrainDecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on BrainDecode datasets is also possible on EEGDash datasets. Refer to [BrainDecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data.
111
+ EEGDash datasets are processed using the popular [braindecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are braindecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on braindecode datasets is also possible on EEGDash datasets. Refer to [braindecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data.
110
112
 
111
113
  ## EEG-Dash usage
112
114
 
@@ -129,7 +131,7 @@ ds_NDARDB033FW5 = EEGDashDataset(
129
131
  )
130
132
  ```
131
133
 
132
- This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional BrainDecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model.
134
+ This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional braindecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model.
133
135
 
134
136
  To use the data from multiple subjects, enter:
135
137
 
@@ -145,7 +147,13 @@ This will search and download the metadata for the task 'RestingState' for all s
145
147
 
146
148
  ### Automatic caching
147
149
 
148
- EEGDash automatically caches the downloaded data in the .eegdash_cache folder of the current directory from which the script is called. This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed.
150
+ By default, EEGDash caches downloaded data under a single, consistent folder:
151
+
152
+ - If ``EEGDASH_CACHE_DIR`` is set in your environment, that path is used.
153
+ - Else, if MNE’s ``MNE_DATA`` config is set, that path is used to align with other EEG tooling.
154
+ - Otherwise, ``.eegdash_cache`` in the current working directory is used.
155
+
156
+ This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed and reused thereafter.
149
157
 
150
158
  ## Education -- Coming soon...
151
159
 
@@ -159,4 +167,3 @@ EEG-DaSh is a collaborative initiative between the United States and Israel, sup
159
167
 
160
168
 
161
169
 
162
-
@@ -36,7 +36,7 @@ EEGDash queries return a **Pytorch Dataset** formatted to facilitate machine lea
36
36
 
37
37
  ## Data preprocessing
38
38
 
39
- EEGDash datasets are processed using the popular [BrainDecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are BrainDecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on BrainDecode datasets is also possible on EEGDash datasets. Refer to [BrainDecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data.
39
+ EEGDash datasets are processed using the popular [braindecode](https://braindecode.org/stable/index.html) library. In fact, EEGDash datasets are braindecode datasets, which are themselves PyTorch datasets. This means that any preprocessing possible on braindecode datasets is also possible on EEGDash datasets. Refer to [braindecode](https://braindecode.org/stable/index.html) tutorials for guidance on preprocessing EEG data.
40
40
 
41
41
  ## EEG-Dash usage
42
42
 
@@ -59,7 +59,7 @@ ds_NDARDB033FW5 = EEGDashDataset(
59
59
  )
60
60
  ```
61
61
 
62
- This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional BrainDecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model.
62
+ This will search and download the metadata for the task **RestingState** for subject **NDARDB033FW5** in BIDS dataset **ds005514**. The actual data will not be downloaded at this stage. Following standard practice, data is only downloaded once it is processed. The **ds_NDARDB033FW5** object is a fully functional braindecode dataset, which is itself a PyTorch dataset. This [tutorial](https://github.com/sccn/EEGDash/blob/develop/notebooks/tutorial_eoec.ipynb) shows how to preprocess the EEG data, extracting portions of the data containing eyes-open and eyes-closed segments, then perform eyes-open vs. eyes-closed classification using a (shallow) deep-learning model.
63
63
 
64
64
  To use the data from multiple subjects, enter:
65
65
 
@@ -75,7 +75,13 @@ This will search and download the metadata for the task 'RestingState' for all s
75
75
 
76
76
  ### Automatic caching
77
77
 
78
- EEGDash automatically caches the downloaded data in the .eegdash_cache folder of the current directory from which the script is called. This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed.
78
+ By default, EEGDash caches downloaded data under a single, consistent folder:
79
+
80
+ - If ``EEGDASH_CACHE_DIR`` is set in your environment, that path is used.
81
+ - Else, if MNE’s ``MNE_DATA`` config is set, that path is used to align with other EEG tooling.
82
+ - Otherwise, ``.eegdash_cache`` in the current working directory is used.
83
+
84
+ This means that if you run the tutorial [scripts](https://github.com/sccn/EEGDash/tree/develop/notebooks), the data will only be downloaded the first time the script is executed and reused thereafter.
79
85
 
80
86
  ## Education -- Coming soon...
81
87
 
@@ -89,4 +95,3 @@ EEG-DaSh is a collaborative initiative between the United States and Israel, sup
89
95
 
90
96
 
91
97
 
92
-
@@ -11,7 +11,7 @@ help:
11
11
 
12
12
  .PHONY: apidoc
13
13
  apidoc:
14
- @sphinx-apidoc -o "$(APIDIR)" "../$(PKG)" -f -e -M
14
+ @python -m sphinx.ext.apidoc -o "$(APIDIR)" "../$(PKG)" -f -e -M
15
15
 
16
16
  # Standard build runs examples
17
17
  html: apidoc
@@ -28,4 +28,4 @@ Makefile: ;
28
28
 
29
29
  %: Makefile
30
30
  @python prepare_summary_tables.py ../eegdash/ $(BUILDDIR)
31
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
31
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -1,4 +1,7 @@
1
+ import importlib
2
+ import inspect
1
3
  import os
4
+ import sys
2
5
  from datetime import datetime, timezone
3
6
 
4
7
  from sphinx_gallery.sorting import ExplicitOrder, FileNameSortKey
@@ -26,6 +29,7 @@ extensions = [
26
29
  "sphinx.ext.ifconfig",
27
30
  "sphinx.ext.intersphinx",
28
31
  "sphinx.ext.githubpages",
32
+ "sphinx.ext.linkcode",
29
33
  "sphinx.ext.napoleon",
30
34
  "sphinx_design",
31
35
  # "autoapi.extension",
@@ -55,7 +59,8 @@ html_baseurl = "https://sccn.github.io/eegdash/"
55
59
 
56
60
  html_theme_options = {
57
61
  "icon_links_label": "External Links", # for screen reader
58
- "use_edit_page_button": False,
62
+ # Show an "Edit this page" button linking to GitHub
63
+ "use_edit_page_button": True,
59
64
  "navigation_with_keys": False,
60
65
  "collapse_navigation": False,
61
66
  "header_links_before_dropdown": 6,
@@ -104,6 +109,69 @@ html_sidebars = {"api": [], "dataset_summary": [], "installation": []}
104
109
  # Copy extra files (e.g., robots.txt) to the output root
105
110
  html_extra_path = ["_extra"]
106
111
 
112
+ # Provide GitHub context so the edit button and custom templates
113
+ # (e.g., Sphinx-Gallery "Open in Colab") know where the source lives.
114
+ # These values should match the repository and docs location.
115
+ html_context = {
116
+ "github_user": "sccn",
117
+ "github_repo": "EEGDash",
118
+ # Branch used to build and host the docs
119
+ "github_version": "main",
120
+ # Path to the documentation root within the repo
121
+ "doc_path": "docs/source",
122
+ }
123
+
124
+
125
+ # Linkcode configuration: map documented objects to GitHub source lines
126
+ def _linkcode_resolve_py_domain(info):
127
+ modname = info.get("module")
128
+ fullname = info.get("fullname")
129
+ if not modname:
130
+ return None
131
+
132
+ try:
133
+ submod = sys.modules.get(modname)
134
+ if submod is None:
135
+ submod = importlib.import_module(modname)
136
+
137
+ obj = submod
138
+ for part in fullname.split("."):
139
+ obj = getattr(obj, part)
140
+
141
+ # Unwrap decorators to reach the actual implementation
142
+ obj = inspect.unwrap(obj)
143
+ fn = inspect.getsourcefile(obj) or inspect.getfile(obj)
144
+ if not fn:
145
+ return None
146
+ fn = os.path.realpath(fn)
147
+
148
+ # Compute line numbers
149
+ try:
150
+ source, start = inspect.getsourcelines(obj)
151
+ end = start + len(source) - 1
152
+ linespec = f"#L{start}-L{end}"
153
+ except OSError:
154
+ linespec = ""
155
+
156
+ # Make path relative to repo root (parent of the installed package dir)
157
+ pkg_dir = os.path.realpath(os.path.dirname(eegdash.__file__))
158
+ repo_root = os.path.realpath(os.path.join(pkg_dir, os.pardir))
159
+ rel_path = os.path.relpath(fn, start=repo_root)
160
+
161
+ # Choose commit/branch for links; override via env if provided
162
+ commit = os.environ.get(
163
+ "LINKCODE_COMMIT", html_context.get("github_version", "main")
164
+ )
165
+ return f"https://github.com/{html_context['github_user']}/{html_context['github_repo']}/blob/{commit}/{rel_path}{linespec}"
166
+ except Exception:
167
+ return None
168
+
169
+
170
+ def linkcode_resolve(domain, info):
171
+ if domain == "py":
172
+ return _linkcode_resolve_py_domain(info)
173
+ return None
174
+
107
175
 
108
176
  # -- Extension configurations ------------------------------------------------
109
177
  autoclass_content = "both"
@@ -1,8 +1,7 @@
1
1
  .. meta::
2
2
  :hide_sidebar: true
3
-
4
- :html_theme.sidebar_secondary.remove:
5
- :html_theme.sidebar_primary.remove:
3
+ :html_theme.sidebar_secondary.remove: true
4
+ :html_theme.sidebar_primary.remove: true
6
5
 
7
6
  .. _data_summary:
8
7
 
@@ -1,4 +1,5 @@
1
- :html_theme.sidebar_secondary.remove:
1
+ .. meta::
2
+ :html_theme.sidebar_secondary.remove: true
2
3
 
3
4
  EEGDASH Documentation
4
5
  =====================
@@ -58,4 +59,3 @@ The archive is currently still in :bdg-danger:`beta testing` mode, so be kind.
58
59
  API <api/modules.rst>
59
60
  Dataset Summary <dataset_summary>
60
61
  Examples <generated/auto_examples/index>
61
-
@@ -0,0 +1,10 @@
1
+ from .api import EEGDash, EEGDashDataset
2
+ from .dataset import EEGChallengeDataset
3
+ from .hbn import preprocessing
4
+ from .utils import _init_mongo_client
5
+
6
+ _init_mongo_client()
7
+
8
+ __all__ = ["EEGDash", "EEGDashDataset", "EEGChallengeDataset", "preprocessing"]
9
+
10
+ __version__ = "0.3.9.dev114"