Skip to content

Commit

Permalink
Merge pull request #379 from NeuroTechX/develop
Browse files Browse the repository at this point in the history
merge v0.5.0 into master
  • Loading branch information
sylvchev authored May 23, 2023
2 parents 3889e2b + 6047c8d commit 2a0b97f
Show file tree
Hide file tree
Showing 162 changed files with 10,994 additions and 2,590 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[run]
branch = True
source = moabb
include = */moabb/*
omit =
*/docs/*
*/pipelines/*
*/tests/*

[report]
exclude_lines =
Expand Down
146 changes: 146 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# 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/
43 changes: 26 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,37 @@ on:
branches: [master, develop]
pull_request:
branches: [master, develop]
paths:
- "docs/**"

jobs:
build_docs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04]
os: [ubuntu-latest]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create local data folder
run: |
mkdir ~/mne_data
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1.1.6
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache datasets and docs
id: cached-dataset-docs
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
Expand All @@ -46,10 +44,10 @@ jobs:
- name: Install dependencies
if: steps.cached-dataset-docs.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction --no-root --with docs,deeplearning

- name: Install library
run: poetry install --no-interaction
run: poetry install --no-interaction --with docs,deeplearning

- name: Build docs
run: |
Expand All @@ -68,26 +66,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create local data folder
run: |
mkdir ~/mne_data
- name: Cache datasets and docs
id: cached-dataset-docs
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
~/mne_data
docs/build
- name: Checkout moabb.github.io
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: "NeuroTechX/moabb.github.io"
path: moabb-ghio
Expand All @@ -111,26 +109,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Create local data folder
run: |
mkdir ~/mne_data
- name: Cache datasets and docs
id: cached-dataset-docs
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
~/mne_data
docs/build
- name: Checkout gh pages
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: gh-pages
path: moabb-ghpages
Expand All @@ -146,6 +144,17 @@ jobs:
git commit -m "GH Actions update of GH pages ($GITHUB_RUN_ID - $GITHUB_RUN_NUMBER)"
git push origin gh-pages
- name: Deploy to moabb.neurotechx.com/
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop'}}
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: NeuroTechX/moabb.github.io
destination_dir: docs/
publish_branch: master
publish_dir: ./docs/build/html
cname: moabb.neurotechx.com/

# Previous test with moabb GH pages, official docs point to moabb.github.io
###########################################################################
# Since we want the URL to be neurotechx.github.io/docs/ the html output needs to be put in a ./docs subfolder of the publish_dir
Expand Down
45 changes: 17 additions & 28 deletions .github/workflows/test-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04, windows-latest, macOS-latest]
python-version: ["3.7"]
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -35,7 +35,7 @@ jobs:
- name: Load cached venv
if: runner.os != 'Windows'
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .venv
key:
Expand All @@ -46,43 +46,32 @@ jobs:
if: |
(runner.os != 'Windows') &&
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
run: poetry install --no-interaction --no-root --no-dev
run: poetry install --no-interaction --no-root --with deeplearning

- name: Install library
run: poetry install --no-interaction --no-dev
- name: Install library (Linux/OSX)
if: ${{ runner.os != 'Windows' }}
run: poetry install --no-interaction --with deeplearning

- name: Install library (Windows)
if: ${{ runner.os == 'Windows' }}
run: poetry install --no-interaction

- name: Run tests
run: |
source $VENV
poetry run coverage run -m unittest moabb.tests
poetry run coverage xml
- name: Run pipelines
run: |
source $VENV
poetry run python -m moabb.run --pipelines=./moabb/tests/test_pipelines/ --verbose
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
if: success()
with:
verbose: true
directory: /home/runner/work/moabb/moabb
files: ./.coverage

lint:
name: lint ${{ matrix.os }}, py-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04]
python-version: ["3.7"]
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- uses: pre-commit/action@v2.0.0
files: ./.coverage,coverage.xml
env_vars: OS,PYTHON
Loading

0 comments on commit 2a0b97f

Please sign in to comment.