Skip to content

Improving the pre-commit and making sure that everybody can install eegdash #27

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

Merged
merged 28 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
acd6d4d
Applying pre-commit
bruAristimunha Jun 6, 2025
0f6254e
Merge branch 'develop' of https://github.com/bruAristimunha/EEGDash i…
bruAristimunha Jun 8, 2025
461ac2d
updating pre-commit
bruAristimunha Jun 8, 2025
52c2428
updating pre-commit
bruAristimunha Jun 8, 2025
611d7b4
cleaning more
bruAristimunha Jun 8, 2025
dce9df1
updating the base file
bruAristimunha Jun 8, 2025
76088ca
returning version
bruAristimunha Jun 8, 2025
c744d8e
returning
bruAristimunha Jun 8, 2025
b6f9ac1
make sure that pre-commit is execute also during the commit
bruAristimunha Jun 8, 2025
491919d
changing the logger
bruAristimunha Jun 8, 2025
7600cae
test every commit
bruAristimunha Jun 8, 2025
5067ed2
updating the .ruff_cache
bruAristimunha Jun 8, 2025
e76212c
fixing things across the project
bruAristimunha Jun 8, 2025
2480ae0
applying for pre-commit again
bruAristimunha Jun 8, 2025
2ecfcf8
updating the
bruAristimunha Jun 8, 2025
51a8e3e
updating tutorial
bruAristimunha Jun 8, 2025
bad2550
updating the eegdash
bruAristimunha Jun 8, 2025
64b76f5
returning the read the doc
bruAristimunha Jun 8, 2025
1feafab
updating the test running
bruAristimunha Jun 8, 2025
cf87ec6
removing the last version of python
bruAristimunha Jun 8, 2025
8429082
using uv
bruAristimunha Jun 8, 2025
60cb0f3
removing the pip upgrade, not need
bruAristimunha Jun 8, 2025
086a7fa
cache dependecy
bruAristimunha Jun 8, 2025
aaa480a
including test
bruAristimunha Jun 8, 2025
6e6f329
updating the tests file
bruAristimunha Jun 8, 2025
e2e5d12
updating to make more sense the api.
bruAristimunha Jun 8, 2025
628f814
updating
bruAristimunha Jun 8, 2025
2e8b0ee
updating api.py
bruAristimunha Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true

on: [pull_request]
on: [push, pull_request]

jobs:
pre-commit:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ concurrency:
on:
push:
branches:
- "master"
- "*"
pull_request:
branches:
- '*' # all branches, including forks
Expand All @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.12"] # first and last supported Python version
steps:
## Install Braindecode
- name: Checking Out Repository
Expand All @@ -31,15 +31,18 @@ jobs:
with:
path: ~/mne_data
key: ${{ runner.os }}-v3
- uses: actions/setup-python@v4

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Show Python Version
run: python --version
# Update pip
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install EEGDash from Current Checkout
run: pip install -e .
# Show Braindecode Version
- run: python -c "import eegdash; print(eegdash.__version__)"
run: uv pip install -e .[tests]
# Show EEGDash Version
- name: Show EEGDash Version
run: python -c "import eegdash; print(eegdash.__version__)"
- name: Run Tests
run: pytest -vvv tests/
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
old
*.egg-info
*.npy
*/*.npy
Expand All @@ -14,3 +13,4 @@ dist/
**/*/eegdash.egg-info/
.env
tests/data/
.ruff_cache/
39 changes: 12 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
default_language_version:
python: python3
ci:
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks

'
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks'
autofix_prs: true
autoupdate_branch: master
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: quarterly
autoupdate_schedule: weekly
skip: []
submodules: false
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.11.7
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
hooks:
- id: ruff
name: ruff lint docs & examples
name: ruff lint & format
args:
- --fix
- --select=E,W,F,I,D
- --ignore=E402,E501,F401,D103,D400,D100,D101,D102,D105,D107,D415,D417,D205
files: ^(docs|examples)/
- id: ruff
name: ruff lint eegdash preview
args:
- --fix
- --preview
- --select=NPY201
- --ignore=D100,D101,D102,D105,D107,D415,D417,D205
files: ^eegdash/
- id: ruff
name: ruff lint docs & examples
args:
- --fix
- --select=D
- --ignore=D103,D400,E402,D100,D101,D102,D105,D107,D415,D417,D205
files: ^(docs|examples)/
- --show-fixes
# Selects all rules from your original config (E,W,F,I,D) and enables import sorting (I)
# and unused import removal (F401 is part of 'F' and is no longer ignored).
- --select=E,W,F,D,NPY201
- --ignore=E402,E501,D100,D101,D102,D103,D104,D105,D107,D205,D400,D415,D417,F403,D401,E741,E722,D419
files: ^(eegdash|docs|examples|notebooks|scripts|tests)/
exclude: \.ipynb$
- id: ruff-format
name: ruff format code
files: ^(eegdash|docs|examples)/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
Expand All @@ -50,7 +36,6 @@ repos:
exclude_types:
- csv
- json
exclude: ^tests/|generated/^.github
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

Expand All @@ -20,4 +21,4 @@ sphinx:
# python:
# install:
# - requirements: docs/requirements.txt

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Copyright (C) 2024-2025

Young Truong, UCSD, [email protected]
Arnaud Delorme, UCSD, [email protected]
Bruno Aristimunha, [email protected]

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# EEG-Dash

To leverage recent and ongoing advancements in large-scale computational methods and to ensure the preservation of scientific data generated from publicly funded research, the EEG-DaSh data archive will create a data-sharing resource for MEEG (EEG, MEG) data contributed by collaborators for machine learning (ML) and deep learning (DL) applications.

## Data source

The data in EEG-DaSh originates from a collaboration involving 25 laboratories, encompassing 27,053 participants. This extensive collection includes MEEG data, which is a combination of EEG and MEG signals. The data is sourced from various studies conducted by these labs, involving both healthy subjects and clinical populations with conditions such as ADHD, depression, schizophrenia, dementia, autism, and psychosis. Additionally, data spans different mental states like sleep, meditation, and cognitive tasks. In addition, EEG-DaSh will incorporate a subset of the data converted from NEMAR, which includes 330 MEEG BIDS-formatted datasets, further expanding the archive with well-curated, standardized neuroelectromagnetic data.

## Featured data
Expand All @@ -21,9 +23,11 @@ The following HBN datasets are currently featured on EEGDash. Documentation abou
A total of [246 other datasets](datasets.md) are also available through EEGDash.

## Data format

EEGDash queries return a **Pytorch Dataset** formatted to facilitate machine learning (ML) and deep learning (DL) applications. PyTorch Datasets are the best format for EEGDash queries because they provide an efficient, scalable, and flexible structure for machine learning (ML) and deep learning (DL) applications. They allow seamless integration with PyTorch’s DataLoader, enabling efficient batching, shuffling, and parallel data loading, which is essential for training deep learning models on large EEG datasets.

## Data preprocessing

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.

## EEG-Dash usage
Expand Down
2 changes: 1 addition & 1 deletion eegdash/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .main import EEGDash, EEGDashDataset
from .api import EEGDash, EEGDashDataset

__all__ = ["EEGDash", "EEGDashDataset"]
__version__ = "0.1.0"
Loading
Loading