Skip to content

Commit a98275d

Browse files
committed
reconfigure setup
1 parent 33dfb3c commit a98275d

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ dependencies = [
2929
"joblib",
3030
"braindecode",
3131
"mne-bids",
32+
"pybids",
33+
"pymatreader",
34+
"pyarrow",
35+
"tqdm",
36+
"numba",
3237
]
3338
[project.urls]
3439
Homepage = "https://github.com/sccn/EEG-Dash-Data"
File renamed without changes.

src/eegdash/data_config.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
config = {
2+
"required_fields": ["data_name"],
3+
"attributes": {
4+
"data_name": "str",
5+
"dataset": "str",
6+
"bidspath": "str",
7+
"subject": "str",
8+
"task": "str",
9+
"session": "str",
10+
"run": "str",
11+
"sampling_frequency": "float",
12+
"modality": "str",
13+
"nchans": "int",
14+
"ntimes": "int"
15+
},
16+
"description_fields": ["subject", "session", "run", "task", "age", "gender", "sex"],
17+
"bids_dependencies_files": [
18+
"dataset_description.json",
19+
"participants.tsv",
20+
"events.tsv",
21+
"events.json",
22+
"eeg.json",
23+
"electrodes.tsv",
24+
"channels.tsv",
25+
"coordsystem.json"
26+
],
27+
"accepted_query_fields": ["data_name", "dataset"]
28+
}

src/eegdash/main.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import numpy as np
1111
import xarray as xr
1212
from .data_utils import EEGBIDSDataset, EEGDashBaseRaw, EEGDashBaseDataset
13+
from .data_config import config as data_config
1314
from braindecode.datasets import BaseDataset, BaseConcatDataset
1415
from collections import defaultdict
1516
from pymongo import MongoClient, InsertOne, UpdateOne, DeleteOne
@@ -19,10 +20,11 @@ class EEGDash:
1920
def __init__(self,
2021
is_public=True):
2122
# Load config file
22-
config_path = Path(__file__).parent / 'config.json'
23-
with open(config_path, 'r') as f:
24-
self.config = json.load(f)
23+
# config_path = Path(__file__).parent / 'config.json'
24+
# with open(config_path, 'r') as f:
25+
# self.config = json.load(f)
2526

27+
self.config = data_config
2628
if is_public:
2729
DB_CONNECTION_STRING="mongodb+srv://eegdash-user:[email protected]/?retryWrites=true&w=majority&appName=Cluster0"
2830
else:

0 commit comments

Comments
 (0)