From b804498932cbf958593bb479561746f7d580c9e9 Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Tue, 4 Mar 2025 21:43:01 +0100 Subject: [PATCH 01/12] [MNT] update to release --- Dockerfile | 26 -------------------------- docs/source/whats_new.rst | 20 +++++++++++++++++--- moabb/__init__.py | 2 +- pyproject.toml | 2 +- 4 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4de485d74..000000000 --- a/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Use the nvcr.io/nvidia/pytorch:22.11-py3 base image -FROM nvcr.io/nvidia/pytorch:22.11-py3 - -# Define the arguments to be passed at build-time -ARG USER_ID -ARG GROUP_ID -ARG USER - -# Add a new group and user with the specified GID and UID -RUN addgroup --gid $GROUP_ID $USER \ - && adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID $USER - -# Set the MNE_USE_NUMBA environment variable to false -ENV MNE_USE_NUMBA=false - -# Copy the current directory to the '/workdir' directory in the container -ADD . /workdir - -# Copy the 'docker/meta_requirements.txt' file to the current directory -COPY bash/meta_requirements.txt . - -# Install the Python packages listed in the 'meta_requirements.txt' file -RUN pip3 install -r meta_requirements.txt - -# Set the working directory to '/workdir' -WORKDIR /workdir diff --git a/docs/source/whats_new.rst b/docs/source/whats_new.rst index 41f365887..324c310f9 100644 --- a/docs/source/whats_new.rst +++ b/docs/source/whats_new.rst @@ -17,8 +17,21 @@ Develop branch Enhancements ~~~~~~~~~~~~ -- Adding :class:`moabb.evaluations.splitters.WithinSessionSplitter` (:gh:`664` by `Bruna Lopes_`) +Bugs +~~~~ + +API changes +~~~~~~~~~~~ + + +Version - 1.1.2 (Stable - PyPi) +--------------------------------- + + +Enhancements +~~~~~~~~~~~~ +- Adding :class:`moabb.evaluations.splitters.WithinSessionSplitter` (:gh:`664` by `Bruna Lopes_`) - Update version of pyRiemann to 0.7 (:gh:`671` by `Gregoire Cattan`_) - Add columns definitions in the datasets doc (:gh:`672` by `Pierre Guetschel`_) - Add ERP CORE datasets :class:`moabb.datasets.ErpCore2021` dataset (:gh:`627` by `Taha Habib`_) @@ -46,8 +59,9 @@ API changes ~~~~~~~~~~~ - Removing the braindecode module from inside moabb (:gh:`666` by `Bruno Aristimunha`_ ) -Version - 1.1.1 (Stable - PyPi) ---------------------------------- + +Version - 1.1.1 +---------------- Enhancements ~~~~~~~~~~~~ diff --git a/moabb/__init__.py b/moabb/__init__.py index 0a84ce77c..b4ed0ba5e 100644 --- a/moabb/__init__.py +++ b/moabb/__init__.py @@ -1,5 +1,5 @@ # flake8: noqa -__version__ = "1.1.1" +__version__ = "1.1.2" from .benchmark import benchmark from .utils import make_process_pipelines, set_download_dir, set_log_level, setup_seed diff --git a/pyproject.toml b/pyproject.toml index f04708797..3cb483999 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "moabb" -version = "1.1.1" +version = "1.1.2" description = "Mother of All BCI Benchmarks" authors = ["Alexandre Barachant", "Vinay Jayaram"] maintainers = ["Sylvain Chevallier "] From 286b3c106ae2081f47db47a6ff78c6604b0d5e1f Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Tue, 4 Mar 2025 21:56:54 +0100 Subject: [PATCH 02/12] [MNT] update to release --- CITATION.cff | 4 +- README.md | 311 ++++++++++++++++-------------------------- docs/Makefile | 1 + docs/source/README.md | 63 ++++++--- 4 files changed, 166 insertions(+), 213 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 4aa2d08af..8a1d711bc 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -70,7 +70,7 @@ authors: given-names: "Sylvain" orcid: "https://orcid.org/0000-0003-3027-8241" title: "Mother of all BCI Benchmarks" -version: 1.1.1 +version: 1.1.2 doi: 10.5281/zenodo.10034223 -date-released: 2024-09-16 +date-released: 2025-03-02 url: "https://github.com/NeuroTechX/moabb" diff --git a/README.md b/README.md index 03c5b1c84..acee29ea3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ # Mother of all BCI Benchmarks -

- banner -

-

+

+ Build a comprehensive benchmark of popular Brain-Computer Interface (BCI) algorithms applied on an extensive list of freely available EEG datasets.

+ ## Disclaimer **This is an open science project that may evolve depending on the need of the @@ -80,123 +79,108 @@ state of the art by 5% ...”. ## Installation -### Pip installation - -To use MOABB, you could simply do: \ -`pip install MOABB` \ -See [Troubleshooting](#Troubleshooting) section if you have a problem. - -### Manual installation - -You could fork or clone the repository and go to the downloaded directory, then run: +Please check the instalation webpage with the description and step to install moabb! -1. install `poetry` (only once per machine):\ - `curl -sSL https://install.python-poetry.org | python3 -`\ - or [checkout installation instruction](https://python-poetry.org/docs/#installation) or - use [conda forge version](https://anaconda.org/conda-forge/poetry) -1. (Optional, skip if not sure) Disable automatic environment creation:\ - `poetry config virtualenvs.create false` -1. install all dependencies in one command (have to be run in the project directory):\ - `poetry install` +[Install](https://neurotechx.github.io/moabb/install/install.html)] See [contributors' guidelines](CONTRIBUTING.md) for detailed explanation. -### Requirements we use - -See `pyproject.toml` file for full list of dependencies - -## Running - -### Verify Installation - -To ensure it is running correctly, you can also run - -``` -pytest moabb.tests -``` - -once it is installed. ### Use MOABB -First, you could take a look at our [tutorials](./tutorials) that cover the most important -concepts and use cases. Also, we have a several [examples](./examples/) available. - -You might be interested in [MOABB documentation][link_moabb_docs] - -### Moabb and docker - -Moabb has a default image to run the benchmark. You have two options to download this -image: build from scratch or pull from the docker hub. **We recommend pulling from the -docker hub**. - -If this were your first time using docker, you would need to **install the docker** and -**login** on docker hub. We recommend the -[official](https://docs.docker.com/desktop/install/linux-install/) docker documentation -for this step, it is essential to follow the instructions. - -After installing docker, you can pull the image from the docker hub: - -```bash -docker pull baristimunha/moabb -# rename the tag to moabb -docker tag baristimunha/moabb moabb -``` - -If you want to build the image from scratch, you can use the following command at the -root. You may have to login with the API key in the -[NGC Catalog](https://catalog.ngc.nvidia.com/) to run this command. - -```bash -bash docker/create_docker.sh -``` - -With the image downloaded or rebuilt from scratch, you will have an image called `moabb`. -To run the default benchmark, still at the root of the project, and you can use the -following command: - -```bash -mkdir dataset -mkdir results -mkdir output -bash docker/run_docker.sh PATH_TO_ROOT_FOLDER -``` - -An example of the command is: - -```bash -cd /home/user/project/moabb -mkdir dataset -mkdir results -mkdir output -bash docker/run_docker.sh /home/user/project/moabb -``` - -Note: It is important to use an absolute path for the root folder to run, but you can -modify the run_docker.sh script to save in another path beyond the root of the project. By -default, the script will save the results in the project's root in the folder `results`, -the datasets in the folder `dataset` and the output in the folder `output`. - -## Supported datasets - -The list of supported datasets can be found here : -https://neurotechx.github.io/moabb/datasets.html - -Detailed information regarding datasets (electrodes, trials, sessions) are indicated on -the wiki: https://github.com/NeuroTechX/moabb/wiki/Datasets-Support - -### Submit a new dataset - -you can submit a new dataset by mentioning it to this -[issue](https://github.com/NeuroTechX/moabb/issues/1). The datasets currently on our radar -can be seen [here](https://github.com/NeuroTechX/moabb/wiki/Datasets-Support). - -## Who are we? - -The founders of the Mother of all BCI Benchmarks are [Alexander Barachant][link_alex_b] -and [Vinay Jayaram][link_vinay]. This project is under the umbrella of -[NeuroTechX][link_neurotechx], the international community for NeuroTech enthusiasts. The -project is currently maintained by [Sylvain Chevallier][link_sylvain]. +First, you could take a look at our [tutorials](./auto_tutorials/index.html) that cover +the most important concepts and use cases. Also, we have a gallery of +[examples](./auto_examples/index.html) available. + +## Core Team + +This project is under the umbrella of [NeuroTechX][link_neurotechx], the international +community for NeuroTech enthusiasts. + +The project is currently maintained by: + + + + + + + + + + + + + + + + + + +
Sylvain ChevallierBruno AristimunhaIgor CarraraPierre Guetschel
Sylvain ChevallierBruno AristimunhaIgor CarraraPierre Guetschel
+ +The Mother of all BCI Benchmarks was founded by Alexander Barachant and Vinay Jayaram, who +are experts in the field of Brain-Computer Interfaces (BCI). At moment, both works as +Research Scientist + + + + + + + + + + + + + +
Alexander BarachantVinay Jayaram
Alexander BarachantVinay Jayaram
+ +## Contributors + +The MOABB is a community project, and we are always thankful for all the contributors! + +
+ + + +
+ +Special acknowledge for the extra MOABB contributors: + + + + + + + + + + + +
Pedro Rodrigues
 Pedro L. C. Rodrigues
