Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#553)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.3.0](psf/black@23.12.1...24.3.0)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.3.5](astral-sh/ruff-pre-commit@v0.1.9...v0.3.5)
- [github.com/adrienverge/yamllint.git: v1.33.0 → v1.35.1](https://github.com/adrienverge/yamllint.git/compare/v1.33.0...v1.35.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Apr 4, 2024
1 parent 531ea93 commit a6e6815
Show file tree
Hide file tree
Showing 42 changed files with 48 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:


- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
language_version: python3.8
Expand All @@ -54,7 +54,7 @@ repos:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [
Expand All @@ -69,7 +69,7 @@ repos:
exclude: ^docs/ | ^setup\.py$ |

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.3.5
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix, --ignore, E501 ]
Expand All @@ -86,7 +86,7 @@ repos:
exclude: ^tests/|generated/

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
rev: v1.35.1
hooks:
- id: yamllint
exclude: >
Expand Down
1 change: 1 addition & 0 deletions examples/advanced_examples/plot_filterbank_csp_vs_csp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This example show a comparison of CSP versus FilterBank CSP on the
very popular dataset 2a from the BCI competition IV.
"""

# Authors: Alexandre Barachant <[email protected]>
#
# License: BSD (3-clause)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
for finding the best model parameter, using grid search. Two models
are compared, one "vanilla" model with model tuned via grid search.
"""

import os
from pickle import load

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- XDAWN extended covariance and LR on tangent space, based on Numpy
"""

# Authors: Sylvain Chevallier
#
# License: BSD (3-clause)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
utility function to select common electrodes shared between datasets.
This tutorial demonstrates how to use this functionality.
"""

# Authors: Sylvain Chevallier <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/advanced_examples/plot_statistical_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
they can be used.
"""

# Authors: Vinay Jayaram <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/changing_download_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This is a minimal example to demonstrate how to change the default data
download directory to a custom path/location. """

# Authors: Divyesh Narayanan <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/example_codecarbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
generation, the results is computed on a local cluster but could be easily
replicated on your infrastructure.
"""

# Authors: Igor Carrara <[email protected]>
# Bruno Aristimunha <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions examples/external/plot_learning_curve_p300_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
We will use the P300 paradigm, which uses the AUC as metric.
"""

# Authors: Jan Sosulski
#
# License: BSD (3-clause)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
We will use the LeftRightImagery paradigm. This will restrict the analysis
to two classes (left- vs right-hand) and use AUC as metric.
"""

# Original author: Alexandre Barachant <[email protected]>
# Learning curve modification: Jan Sosulski
#
Expand Down
1 change: 1 addition & 0 deletions examples/learning_curve/plot_learning_curve_p300.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
We will use the P300 paradigm, which uses the AUC as metric.
"""

# Authors: Jan Sosulski
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/load_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This example shows how to use load the pretrained pipeline in MOABB.
"""

# Authors: Igor Carrara <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/noplot_bids_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
We will use the AlexMI dataset [3]_, one of the smallest in
people and one that can be downloaded quickly.
"""

# Authors: Pierre Guetschel <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/noplot_vr_pc_p300_different_epoch_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
This example demonstrates the use of `get_block_repetition`, which allows
to specify the experimental blocks and repetitions for analysis.
"""

# Authors: Pedro Rodrigues <[email protected]>
# Modified by: Gregoire Cattan <[email protected]>
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
dataset to keep the computation time low, but this benchmark is designed
to easily scale to many datasets.
"""

# Authors: Sylvain Chevallier <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_benchmark_DL.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
For this example, we will use only one dataset to keep the computation time low, but this benchmark is designed
to easily scale to many datasets.
"""

# Authors: Igor Carrara <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_benchmark_braindecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
For this example, we will use only 2 datasets to keep the computation time low, but this benchmark is designed
to easily scale to many datasets.
"""

# Authors: Igor Carrara <[email protected]>
# Bruno Aristimunha <[email protected]>
# Sylvain Chevallier <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions examples/plot_benchmark_grid_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For this example, we will use only one dataset to keep the computation time low, but this benchmark is designed
to easily scale to many datasets.
"""

# Authors: Igor Carrara <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_braindecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
This example shows how to use BrainDecode in combination with MOABB evaluation.
In this example, we use the architecture EEGNetv4.
"""

# Authors: Igor Carrara <[email protected]>
# Bruno Aristimunha <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions examples/plot_cross_session_motor_imagery.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
is trained on every other session and performance are evaluated on the current
session.
"""

# Authors: Alexandre Barachant <[email protected]>
# Sylvain Chevallier <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions examples/plot_cross_session_multiple_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
is trained on every other session and performance are evaluated on the current
session.
"""

# Authors: Sylvain Chevallier <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_cross_subject_ssvep.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
We will use the SSVEP paradigm, which uses the AUC as metric.
"""

# Authors: Sylvain Chevallier <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_disk_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
method of the datasets. It works the same way as for a
paradigm except that it will save un-processed raw recordings.
"""

# Authors: Pierre Guetschel <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_explore_paradigm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- LeftRightImagery
"""

# Authors: Alexandre Barachant <[email protected]>
# Sylvain Chevallier <[email protected]>
#
Expand Down
1 change: 1 addition & 0 deletions examples/plot_fixed_interval_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
In this example, we will use the Zhou2016 dataset because
it is relatively small and can be downloaded quickly.
"""

# Authors: Pierre Guetschel <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_within_session_p300.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
We will use the P300 paradigm, which uses the AUC as metric.
"""

# Authors: Pedro Rodrigues <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions examples/plot_within_session_ssvep.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
pipeline using a 5-fold cross-validation. The reported metric (here, accuracy)
is the average of all fold.
"""

# Authors: Sylvain Chevallier <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions moabb/analysis/meta_analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Meta-analysis functions for MOABB."""

import itertools
import logging

Expand Down
1 change: 1 addition & 0 deletions moabb/datasets/Lee2019.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""BMI/OpenBMI dataset."""

from functools import partialmethod

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions moabb/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
See https://github.com/NeuroTechX/moabb/wiki/Datasets-Support for detail
on datasets (electrodes, number of trials, sessions, etc.)
"""

from . import compound_dataset

# flake8: noqa
Expand Down
1 change: 1 addition & 0 deletions moabb/datasets/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Base class for a dataset."""

import abc
import logging
import re
Expand Down
1 change: 1 addition & 0 deletions moabb/evaluations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
generalization statistic (AUC score, f-score, accuracy, etc) -- it can be
either within-recording-session accuracy, across-session within-subject
accuracy, across-subject accuracy, or other transfer learning settings."""

# flake8: noqa
from .evaluations import (
CrossSessionEvaluation,
Expand Down
1 change: 1 addition & 0 deletions moabb/paradigms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
have two-class, multi-class, or continuous paradigms; similarly,
different preprocessing is necessary for ERP vs ERD paradigms.
"""

# flake8: noqa
from moabb.paradigms.cvep import *
from moabb.paradigms.fixed_interval_windows import *
Expand Down
1 change: 1 addition & 0 deletions moabb/tests/download.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests to ensure that datasets download correctly."""

import unittest

import mne
Expand Down
7 changes: 4 additions & 3 deletions moabb/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Util functions for moabb."""

import inspect
import logging
import os
Expand Down Expand Up @@ -50,9 +51,9 @@ def _set_tensorflow_seed(seed: int) -> None:
import tensorflow as tf

tf.random.set_seed(seed) # tf cpu fix seed
os.environ[
"TF_DETERMINISTIC_OPS"
] = "1" # tf gpu fix seed, please `pip install tensorflow-determinism` first
os.environ["TF_DETERMINISTIC_OPS"] = (
"1" # tf gpu fix seed, please `pip install tensorflow-determinism` first
)
tf.keras.utils.set_random_seed(seed)

except ImportError:
Expand Down
1 change: 1 addition & 0 deletions scripts/data_visualization_p300.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.. versionadded:: 0.4.5
"""

import warnings

# Authors: Jan Sosulski <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions tutorials/4_adding_a_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Tutorial 4: Creating a dataset class
====================================
"""

# Authors: Pedro L. C. Rodrigues, Sylvain Chevallier
#
# https://github.com/plcrodrigues/Workshop-MOABB-BCI-Graz-2019
Expand Down
1 change: 1 addition & 0 deletions tutorials/noplot_tutorial_5_build_a_custom_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Tutorial 5: Creating a dataset class
====================================
"""

# Author: Gregoire Cattan
#
# https://github.com/plcrodrigues/Workshop-MOABB-BCI-Graz-2019
Expand Down
1 change: 1 addition & 0 deletions tutorials/plot_Getting_Started.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
next tutorial.
"""

# Authors: Vinay Jayaram <[email protected]>
#
# License: BSD (3-clause)
Expand Down
1 change: 1 addition & 0 deletions tutorials/tutorial_1_simple_example_motor_imagery.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use a CSP to enhance the signal-to-noise ratio of the EEG epochs and a LDA to
classify these signals.
"""

# Authors: Pedro L. C. Rodrigues, Sylvain Chevallier
#
# https://github.com/plcrodrigues/Workshop-MOABB-BCI-Graz-2019
Expand Down
1 change: 1 addition & 0 deletions tutorials/tutorial_2_using_mulitple_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
a classifier with three different MI datasets instead of just one. As before,
we begin by importing all relevant libraries.
"""

# Authors: Pedro L. C. Rodrigues, Sylvain Chevallier
#
# https://github.com/plcrodrigues/Workshop-MOABB-BCI-Graz-2019
Expand Down
1 change: 1 addition & 0 deletions tutorials/tutorial_3_benchmarking_multiple_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
In this last part, we extend the previous example by assessing the
classification score of not one but three classification pipelines.
"""

# Authors: Pedro L. C. Rodrigues, Sylvain Chevallier
#
# https://github.com/plcrodrigues/Workshop-MOABB-BCI-Graz-2019
Expand Down

0 comments on commit a6e6815

Please sign in to comment.