eegdash 0.3.2.dev54__tar.gz → 0.3.3.dev58__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.
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/PKG-INFO +3 -1
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/__init__.py +1 -1
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/data_utils.py +41 -2
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash.egg-info/PKG-INFO +3 -1
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash.egg-info/SOURCES.txt +1 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash.egg-info/requires.txt +2 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/pyproject.toml +2 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/tests/test_dataset.py +0 -2
- eegdash-0.3.3.dev58/tests/test_functional.py +28 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/LICENSE +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/README.md +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/api.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/data_config.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/dataset.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/__init__.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/datasets.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/decorators.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/extractors.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/__init__.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/complexity.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/connectivity.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/csp.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/dimensionality.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/signal.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/spectral.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/feature_bank/utils.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/inspect.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/serialization.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/features/utils.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/mongodb.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/preprocessing.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash/utils.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash.egg-info/dependency_links.txt +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/eegdash.egg-info/top_level.txt +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/setup.cfg +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/tests/test_correctness.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/tests/test_eegdash.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/tests/test_init.py +0 -0
- {eegdash-0.3.2.dev54 → eegdash-0.3.3.dev58}/tests/test_mongo_connection.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3.dev58
|
|
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: GNU General Public License
|
|
@@ -60,6 +60,8 @@ Requires-Dist: s3fs
|
|
|
60
60
|
Requires-Dist: scipy
|
|
61
61
|
Requires-Dist: tqdm
|
|
62
62
|
Requires-Dist: xarray
|
|
63
|
+
Requires-Dist: h5io>=0.2.4
|
|
64
|
+
Requires-Dist: pymatreader
|
|
63
65
|
Provides-Extra: tests
|
|
64
66
|
Requires-Dist: pytest; extra == "tests"
|
|
65
67
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -10,6 +10,7 @@ import numpy as np
|
|
|
10
10
|
import pandas as pd
|
|
11
11
|
import s3fs
|
|
12
12
|
from bids import BIDSLayout
|
|
13
|
+
from fsspec.callbacks import TqdmCallback
|
|
13
14
|
from joblib import Parallel, delayed
|
|
14
15
|
from mne._fiff.utils import _read_segments_file
|
|
15
16
|
from mne.io import BaseRaw
|
|
@@ -98,8 +99,27 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
98
99
|
self.s3file = re.sub(r"(^|/)ds\d{6}/", r"\1", self.s3file, count=1)
|
|
99
100
|
|
|
100
101
|
self.filecache.parent.mkdir(parents=True, exist_ok=True)
|
|
102
|
+
info = filesystem.info(self.s3file)
|
|
103
|
+
size = info.get("size") or info.get("Size")
|
|
104
|
+
|
|
105
|
+
callback = TqdmCallback(
|
|
106
|
+
size=size,
|
|
107
|
+
tqdm_kwargs=dict(
|
|
108
|
+
desc=f"Downloading {Path(self.s3file).name}",
|
|
109
|
+
unit="B",
|
|
110
|
+
unit_scale=True,
|
|
111
|
+
unit_divisor=1024,
|
|
112
|
+
dynamic_ncols=True,
|
|
113
|
+
leave=True,
|
|
114
|
+
mininterval=0.2,
|
|
115
|
+
smoothing=0.1,
|
|
116
|
+
miniters=1,
|
|
117
|
+
bar_format="{desc}: {percentage:3.0f}%|{bar}| {n_fmt}/{total_fmt} "
|
|
118
|
+
"[{elapsed}<{remaining}, {rate_fmt}]",
|
|
119
|
+
),
|
|
120
|
+
)
|
|
121
|
+
filesystem.get(self.s3file, self.filecache, callback=callback)
|
|
101
122
|
|
|
102
|
-
filesystem.download(self.s3file, self.filecache)
|
|
103
123
|
self.filenames = [self.filecache]
|
|
104
124
|
|
|
105
125
|
def _download_dependencies(self) -> None:
|
|
@@ -119,7 +139,26 @@ class EEGDashBaseDataset(BaseDataset):
|
|
|
119
139
|
# in the case of the competition.
|
|
120
140
|
if not filepath.exists():
|
|
121
141
|
filepath.parent.mkdir(parents=True, exist_ok=True)
|
|
122
|
-
filesystem.
|
|
142
|
+
info = filesystem.info(s3path)
|
|
143
|
+
size = info.get("size") or info.get("Size")
|
|
144
|
+
|
|
145
|
+
callback = TqdmCallback(
|
|
146
|
+
size=size,
|
|
147
|
+
tqdm_kwargs=dict(
|
|
148
|
+
desc=f"Downloading {Path(s3path).name}",
|
|
149
|
+
unit="B",
|
|
150
|
+
unit_scale=True,
|
|
151
|
+
unit_divisor=1024,
|
|
152
|
+
dynamic_ncols=True,
|
|
153
|
+
leave=True,
|
|
154
|
+
mininterval=0.2,
|
|
155
|
+
smoothing=0.1,
|
|
156
|
+
miniters=1,
|
|
157
|
+
bar_format="{desc}: {percentage:3.0f}%|{bar}| {n_fmt}/{total_fmt} "
|
|
158
|
+
"[{elapsed}<{remaining}, {rate_fmt}]",
|
|
159
|
+
),
|
|
160
|
+
)
|
|
161
|
+
filesystem.get(s3path, filepath, callback=callback)
|
|
123
162
|
|
|
124
163
|
def get_raw_bids_args(self) -> dict[str, Any]:
|
|
125
164
|
"""Helper to restrict the metadata record to the fields needed to locate a BIDS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eegdash
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3.dev58
|
|
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: GNU General Public License
|
|
@@ -60,6 +60,8 @@ Requires-Dist: s3fs
|
|
|
60
60
|
Requires-Dist: scipy
|
|
61
61
|
Requires-Dist: tqdm
|
|
62
62
|
Requires-Dist: xarray
|
|
63
|
+
Requires-Dist: h5io>=0.2.4
|
|
64
|
+
Requires-Dist: pymatreader
|
|
63
65
|
Provides-Extra: tests
|
|
64
66
|
Requires-Dist: pytest; extra == "tests"
|
|
65
67
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -12,8 +12,6 @@ FILES_PER_RELEASE = [1342, 1405, 1812, 3342, 3326, 1227, 3100, 2320, 2885, 2516,
|
|
|
12
12
|
RELEASE_FILES = list(zip(RELEASES, FILES_PER_RELEASE))
|
|
13
13
|
|
|
14
14
|
CACHE_DIR = (Path.home() / "mne_data" / "eeg_challenge_cache").resolve()
|
|
15
|
-
print()
|
|
16
|
-
print(CACHE_DIR)
|
|
17
15
|
CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
|
18
16
|
|
|
19
17
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
from eegdash.dataset import EEGDashDataset
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_progress_bar_output(capsys, tmp_path):
|
|
8
|
+
temporary = (Path.home() / "mne_data" / "temp").resolve()
|
|
9
|
+
|
|
10
|
+
if temporary.exists():
|
|
11
|
+
shutil.rmtree(temporary)
|
|
12
|
+
|
|
13
|
+
temporary.mkdir(parents=True, exist_ok=True)
|
|
14
|
+
|
|
15
|
+
eegdash_dataset = EEGDashDataset(
|
|
16
|
+
query={
|
|
17
|
+
"dataset": "ds005514",
|
|
18
|
+
"task": "RestingState",
|
|
19
|
+
"subject": "NDARDB033FW5",
|
|
20
|
+
},
|
|
21
|
+
cache_dir=temporary,
|
|
22
|
+
)
|
|
23
|
+
_ = eegdash_dataset.datasets[0].raw
|
|
24
|
+
|
|
25
|
+
out = capsys.readouterr()
|
|
26
|
+
# tqdm uses carriage returns; just assert a stable fragment:
|
|
27
|
+
assert "Downloading" in out.err
|
|
28
|
+
assert out.err # non-empty
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|