### What do we need? @@ -213,78 +197,6 @@ professional development of any and all of our contributors. If you're looking t code, try out working collaboratively, or translate your skills to the digital domain, we're here to help. -### Get involved - -If you think you can help in any of the areas listed above (and we bet you can) or in any -of the many areas that we haven't yet thought of (and here we're _sure_ you can) then -please check out our [contributors' guidelines](CONTRIBUTING.md) and our -[roadmap](ROADMAP.md). - -Please note that it's very important to us that we maintain a positive and supportive -environment for everyone who wants to participate. When you join us we ask that you follow -our [code of conduct](CODE_OF_CONDUCT.md) in all interactions both on and offline. - -## Contact us - -If you want to report a problem or suggest an enhancement, we'd love for you to -[open an issue](../../issues) at this GitHub repository because then we can get right on -it. - -For a less formal discussion or exchanging ideas, you can also reach us on the [Gitter -channel][link_gitter] or join our weekly office hours! This an open video meeting -happening on a [regular basis](https://github.com/NeuroTechX/moabb/issues/191), please ask -the link on the gitter channel. We are also on [NeuroTechX Slack #moabb -channel][link_neurotechx_signup]. - -## Architecture and Main Concepts - -

- banner -

-There are 4 main concepts in the MOABB: the datasets, the paradigm, the evaluation, and the pipelines. In addition, we offer statistical and visualization utilities to simplify the workflow. - -### Datasets - -A dataset handles and abstracts low-level access to the data. The dataset will read data -stored locally, in the format in which they have been downloaded, and will convert them -into a MNE raw object. There are options to pool all the different recording sessions per -subject or to evaluate them separately. - -### Paradigm - -A paradigm defines how the raw data will be converted to trials ready to be processed by a -decoding algorithm. This is a function of the paradigm used, i.e. in motor imagery one can -have two-class, multi-class, or continuous paradigms; similarly, different preprocessing -is necessary for ERP vs ERD paradigms. - -### Evaluations - -An evaluation defines how we go from trials per subject and session to a 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. - -### Pipelines - -Pipeline defines all steps required by an algorithm to obtain predictions. Pipelines are -typically a chain of sklearn compatible transformers and end with a sklearn compatible -estimator. See -[Pipelines](http://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html) -for more info. - -### Statistics and visualization - -Once an evaluation has been run, the raw results are returned as a DataFrame. This can be -further processed via the following commands to generate some basic visualization and -statistical comparisons: - -``` -from moabb.analysis import analyze - -results = evaluation.process(pipeline_dict) -analyze(results) -``` - ## Citing MOABB and related publications If you use MOABB in your experiments, please cite this library when @@ -296,15 +208,17 @@ Mother of all BCI Benchmarks (MOABB), 2023. DOI: 10.5281/zenodo.10034223. ``` and here is the Bibtex version: ```bibtex + @software{Aristimunha_Mother_of_all, author = {Aristimunha, Bruno and Carrara, Igor and Guetschel, Pierre and Sedlar, Sara and Rodrigues, Pedro and Sosulski, Jan and Narayanan, Divyesh and Bjareholt, Erik and Barthelemy, Quentin and Kobler, Reinmar and Schirrmeister, Robin Tibor and Kalunga, Emmanuel and Darmet, Ludovic and Gregoire, Cattan and Abdul Hussain, Ali and Gatti, Ramiro and Goncharenko, Vladislav and Thielen, Jordy and Moreau, Thomas and Roy, Yannick and Jayaram, Vinay and Barachant, Alexandre and Chevallier, Sylvain}, doi = {10.5281/zenodo.10034223}, title = {{Mother of all BCI Benchmarks}}, url = {https://github.com/NeuroTechX/moabb}, - version = {1.1.0}, - year = {2024} + version = {1.1.2}, + year = {2025} } ``` + If you want to cite the scientific contributions of MOABB, you could use the following paper: > Sylvain Chevallier, Igor Carrara, Bruno Aristimunha, Pierre Guetschel, Sara Sedlar, Bruna Junqueira Lopes, Sébastien Velut, Salim Khazem, Thomas Moreau @@ -320,16 +234,27 @@ If you publish a paper using MOABB, please contact us on [gitter][link_gitter] o issue, and we will add your paper to the [dedicated wiki page](https://github.com/NeuroTechX/moabb/wiki/MOABB-bibliography). -## Thank You -Thank you so much (Danke schön! Merci beaucoup!) for visiting the project and we do hope -that you'll join us on this amazing journey to build a comprehensive benchmark of popular -BCI algorithms applied on an extensive list of freely available EEG datasets. +## Contact us + +If you want to report a problem or suggest an enhancement, we'd love for you to +[open an issue](https://github.com/NeuroTechX/moabb/issues) at this GitHub repository +because then we can get right on it. + +For a less formal discussion or exchanging ideas, you can also reach us on the [Gitter +channel][link_gitter] or join our weekly office hours! This an open video meeting +happening on a [regular basis](https://github.com/NeuroTechX/moabb/issues/191), please ask +the link on the gitter channel. We are also on NeuroTechX Slack channel +[#moabb][link_neurotechx_signup]. + [link_alex_b]: http://alexandre.barachant.org/ -[link_vinay]: https://ei.is.tuebingen.mpg.de/~vjayaram +[link_vinay]: https://www.linkedin.com/in/vinay-jayaram-8635aa25 [link_neurotechx]: http://neurotechx.com/ [link_sylvain]: https://sylvchev.github.io/ +[link_bruno]: https://www.linkedin.com/in/bruaristimunha/ +[link_igor]: https://www.linkedin.com/in/carraraig/ +[link_pierre]: https://www.linkedin.com/in/pierreguetschel/ [link_neurotechx_signup]: https://neurotechx.com/ [link_gitter]: https://app.gitter.im/#/room/#moabb_dev_community:gitter.im [link_moabb_docs]: https://neurotechx.github.io/moabb/ diff --git a/docs/Makefile b/docs/Makefile index 78ff1405a..a5f730724 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -18,6 +18,7 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @python prepare_summary_tables.py ../moabb/datasets $(BUILDDIR) + @cp ..README.rst "$(SOURCEDIR)" @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) apidoc: diff --git a/docs/source/README.md b/docs/source/README.md index 5e205b8da..acee29ea3 100644 --- a/docs/source/README.md +++ b/docs/source/README.md @@ -1,17 +1,18 @@ -.. currentmodule:: moabb - -#

Mother of all BCI Benchmarks

+# Mother of all BCI Benchmarks

- + Build a comprehensive benchmark of popular Brain-Computer Interface (BCI) algorithms applied on an extensive list of freely available EEG datasets.

+ ## Disclaimer **This is an open science project that may evolve depending on the need of the community.** + + [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10034224.svg)](https://doi.org/10.5281/zenodo.10034224) [![Build Status](https://github.com/NeuroTechX/moabb/workflows/Test/badge.svg)](https://github.com/NeuroTechX/moabb/actions?query=branch%3Amaster) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) @@ -21,12 +22,26 @@ community.** ## Welcome! -Thank you for visiting the Mother of all BCI Benchmark documentation and associated -[GitHub repository](https://github.com/NeuroTechX/moabb) +First and foremost, Welcome! :tada: Willkommen! :confetti_ball: Bienvenue! +:balloon::balloon::balloon: + +Thank you for visiting the Mother of all BCI Benchmark repository. This document is a hub to give you some information about the project. Jump straight to one of the sections below, or just scroll down to find out more. +- [What are we doing? (And why?)](#what-are-we-doing) +- [Installation](#installation) +- [Running](#running) +- [Supported datasets](#supported-datasets) +- [Who are we?](#who-are-we) +- [Get in touch](#contact-us) +- [Documentation][link_moabb_docs] +- [Architecture and main concepts](#architecture-and-main-concepts) +- [Citing MOABB and related publications](#citing-moabb-and-related-publications) + +## What are we doing? + ### The problem [Brain-Computer Interfaces](https://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface) @@ -62,6 +77,15 @@ This project will be successful when we read in an abstract “ … the proposed obtained a score of 89% on the MOABB (Mother of All BCI Benchmarks), outperforming the state of the art by 5% ...”. +## Installation + +Please check the instalation webpage with the description and step to install moabb! + +[Install](https://neurotechx.github.io/moabb/install/install.html)] + +See [contributors' guidelines](CONTRIBUTING.md) for detailed explanation. + + ### Use MOABB First, you could take a look at our [tutorials](./auto_tutorials/index.html) that cover @@ -178,19 +202,22 @@ we're here to help. If you use MOABB in your experiments, please cite this library when publishing a paper to increase the visibility of open science initiatives: -> Aristimunha, B., Carrara, I., Guetschel, P., Sedlar, S., Rodrigues, P., Sosulski, J., Narayanan, D., Bjareholt, E., Quentin, B., Schirrmeister, R. T.,Kalunga, E., Darmet, L., Gregoire, C., Abdul Hussain, A., Gatti, R., Goncharenko, V., Thielen, J., Moreau, T., Roy, Y., Jayaram, V., Barachant,A., & Chevallier, S. -> Mother of all BCI Benchmarks (MOABB), 2023. DOI: 10.5281/zenodo.10034223. - +``` +Aristimunha, B., Carrara, I., Guetschel, P., Sedlar, S., Rodrigues, P., Sosulski, J., Narayanan, D., Bjareholt, E., Barthelemy, Q., Reinmar, K., Schirrmeister, R. T.,Kalunga, E., Darmet, L., Gregoire, C., Abdul Hussain, A., Gatti, R., Goncharenko, V., Thielen, J., Moreau, T., Roy, Y., Jayaram, V., Barachant,A., & Chevallier, S. +Mother of all BCI Benchmarks (MOABB), 2023. DOI: 10.5281/zenodo.10034223. +``` and here is the Bibtex version: - -> @software{Aristimunha_Mother_of_all_2023, -> author = {Aristimunha, Bruno and Carrara, Igor and Guetschel, Pierre and Sedlar, Sara and Rodrigues, Pedro and Sosulski, Jan and Narayanan, Divyesh and Bjareholt, Erik and Quentin, Barthelemy and Schirrmeister, Robin Tibor and Kalunga, Emmanuel and Darmet, Ludovic and Gregoire, Cattan and Abdul Hussain, Ali and Gatti, Ramiro and Goncharenko, Vladislav and Thielen, Jordy and Moreau, Thomas and Roy, Yannick and Jayaram, Vinay and Barachant, Alexandre and Chevallier, Sylvain}, -> doi = {10.5281/zenodo.10034223}, -> title = {{Mother of all BCI Benchmarks}}, -> url = {https://github.com/NeuroTechX/moabb}, -> version = {1.0.0}, -> year = {2023} -> } +```bibtex + +@software{Aristimunha_Mother_of_all, + author = {Aristimunha, Bruno and Carrara, Igor and Guetschel, Pierre and Sedlar, Sara and Rodrigues, Pedro and Sosulski, Jan and Narayanan, Divyesh and Bjareholt, Erik and Barthelemy, Quentin and Kobler, Reinmar and Schirrmeister, Robin Tibor and Kalunga, Emmanuel and Darmet, Ludovic and Gregoire, Cattan and Abdul Hussain, Ali and Gatti, Ramiro and Goncharenko, Vladislav and Thielen, Jordy and Moreau, Thomas and Roy, Yannick and Jayaram, Vinay and Barachant, Alexandre and Chevallier, Sylvain}, + doi = {10.5281/zenodo.10034223}, + title = {{Mother of all BCI Benchmarks}}, + url = {https://github.com/NeuroTechX/moabb}, + version = {1.1.2}, + year = {2025} + } +``` If you want to cite the scientific contributions of MOABB, you could use the following paper: From 16d954e821674af2cb249e55dfafb35a0214346e Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Tue, 4 Mar 2025 22:04:20 +0100 Subject: [PATCH 03/12] [MNT] single readme file --- docs/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index a5f730724..3777cbd64 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -12,14 +12,19 @@ BUILDDIR = build help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +.PHONY: copy-readme + +copy-readme: + cp ../README.md source/README.md + + .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @python prepare_summary_tables.py ../moabb/datasets $(BUILDDIR) - @cp ..README.rst "$(SOURCEDIR)" @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -apidoc: +apidoc: copy-readme sphinx-apidoc -o "$(SOURCEDIR)" ../"$(SPHINXPROJ)" --module-first -d 1 From 0326cd32f0ff6fa406f4beb8c0f0e33181276a3b Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 00:08:11 +0100 Subject: [PATCH 04/12] [MNT] typo --- docs/source/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/README.md b/docs/source/README.md index acee29ea3..734a4ea21 100644 --- a/docs/source/README.md +++ b/docs/source/README.md @@ -79,7 +79,7 @@ state of the art by 5% ...”. ## Installation -Please check the instalation webpage with the description and step to install moabb! +Please check the installation webpage with the description and step to install moabb! [Install](https://neurotechx.github.io/moabb/install/install.html)] From 3ef177d9201699b16b9c6bbcede8722b9f5e2ccb Mon Sep 17 00:00:00 2001 From: Bru Date: Wed, 5 Mar 2025 09:12:19 +0000 Subject: [PATCH 05/12] Apply suggestions from code review Co-authored-by: Pierre Guetschel <25532709+PierreGtch@users.noreply.github.com> Signed-off-by: Bru --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index acee29ea3..ffb17d1c8 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ state of the art by 5% ...”. ## Installation -Please check the instalation webpage with the description and step to install moabb! +Please check the installation webpage with the description and step to install moabb! [Install](https://neurotechx.github.io/moabb/install/install.html)] @@ -119,8 +119,8 @@ The project is currently maintained by: The Mother of all BCI Benchmarks was founded by Alexander Barachant and Vinay Jayaram, who -are experts in the field of Brain-Computer Interfaces (BCI). At moment, both works as -Research Scientist +are experts in the field of Brain-Computer Interfaces (BCI). At the moment, both work as +Research Scientists. @@ -138,7 +138,7 @@ Research Scientist ## Contributors -The MOABB is a community project, and we are always thankful for all the contributors! +The MOABB is a community project, and we are always thankful to all the contributors!
From e053aa528c0b4d8a4841eb94fde93e0b6d7b8db0 Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:08:04 +0100 Subject: [PATCH 06/12] [MNT] version control --- CITATION.cff | 4 ++-- moabb/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 8a1d711bc..73486dae7 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -70,7 +70,7 @@ authors: given-names: "Sylvain" orcid: "https://orcid.org/0000-0003-3027-8241" title: "Mother of all BCI Benchmarks" -version: 1.1.2 +version: 1.2.0 doi: 10.5281/zenodo.10034223 -date-released: 2025-03-02 +date-released: 2025-03-05 url: "https://github.com/NeuroTechX/moabb" diff --git a/moabb/__init__.py b/moabb/__init__.py index b4ed0ba5e..2a420f2a0 100644 --- a/moabb/__init__.py +++ b/moabb/__init__.py @@ -1,5 +1,5 @@ # flake8: noqa -__version__ = "1.1.2" +__version__ = "1.2.0" from .benchmark import benchmark from .utils import make_process_pipelines, set_download_dir, set_log_level, setup_seed From 02d38d237ca2ac4c4b51fa08fd477493f7811f6a Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:16:43 +0100 Subject: [PATCH 07/12] Single readme and contributing webpage --- CONTRIBUTING.md | 74 ++++------ docs/source/CONTRIBUTING.md | 111 --------------- docs/source/README.md | 262 ------------------------------------ pyproject.toml | 1 + 4 files changed, 26 insertions(+), 422 deletions(-) delete mode 100644 docs/source/CONTRIBUTING.md delete mode 100644 docs/source/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85bf674cc..0420017ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,16 @@ :tada::clinking_glasses: First off, thanks for taking the time to contribute! :tada::clinking_glasses: -Contributions are always welcome, no matter how small. +Contributions are always welcome, no matter how small! + +If you think you can help in any of the areas of MOABB (and we bet you can) or in any of +the many areas that we haven't yet thought of (and here we're _sure_ you can) then please +check out our [roadmap](https://github.com/NeuroTechX/moabb/blob/master/ROADMAP.md). + +Please note that it's very important to us that we maintain a positive and supportive +environment for everyone who wants to participate. When you join us we ask that you follow +our [code of conduct](https://github.com/NeuroTechX/moabb/blob/master/CODE_OF_CONDUCT.md) +in all interactions both on and offline. The following is a small set of guidelines for how to contribute to the project @@ -13,7 +22,7 @@ The following is a small set of guidelines for how to contribute to the project This project adheres to the Contributor Covenant [Code of Conduct](CODE_OF_CONDUCT.md). By participating you are expected to adhere to these expectations. Please report unacceptable -behavior to [hi@pushtheworld.us](mailto:hi@pushtheworld.us) +behavior. ### Contributing on Github @@ -23,15 +32,13 @@ include those additions in the master version of this project, check out this ### Community -This project is maintained by the [NeuroTechX](www.neurotechx.com) community. Join the -[Gitter](https://gitter.im/moabb_dev/community), where discussions about MOABB takes -place. +This project is maintained by the [NeuroTechX](www.neurotechx.com) community. ## How can I contribute? If there's a feature you'd be interested in building or you find a bug or have a suggestion on how to improve the project, go ahead! Let us know on the -[Gitter](https://gitter.im/moabb_dev/community) or [open an issue](../../issues) so others +[open an issue](../../issues) so others can follow along and we'll support you as much as we can. When you're finished submit a pull request to the master branch referencing the specific issue you addressed. @@ -54,61 +61,28 @@ pull request to the master branch referencing the specific issue you addressed. [what's new](http://moabb.neurotechx.com/docs/whats_new.html) and [documentation](http://moabb.neurotechx.com/docs/index.html) pages if needed + ## Setup development environment -1. install `poetry` (only once per machine):\ - `curl -sSL https://install.python-poetry.org | python3 -`\ - or [checkout installation instruction](https://python-poetry.org/docs/#installation) or - use [conda forge version](https://anaconda.org/conda-forge/poetry) -1. (Optional, skip if not sure) Disable automatic environment creation:\ - `poetry config virtualenvs.create false` -1. (Optional) Install the optional dependency -1. install all dependencies in one command (have to be run in thibe project directory):\ - `poetry install` -1. install `pre-commit` hooks to git repo:\ +1. Install pre-commit to start to code:\ + `pip install pre-commit` +2. Install the pre-commit hooks:\ `pre-commit install` -1. you are ready to code! +3. you are ready to code! _Note 1:_\ Your first commit will trigger `pre-commit` to download [Code Quality tools](#tools-used). That's OK and it is intended behavior. This will be done once per machine automatically. -_Note 2:_\ -By default `poetry` creates separate Python virtual environment for every project ([more details in documentation](https://python-poetry.org/docs/managing-environments/)). -If you use `conda` or any other way to manage different environments by hand - you need to -disable `poetry` environment creation. Also in this case be careful with version of Python -in your environment - it has to satisfy requirements stated in `pyproject.toml`. In case you -disable `poetry` you are in charge of this. +_Note 2 (deep learning):_\ +In case you want to install the optional deep learning dependencies (i.e. `pip install .[deeplearning]`), -_Note 3 (deep learning):_\ -In case you want to install the optional deep learning dependencies (i.e. `poetry install --with deeplearning`), -you will need to do the following additional steps if you want `tensorflow` to detect your -GPU: - -```bash -# Instructions for tensorflow==2.12 -conda install -c conda-forge cudatoolkit=11.8.0 -mkdir -p $CONDA_PREFIX/etc/conda/activate.d -echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh -source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh -# Verify install: -python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" -``` - -Then, at every use, re-run the command -`source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh` (you can simply add this line to -your `.bashrc`). For more details, please refer to -[the official documentation](https://www.tensorflow.org/install/pip). ### Tools used -MOABB uses [`poetry`](https://python-poetry.org/) for dependency management. This tool -enables one to have a reproducible environment on all popular OS (Linux, MacOS and -Windows) and provides easy publishing pipeline. +### Tools used -Another tool that makes development more stable is -[`pre-commit`](https://pre-commit.com/). It automatically runs variety of Code Quality +MOABB uses [`pre-commit`](https://pre-commit.com/). It automatically runs variety of Code Quality instruments against the code you produced. For Code Quality verification, we use: @@ -117,12 +91,14 @@ For Code Quality verification, we use: - [`isort`](https://github.com/timothycrosley/isort) - imports sorting and grouping - [`flake8`](https://gitlab.com/pycqa/flake8) - code style checking - [`prettier`](https://github.com/prettier/prettier) - `.yml` and `.md` files formatting +- and more checkers. + ### Generate the documentation To generate a local version of the documentation: -``` +```bash cd docs make html ``` diff --git a/docs/source/CONTRIBUTING.md b/docs/source/CONTRIBUTING.md deleted file mode 100644 index f2be8b2a5..000000000 --- a/docs/source/CONTRIBUTING.md +++ /dev/null @@ -1,111 +0,0 @@ -# Contributing - -Contributions are always welcome, no matter how small! - -If you think you can help in any of the areas of MOABB (and we bet you can) or in any of -the many areas that we haven't yet thought of (and here we're _sure_ you can) then please -check out our [roadmap](https://github.com/NeuroTechX/moabb/blob/master/ROADMAP.md). - -Please note that it's very important to us that we maintain a positive and supportive -environment for everyone who wants to participate. When you join us we ask that you follow -our [code of conduct](https://github.com/NeuroTechX/moabb/blob/master/CODE_OF_CONDUCT.md) -in all interactions both on and offline. - -The following is a small set of guidelines for how to contribute to the project - -## Where to start - -### Code of Conduct - -This project adheres to the Contributor Covenant [Code of Conduct](CODE_OF_CONDUCT.md). By -participating you are expected to adhere to these expectations. Please report unacceptable -behavior to [hi@pushtheworld.us](mailto:hi@pushtheworld.us) - -### Contributing on Github - -If you're new to Git and want to learn how to fork this repo, make your own additions, and -include those additions in the master version of this project, check out this -[great tutorial](http://blog.davidecoppola.com/2016/11/howto-contribute-to-open-source-project-on-github/). - -### Community - -This project is maintained by the [NeuroTechX](www.neurotechx.com) community. Join the -[Gitter](https://gitter.im/moabb_dev/community), where discussions about MOABB takes -place. - -## How can I contribute? - -If there's a feature you'd be interested in building or you find a bug or have a -suggestion on how to improve the project, go ahead! Let us know on the -[Gitter](https://gitter.im/moabb_dev/community) or [open an issue](../../issues) so others -can follow along and we'll support you as much as we can. When you're finished submit a -pull request to the master branch referencing the specific issue you addressed. - -### Steps to Contribute - -1. Look for open issues or open one -1. Discuss the problem and or propose a solution -1. Fork it! (and clone fork locally) -1. Branch from `develop`: `git checkout --track develop` -1. [Setup development environment](#setup-development-environment) -1. Create your feature branch: `git checkout -b my-new-feature` -1. Make changes -1. Commit your changes: `git commit -m 'Add some feature'` -1. Don't forget to fix issues from `pre-commit` pipeline (either add changes made by hooks - or fix them manually in case of `flake8`) -1. Push to the branch: `git push origin my-new-feature` -1. Submit a pull request. Make sure it is based on the `develop` branch when submitting! - :D -1. Don't forget to update the - [what's new](http://moabb.neurotechx.com/docs/whats_new.html) and - [documentation](http://moabb.neurotechx.com/docs/index.html) pages if needed - -## Setup development environment - -1. install `poetry` (only once per machine):\ - `curl -sSL https://install.python-poetry.org | python3 -`\ - or [checkout installation instruction](https://python-poetry.org/docs/#installation) or - use [conda forge version](https://anaconda.org/conda-forge/poetry) -1. (Optional, skip if not sure) Disable automatic environment creation:\ - `poetry config virtualenvs.create false` -1. install all dependencies in one command (have to be run in thibe project directory):\ - `poetry install --extras [deeplearning, codecarbon]` -1. install `pre-commit` hooks to git repo:\ - `pre-commit install` -1. you are ready to code! - -_Note 1:_\ -Your first commit will trigger `pre-commit` to download [Code Quality tools](#tools-used). -That's OK and it is intended behavior. This will be done once per machine automatically. - -_Note 2:_\ -By default `poetry` creates separate Python virtual environment for every project ([more details in documentation](https://python-poetry.org/docs/managing-environments/)). -If you use `conda` or any other way to manage different environments by hand - you need to -disable `poetry` environment creation. Also in this case be careful with version of Python -in your environment - it has to satisfy requirements stated in `pyproject.toml`. In case you -disable `poetry` you are in charge of this. - -### Tools used - -MOABB uses [poetry](https://python-poetry.org/) for dependency management. This tool -enables one to have a reproducible environment on all popular OS (Linux, MacOS and -Windows) and provides easy publishing pipeline. - -Another tool that makes development more stable is [pre-commit](https://pre-commit.com/). -It automatically runs variety of Code Quality instruments against the code you produced. - -For Code Quality verification, we use: - -- [black](https://github.com/psf/black) - Python code formatting -- [isort](https://github.com/timothycrosley/isort) - imports sorting and grouping -- [flake8](https://gitlab.com/pycqa/flake8) - code style checking -- [prettier](https://github.com/prettier/prettier) - `.yml` and `.md` files formatting - -### Generate the documentation - -To generate a local version of the documentation: - -```bash -cd docs -make html -``` diff --git a/docs/source/README.md b/docs/source/README.md deleted file mode 100644 index 734a4ea21..000000000 --- a/docs/source/README.md +++ /dev/null @@ -1,262 +0,0 @@ -# Mother of all BCI Benchmarks - -

- - Build a comprehensive benchmark of popular Brain-Computer Interface (BCI) algorithms applied on an extensive list of freely available EEG datasets. -

- - -## Disclaimer - -**This is an open science project that may evolve depending on the need of the -community.** - - - -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10034224.svg)](https://doi.org/10.5281/zenodo.10034224) -[![Build Status](https://github.com/NeuroTechX/moabb/workflows/Test/badge.svg)](https://github.com/NeuroTechX/moabb/actions?query=branch%3Amaster) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![codecov](https://codecov.io/gh/NeuroTechX/moabb/graph/badge.svg?token=NwHD3ethB5)](https://codecov.io/gh/NeuroTechX/moabb) -[![PyPI](https://img.shields.io/pypi/v/moabb?color=blue&style=plastic)](https://img.shields.io/pypi/v/moabb) -[![Downloads](https://pepy.tech/badge/moabb)](https://pepy.tech/project/moabb) - -## Welcome! - -First and foremost, Welcome! :tada: Willkommen! :confetti_ball: Bienvenue! -:balloon::balloon::balloon: - -Thank you for visiting the Mother of all BCI Benchmark repository. - -This document is a hub to give you some information about the project. Jump straight to -one of the sections below, or just scroll down to find out more. - -- [What are we doing? (And why?)](#what-are-we-doing) -- [Installation](#installation) -- [Running](#running) -- [Supported datasets](#supported-datasets) -- [Who are we?](#who-are-we) -- [Get in touch](#contact-us) -- [Documentation][link_moabb_docs] -- [Architecture and main concepts](#architecture-and-main-concepts) -- [Citing MOABB and related publications](#citing-moabb-and-related-publications) - -## What are we doing? - -### The problem - -[Brain-Computer Interfaces](https://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface) -allow to interact with a computer using brain signals. In this project, we focus mostly on -electroencephalographic signals -([EEG](https://en.wikipedia.org/wiki/Electroencephalography)), that is a very active -research domain, with worldwide scientific contributions. Still: - -- Reproducible Research in BCI has a long way to go. -- While many BCI datasets are made freely available, researchers do not publish code, and - reproducing results required to benchmark new algorithms turns out to be trickier than - it should be. -- Performances can be significantly impacted by parameters of the preprocessing steps, - toolboxes used and implementation “tricks” that are almost never reported in the - literature. - -As a result, there is no comprehensive benchmark of BCI algorithms, and newcomers are -spending a tremendous amount of time browsing literature to find out what algorithm works -best and on which dataset. - -### The solution - -The Mother of all BCI Benchmarks allows to: - -- Build a comprehensive benchmark of popular BCI algorithms applied on an extensive list - of freely available EEG datasets. -- The code is available on GitHub, serving as a reference point for the future algorithmic - developments. -- Algorithms can be ranked and promoted on a website, providing a clear picture of the - different solutions available in the field. - -This project will be successful when we read in an abstract “ … the proposed method -obtained a score of 89% on the MOABB (Mother of All BCI Benchmarks), outperforming the -state of the art by 5% ...”. - -## Installation - -Please check the installation webpage with the description and step to install moabb! - -[Install](https://neurotechx.github.io/moabb/install/install.html)] - -See [contributors' guidelines](CONTRIBUTING.md) for detailed explanation. - - -### Use MOABB - -First, you could take a look at our [tutorials](./auto_tutorials/index.html) that cover -the most important concepts and use cases. Also, we have a gallery of -[examples](./auto_examples/index.html) available. - -## Core Team - -This project is under the umbrella of [NeuroTechX][link_neurotechx], the international -community for NeuroTech enthusiasts. - -The project is currently maintained by: - -
- - - - - - - - - - - - - - - - -
Sylvain ChevallierBruno AristimunhaIgor CarraraPierre Guetschel
Sylvain ChevallierBruno AristimunhaIgor CarraraPierre Guetschel
- -The Mother of all BCI Benchmarks was founded by Alexander Barachant and Vinay Jayaram, who -are experts in the field of Brain-Computer Interfaces (BCI). At moment, both works as -Research Scientist - - - - - - - - - - - - - -
Alexander BarachantVinay Jayaram
Alexander BarachantVinay Jayaram
- -## Contributors - -The MOABB is a community project, and we are always thankful for all the contributors! - -
- - - -
- -Special acknowledge for the extra MOABB contributors: - - - - - - - - - - - -
Pedro Rodrigues
 Pedro L. C. Rodrigues
- -### What do we need? - -**You**! In whatever way you can help. - -We need expertise in programming, user experience, software sustainability, documentation -and technical writing and project management. - -We'd love your feedback along the way. - -Our primary goal is to build a comprehensive benchmark of popular BCI algorithms applied -on an extensive list of freely available EEG datasets, and we're excited to support the -professional development of any and all of our contributors. If you're looking to learn to -code, try out working collaboratively, or translate your skills to the digital domain, -we're here to help. - -## Citing MOABB and related publications - -If you use MOABB in your experiments, please cite this library when -publishing a paper to increase the visibility of open science initiatives: - -``` -Aristimunha, B., Carrara, I., Guetschel, P., Sedlar, S., Rodrigues, P., Sosulski, J., Narayanan, D., Bjareholt, E., Barthelemy, Q., Reinmar, K., Schirrmeister, R. T.,Kalunga, E., Darmet, L., Gregoire, C., Abdul Hussain, A., Gatti, R., Goncharenko, V., Thielen, J., Moreau, T., Roy, Y., Jayaram, V., Barachant,A., & Chevallier, S. -Mother of all BCI Benchmarks (MOABB), 2023. DOI: 10.5281/zenodo.10034223. -``` -and here is the Bibtex version: -```bibtex - -@software{Aristimunha_Mother_of_all, - author = {Aristimunha, Bruno and Carrara, Igor and Guetschel, Pierre and Sedlar, Sara and Rodrigues, Pedro and Sosulski, Jan and Narayanan, Divyesh and Bjareholt, Erik and Barthelemy, Quentin and Kobler, Reinmar and Schirrmeister, Robin Tibor and Kalunga, Emmanuel and Darmet, Ludovic and Gregoire, Cattan and Abdul Hussain, Ali and Gatti, Ramiro and Goncharenko, Vladislav and Thielen, Jordy and Moreau, Thomas and Roy, Yannick and Jayaram, Vinay and Barachant, Alexandre and Chevallier, Sylvain}, - doi = {10.5281/zenodo.10034223}, - title = {{Mother of all BCI Benchmarks}}, - url = {https://github.com/NeuroTechX/moabb}, - version = {1.1.2}, - year = {2025} - } -``` - -If you want to cite the scientific contributions of MOABB, you could use the following paper: - -> Sylvain Chevallier, Igor Carrara, Bruno Aristimunha, Pierre Guetschel, Sara Sedlar, Bruna Junqueira Lopes, Sébastien Velut, Salim Khazem, Thomas Moreau -> ["The largest EEG-based BCI reproducibility study for open science: the MOABB benchmark"](https://cnrs.hal.science/hal-04537061/) -> HAL: hal-04537061. - -> Vinay Jayaram and Alexandre Barachant. -> ["MOABB: trustworthy algorithm benchmarking for BCIs."](http://iopscience.iop.org/article/10.1088/1741-2552/aadea0/meta) -> Journal of neural engineering 15.6 (2018): 066011. -> [DOI](https://doi.org/10.1088/1741-2552/aadea0) - -If you publish a paper using MOABB, please contact us on [gitter][link_gitter] or open an -issue, and we will add your paper to the -[dedicated wiki page](https://github.com/NeuroTechX/moabb/wiki/MOABB-bibliography). - - -## Contact us - -If you want to report a problem or suggest an enhancement, we'd love for you to -[open an issue](https://github.com/NeuroTechX/moabb/issues) at this GitHub repository -because then we can get right on it. - -For a less formal discussion or exchanging ideas, you can also reach us on the [Gitter -channel][link_gitter] or join our weekly office hours! This an open video meeting -happening on a [regular basis](https://github.com/NeuroTechX/moabb/issues/191), please ask -the link on the gitter channel. We are also on NeuroTechX Slack channel -[#moabb][link_neurotechx_signup]. - - -[link_alex_b]: http://alexandre.barachant.org/ -[link_vinay]: https://www.linkedin.com/in/vinay-jayaram-8635aa25 -[link_neurotechx]: http://neurotechx.com/ -[link_sylvain]: https://sylvchev.github.io/ -[link_bruno]: https://www.linkedin.com/in/bruaristimunha/ -[link_igor]: https://www.linkedin.com/in/carraraig/ -[link_pierre]: https://www.linkedin.com/in/pierreguetschel/ -[link_neurotechx_signup]: https://neurotechx.com/ -[link_gitter]: https://app.gitter.im/#/room/#moabb_dev_community:gitter.im -[link_moabb_docs]: https://neurotechx.github.io/moabb/ -[link_arxiv]: https://arxiv.org/abs/1805.06427 -[link_jne]: http://iopscience.iop.org/article/10.1088/1741-2552/aadea0/meta diff --git a/pyproject.toml b/pyproject.toml index 3cb483999..315ff2752 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,7 @@ deeplearning = ["tensorflow", "keras", "scikeras", "braindecode", "libclang"] optuna = ["optuna", "optuna-integration"] tests = ["pytest", "pytest-cov", "codecov", "pytest_cases"] docs = ["Sphinx", "sphinx-gallery", "sphinx-bootstrap-theme", "pydata-sphinx-theme", "numpydoc", "m2r2", "tdlda", "sphinx-design", "sphinx-rtd-theme", "sphinx_copybutton", "sphinxcontrib-bibtex", "sphinx-favicon"] +external = ["tdlda"] [build-system] requires = ["poetry-core>=1.0.0"] From 0c574cc18113cdbfbbdff0dcd506849cb308d50b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:16:57 +0000 Subject: [PATCH 08/12] [pre-commit.ci] auto fixes from pre-commit.com hooks --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0420017ec..8aa7820a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ include those additions in the master version of this project, check out this ### Community -This project is maintained by the [NeuroTechX](www.neurotechx.com) community. +This project is maintained by the [NeuroTechX](www.neurotechx.com) community. ## How can I contribute? From 4d615bf8c7d9f52b5305cbcf0110f07b452c1b53 Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:17:39 +0100 Subject: [PATCH 09/12] removing docker, no one is using. --- .dockerignore | 146 ------------------------------------- bash/create_docker.sh | 15 ---- bash/meta_requirements.txt | 5 -- bash/run_docker.sh | 37 ---------- bash/run_docker_gdrive.sh | 23 ------ bash/run_gdown.sh | 6 -- 6 files changed, 232 deletions(-) delete mode 100644 .dockerignore delete mode 100755 bash/create_docker.sh delete mode 100644 bash/meta_requirements.txt delete mode 100755 bash/run_docker.sh delete mode 100755 bash/run_docker_gdrive.sh delete mode 100755 bash/run_gdown.sh diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 452af5607..000000000 --- a/.dockerignore +++ /dev/null @@ -1,146 +0,0 @@ -# Created by .ignore support plugin (hsz.mobi) -### Python template -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# folder from moabb project -dataset/ -results/ -output/ diff --git a/bash/create_docker.sh b/bash/create_docker.sh deleted file mode 100755 index e4e592d17..000000000 --- a/bash/create_docker.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# A simple script to build the distributed Docker image. -# -# $ bash create_docker.sh -set -ex -# Updating the repository or (cloning the repository and Navigate into the repository) -git -C $TAG pull || true - -TAG=moabb - -# Build the Docker image -docker build . -f Dockerfile -t "${TAG}" \ - --build-arg USER_ID=$(id -u) \ - --build-arg GROUP_ID=$(id -g) \ - --build-arg USER=${USER} diff --git a/bash/meta_requirements.txt b/bash/meta_requirements.txt deleted file mode 100644 index 5d3a5fb69..000000000 --- a/bash/meta_requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -mne -#if you want used a specific branch instead of branch develop -#changing the branch name git+REPOSITORY_LINK@BRANCH#egg=MOABB -git+https://github.com/NeuroTechX/moabb#egg=moabb -gdown diff --git a/bash/run_docker.sh b/bash/run_docker.sh deleted file mode 100755 index e8950b895..000000000 --- a/bash/run_docker.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -set -ex # Enable 'set -e' (exit on error) and 'set -x' (debugging) options - -TAG=moabb -# Define the repository to download -REPO_URL=https://github.com/NeuroTechX/moabb.git -# Updating the repository or (cloning the repository and Navigate into the repository) -git -C $TAG pull || (git clone $REPO_URL moabb && cd moabb) - -MOUNT_POINT=${1} # The first argument is the mount point - -# Where to mount the dataset inside the docker container -PIPELINE="/workdir/pipelines/" -RESULTS="/workdir/results/" -OUTPUTS="/workdir/outputs/" -DATASET="/workdir/dataset/" -# Run a Docker container with the following options: -# -it : interactive and tty mode -# -v : mount a volume from host machine at $MOUNT_POINT to container's /root/mne_data/ -# "${TAG}" : use the image with the tag 'moabb' -# /usr/bin/python : use python command -# /workdir/moabb/run.py : run the script 'run.py' located at '/workdir/moabb/' -# --pipeline $PIPELINE : use pipelines located at $PIPELINE -# --results $RESULTS : store results in $RESULTS -# --output $OUTPUTS : store outputs in $OUTPUTS -# --mne_data $DATASET : use dataset located at $DATASET -docker run -it \ - -v "${MOUNT_POINT}/dataset/:/workdir/dataset" \ - -v "${MOUNT_POINT}/results/:/workdir/results" \ - -v "${MOUNT_POINT}/output/:/workdir/output" \ - "$TAG" \ - /usr/bin/python \ - /workdir/moabb/run.py \ - --pipeline "$PIPELINE" \ - --results "$RESULTS" \ - --output "$OUTPUTS" \ - --mne_data "$DATASET" diff --git a/bash/run_docker_gdrive.sh b/bash/run_docker_gdrive.sh deleted file mode 100755 index 5530cb668..000000000 --- a/bash/run_docker_gdrive.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -set -ex # Enable 'set -e' (exit on error) and 'set -x' (debugging) options - -TAG=moabb -# Define the repository to download -REPO_URL=https://github.com/NeuroTechX/moabb.git -# Updating the repository or (cloning the repository and Navigate into the repository) -git -C $TAG pull || (git clone $REPO_URL moabb && cd moabb) - -MOUNT_POINT=${1} # The first argument is the mount point - -# Where to mount the dataset inside the docker container - -DATASET="/workdir/dataset/" -# Run a Docker container with the following options: -# -it : interactive and tty mode -# -v : mount a volume from host machine at $MOUNT_POINT to container's /root/mne_data/ -# "${TAG}" : use the image with the tag 'moabb' -# --mne_data $DATASET : use dataset located at $DATASET -docker run -it \ - -v "${MOUNT_POINT}/dataset/:/workdir/dataset" \ - "$TAG" \ - bash /workdir/moabb/docker/run_gdown.py $DATASET \ diff --git a/bash/run_gdown.sh b/bash/run_gdown.sh deleted file mode 100755 index afc93de55..000000000 --- a/bash/run_gdown.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -URL_GDRIVE='https://drive.google.com/drive/folders/1B-mvp5r6dogbPz7yzaGgs7HFzydOPajN?usp=share_link' -DOWNLOAD_POINT=${1} # The first argument is the mount point - -gdown --folder $URL_GDRIVE --output $DOWNLOAD_POINT --remaining-ok From db2610ae2e17b91bb6b7154a2c03ea6dd9e1d49d Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:19:31 +0100 Subject: [PATCH 10/12] removing docker, no one is using. --- docs/source/install/install.rst | 30 +------------- docs/source/install/using_docker.rst | 60 ---------------------------- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 docs/source/install/using_docker.rst diff --git a/docs/source/install/install.rst b/docs/source/install/install.rst index 5623d60e0..b0de03f68 100644 --- a/docs/source/install/install.rst +++ b/docs/source/install/install.rst @@ -7,8 +7,7 @@ Installation MOABB is written in Python 3, specifically for version 3.8 or above. The package is distributed via Python package index (`PyPI `__), and you can access the -source code via `Github `__ repository. The pre-built Docker images using the core -library and all optional dependencies are available on `DockerHub `__. +source code via `Github `__ repository. There are different ways to install MOABB: @@ -71,32 +70,6 @@ There are different ways to install MOABB: From src and dev env - .. grid-item-card:: - :text-align: center - - .. rst-class:: font-weight-bold mb-0 - - Using our docker environment - - .. rst-class:: card-subtitle text-muted mt-0 - - For Advanced Users - - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. image:: https://www.docker.com/wp-content/uploads/2022/03/Moby-logo.png - :alt: Terminal Docker - - **Already familiar with Docker?** - Follow our setup instructions for using your docker image! - +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - .. button-ref:: using_docker - :ref-type: ref - :color: primary - :shadow: - :class: font-weight-bold - - Using the docker image .. toctree:: @@ -104,4 +77,3 @@ There are different ways to install MOABB: install_pip install_source - using_docker diff --git a/docs/source/install/using_docker.rst b/docs/source/install/using_docker.rst deleted file mode 100644 index e30d27fc9..000000000 --- a/docs/source/install/using_docker.rst +++ /dev/null @@ -1,60 +0,0 @@ -.. _using_docker: - -Moabb and docker -================ - -If you want to use the docker image pre-build ---------------------------------------------- - -Moabb has a default image to run the benchmark. You have two options to -download this image: build from scratch or pull from the docker hub. -**We recommend pulling from the docker hub**. - -If this were your first time using docker, you would need to **install -the docker** and **login** on docker hub. We recommend the -`official `__ -docker documentation for this step, it is essential to follow the -instructions. - -After installing docker, you can pull the image from the docker hub: - -.. code:: bash - - docker pull baristimunha/moabb - # rename the tag to moabb - docker tag baristimunha/moabb moabb - -If you want to build the image from scratch, you can use the following -command at the root. You may have to login with the API key in the `NGC -Catalog `__ to run this command. - -.. code:: bash - - bash docker/create_docker.sh - -With the image downloaded or rebuilt from scratch, you will have an -image called ``moabb``. To run the default benchmark, still at the root -of the project, and you can use the following command: - -.. code:: bash - - mkdir dataset - mkdir results - mkdir output - bash docker/run_docker.sh PATH_TO_ROOT_FOLDER - -An example of the command is: - -.. code:: bash - - cd /home/user/project/moabb - mkdir dataset - mkdir results - mkdir output - bash docker/run_docker.sh /home/user/project/moabb - -Note: It is important to use an absolute path for the root folder to -run, but you can modify the run_docker.sh script to save in another path -beyond the root of the project. By default, the script will save the -results in the project’s root in the folder ``results``, the datasets in -the folder ``dataset`` and the output in the folder ``output``. From 1d22357c7868341bcd8da661c82d377021bfd2c5 Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:23:02 +0100 Subject: [PATCH 11/12] removing poetry --- .github/workflows/docs.yml | 2 +- docs/source/install/install_source.rst | 34 +++++--------------------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cace715e0..bc4272c30 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -55,7 +55,7 @@ jobs: - name: Install moabb run: | - uv pip install -e .[docs,deeplearning,optuna] + uv pip install -e .[docs,deeplearning,optuna,external] - name: Build docs run: | diff --git a/docs/source/install/install_source.rst b/docs/source/install/install_source.rst index 29f70ff89..456880e70 100644 --- a/docs/source/install/install_source.rst +++ b/docs/source/install/install_source.rst @@ -47,45 +47,23 @@ Building MOABB from source with the development environment If you want to build from source to work on MOABB itself, then follow these steps: -1. Install poetry by running the following command (only needs to be done once per machine): +1. Install pip on your system follow the tutorial: https://pip.pypa.io/en/stable/installation/. -.. code-block:: bash - - curl -sSL https://install.python-poetry.org | python3 - - -You could also check checkout `poetry installation instruction `__ or -use `conda forge version `__ - -We need the most updated version of the poetry to ensure the compatibility with optional dependency. - -.. note:: - If you have any group-related errors at the end of this section, you may not run the proper version of poetry. - - -2. (Optional) We recommend disabling automatic environment creation: - -.. code-block:: console - - poetry config virtualenvs.create false - - -.. note:: - This step is optional. Skip if you are not sure. -3. If you want to install without any optional dependency +2. If you want to install without any optional dependency You will need to run this command in the project directory: .. code-block:: console - poetry install + pip install -e . -4. If you want to install with an optional dependency +3. If you want to install with an optional dependency You will need to run this command in the project directory: .. code-block:: console - poetry install --extras "deeplearning carbonemission docs" + pip install -e .[deeplearning,carbonemission,docs,optuna,tests,external] For a full list of dependencies, see the pyproject.toml file. @@ -101,6 +79,6 @@ To verify that MOABB is installed and running correctly, run the following comma .. code-block:: console - python -m unittest moabb.tests + pytest moabb/tests --verbose For more information, please see the contributors' guidelines. From b54ee18e9d37fea39f4d454372d4f70446c1b994 Mon Sep 17 00:00:00 2001 From: bruAristimunha Date: Wed, 5 Mar 2025 11:23:38 +0100 Subject: [PATCH 12/12] external example --- examples/external/README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/external/README.txt b/examples/external/README.txt index 3b169080e..3d1a6764b 100644 --- a/examples/external/README.txt +++ b/examples/external/README.txt @@ -2,6 +2,6 @@ External examples ----------------- You need to install external dependencies to run these examples. These consist mostly of -various classifier implementations. When using poetry, you can use +various classifier implementations. When using pip, you can use -``poetry install --extras external`` +``pip install moabb[external]``