Skip to content

Commit bb31be3

Browse files
authored
Merge pull request #510 from NeuroTechX/develop
Stable version 1.0.0
2 parents 2a0b97f + 0f8b864 commit bb31be3

File tree

157 files changed

+9611
-3509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+9611
-3509
lines changed

.github/workflows/docs.yml

Lines changed: 17 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
python-version: ["3.9"]
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Create local data folder
2222
run: |
@@ -44,10 +44,10 @@ jobs:
4444
4545
- name: Install dependencies
4646
if: steps.cached-dataset-docs.outputs.cache-hit != 'true'
47-
run: poetry install --no-interaction --no-root --with docs,deeplearning
47+
run: poetry install --no-interaction --no-root --with docs --extras deeplearning
4848

4949
- name: Install library
50-
run: poetry install --no-interaction --with docs,deeplearning
50+
run: poetry install --no-interaction --with docs --extras deeplearning
5151

5252
- name: Build docs
5353
run: |
@@ -69,7 +69,7 @@ jobs:
6969
os: [ubuntu-latest]
7070

7171
steps:
72-
- uses: actions/checkout@v3
72+
- uses: actions/checkout@v4
7373

7474
- name: Create local data folder
7575
run: |
@@ -85,23 +85,12 @@ jobs:
8585
docs/build
8686
8787
- name: Checkout moabb.github.io
88-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8989
with:
9090
repository: "NeuroTechX/moabb.github.io"
9191
path: moabb-ghio
9292
token: ${{ secrets.MOABB_GHIO }}
9393

94-
- name: Deploy on moabb.neurotechx.com
95-
run: |
96-
git config --global user.email "[email protected]"
97-
git config --global user.name "Github Actions"
98-
cd ~/work/moabb/moabb/moabb-ghio
99-
rm -Rf docs
100-
cp -a ~/work/moabb/moabb/docs/build/html ./docs
101-
git add -A
102-
git commit -m "GH Actions update of docs ($GITHUB_RUN_ID - $GITHUB_RUN_NUMBER)"
103-
git push origin master
104-
10594
deploy_gh_pages:
10695
if: ${{ github.ref == 'refs/heads/develop' }}
10796
needs: build_docs
@@ -112,7 +101,7 @@ jobs:
112101
os: [ubuntu-latest]
113102

114103
steps:
115-
- uses: actions/checkout@v3
104+
- uses: actions/checkout@v4
116105

117106
- name: Create local data folder
118107
run: |
@@ -128,11 +117,21 @@ jobs:
128117
docs/build
129118
130119
- name: Checkout gh pages
131-
uses: actions/checkout@v3
120+
uses: actions/checkout@v4
132121
with:
133122
ref: gh-pages
134123
path: moabb-ghpages
135124

125+
- name: Deploy Neurotechx Subpage
126+
uses: peaceiris/actions-gh-pages@v3
127+
with:
128+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
129+
external_repository: NeuroTechX/moabb.github.io
130+
destination_dir: docs/
131+
publish_branch: master
132+
publish_dir: ./docs/build/html
133+
cname: moabb.neurotechx.com/
134+
136135
- name: Deploy on gh-pages
137136
run: |
138137
git config --global user.email "[email protected]"
@@ -143,60 +142,3 @@ jobs:
143142
git add -A
144143
git commit -m "GH Actions update of GH pages ($GITHUB_RUN_ID - $GITHUB_RUN_NUMBER)"
145144
git push origin gh-pages
146-
147-
- name: Deploy to moabb.neurotechx.com/
148-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop'}}
149-
uses: peaceiris/actions-gh-pages@v3
150-
with:
151-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
152-
external_repository: NeuroTechX/moabb.github.io
153-
destination_dir: docs/
154-
publish_branch: master
155-
publish_dir: ./docs/build/html
156-
cname: moabb.neurotechx.com/
157-
158-
# Previous test with moabb GH pages, official docs point to moabb.github.io
159-
###########################################################################
160-
# 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
161-
# - name: Move docs into site folder
162-
# run: |
163-
# mkdir site
164-
# mv docs/build/html site/docs
165-
166-
# - name: Deploy on moabb gh-pages
167-
# uses: peaceiris/actions-gh-pages@v3
168-
# if: github.ref == 'refs/heads/master'
169-
# with:
170-
# github_token: ${{ secrets.GITHUB_TOKEN }}
171-
# publish_dir: site
172-
173-
# Using checkout and push actions, not working
174-
##############################################
175-
# - name: Install SSH key
176-
# uses: shimataro/ssh-key-action@v2
177-
# with:
178-
# key: ${{ secrets.MOABB_DOCS_SSH }}
179-
# known_hosts: ${{ secrets.KNOWN_HOST_GH }}
180-
181-
# - name: Checkout moabb.github.io
182-
# uses: actions/checkout@v2
183-
# with:
184-
# repository: "NeuroTechX/moabb.github.io"
185-
# path: moabb-ghio
186-
# fetch-depth: 0
187-
# persist-credentials: false
188-
189-
# - name: Add html files
190-
# run: |
191-
# cd ~/work/moabb/moabb/moabb-ghio
192-
# rm -Rf docs
193-
# cp -a ~/work/moabb/moabb/docs/build/html ./docs
194-
# git config --global user.email "[email protected]"
195-
# git config --global user.name "Github Actions"
196-
# git commit -m "GH Actions update of docs ($GITHUB_RUN_ID - $GITHUB_RUN_NUMBER)" -a
197-
198-
# - name: Push
199-
# uses: ad-m/github-push-action@master
200-
# with:
201-
# github_token: ${{ secrets.MOABB_GHIO }}
202-
# repository: "NeuroTechX/moabb.github.io"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Test-braindecode
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
jobs:
10+
test:
11+
name: dev ${{ matrix.os }}, py-${{ matrix.python-version }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
os: [ubuntu-latest]
17+
python-version: ["3.8"]
18+
defaults:
19+
run:
20+
shell: bash
21+
steps:
22+
- name: Checkout MOABB
23+
uses: actions/checkout@v4
24+
25+
- name: Checkout Braindecode
26+
uses: actions/checkout@v4
27+
with:
28+
repository: braindecode/braindecode
29+
path: braindecode
30+
31+
- name: Setup Python
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install Poetry
37+
uses: snok/install-poetry@v1
38+
with:
39+
virtualenvs-create: true
40+
virtualenvs-in-project: true
41+
42+
- name: Create/Restore MNE Data Cache
43+
id: cache-mne_data
44+
uses: actions/cache@v3
45+
with:
46+
path: ~/mne_data
47+
key: ${{ runner.os }}-mne
48+
49+
- name: Load cached venv
50+
if: runner.os != 'Windows'
51+
id: cached-poetry-dependencies
52+
uses: actions/cache@v3
53+
with:
54+
path: .venv
55+
key:
56+
testvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{
57+
hashFiles('**/poetry.lock') }}
58+
59+
- name: Install dependencies
60+
if: |
61+
(runner.os != 'Windows') &&
62+
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
63+
run: poetry install --no-interaction --no-root
64+
65+
- name: Install library
66+
run: poetry install --no-interaction
67+
68+
- name: Install and test braindecode
69+
run: |
70+
source $VENV
71+
poetry run pip install torch
72+
cd braindecode
73+
poetry run pip install -e .[tests]
74+
poetry run pytest test/
75+
76+
# poetry run pip install -U https://api.github.com/repos/braindecode/braindecode/zipball/master

.github/workflows/test-devel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run:
2020
shell: bash
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323

2424
- name: Setup Python
2525
uses: actions/setup-python@v4
@@ -46,11 +46,11 @@ jobs:
4646
if: |
4747
(runner.os != 'Windows') &&
4848
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
49-
run: poetry install --no-interaction --no-root --with deeplearning
49+
run: poetry install --no-interaction --no-root --extras deeplearning
5050

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

5555
- name: Install library (Windows)
5656
if: ${{ runner.os == 'Windows' }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run:
2020
shell: bash
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323

2424
- name: Setup Python
2525
uses: actions/setup-python@v4
@@ -46,11 +46,11 @@ jobs:
4646
if: |
4747
(runner.os != 'Windows') &&
4848
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
49-
run: poetry install --no-interaction --no-root --with deeplearning
49+
run: poetry install --no-interaction --no-root --extras deeplearning
5050

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

5555
- name: Install library (Windows)
5656
if: ${{ runner.os == 'Windows' }}

.pre-commit-config.yaml

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,90 @@ ci:
88
autoupdate_branch: "develop"
99
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
1010
autoupdate_schedule: quarterly
11-
skip: []
11+
skip: [ ]
1212
submodules: false
1313

14+
exclude: ".*svg"
15+
1416
repos:
1517
- repo: https://github.com/pre-commit/pre-commit-hooks
1618
rev: v4.4.0
1719
hooks:
1820
- id: check-yaml
1921
- id: check-json
22+
- id: check-executables-have-shebangs
23+
- id: check-toml
24+
- id: check-docstring-first
2025
- id: check-added-large-files
2126
- id: end-of-file-fixer
2227
- id: trailing-whitespace
2328
- id: check-case-conflict
2429
- id: mixed-line-ending
30+
- id: end-of-file-fixer
31+
- id: check-case-conflict
32+
- id: forbid-new-submodules
33+
- id: pretty-format-json
34+
args: [ "--autofix", "--no-sort-keys", "--indent=4" ]
35+
2536

2637
- repo: https://github.com/psf/black
27-
rev: 23.3.0
38+
rev: 23.9.1
2839
hooks:
2940
- id: black
41+
language_version: python3.8
42+
args: [ --line-length=90, --target-version=py38 ]
43+
44+
- repo: https://github.com/asottile/blacken-docs
45+
rev: 1.16.0
46+
hooks:
47+
- id: blacken-docs
48+
additional_dependencies: [black==23.3.0]
49+
exclude: ^.github/
3050

3151
- repo: https://github.com/PyCQA/isort
3252
rev: 5.12.0
3353
hooks:
3454
- id: isort
3555

36-
- repo: https://github.com/pycqa/flake8
37-
rev: 6.0.0
56+
- repo: https://github.com/PyCQA/flake8
57+
rev: 6.1.0
3858
hooks:
3959
- id: flake8
40-
additional_dependencies: [flake8-bugbear]
60+
additional_dependencies: [
61+
'flake8-blind-except',
62+
'flake8-docstrings',
63+
'flake8-bugbear',
64+
'flake8-comprehensions',
65+
'flake8-docstrings',
66+
'flake8-implicit-str-concat',
67+
'pydocstyle>=5.0.0',
68+
]
69+
exclude: ^docs/ | ^setup\.py$ |
4170

42-
- repo: https://github.com/pre-commit/mirrors-prettier
43-
rev: v3.0.0-alpha.6
71+
- repo: https://github.com/astral-sh/ruff-pre-commit
72+
rev: v0.0.292
4473
hooks:
45-
- id: prettier
46-
args: [--print-width=90, --prose-wrap=always]
74+
- id: ruff
75+
args: [ --fix, --exit-non-zero-on-fix, --ignore, E501 ]
76+
77+
- repo: https://github.com/codespell-project/codespell
78+
rev: v2.2.6
79+
hooks:
80+
- id: codespell
81+
args:
82+
- --ignore-words-list=additionals,alle,alot,bund,currenty,datas,farenheit,falsy,fo,haa,hass,iif,incomfort,ines,ist,nam,nd,pres,pullrequests,resset,rime,ser,serie,te,technik,ue,unsecure,withing,zar
83+
- --skip="./.*,*.csv,*.json,*.ambr"
84+
- --quiet-level=2
85+
exclude_types: [ csv, json, svg ]
86+
exclude: ^tests/|generated/
87+
88+
- repo: https://github.com/adrienverge/yamllint.git
89+
rev: v1.32.0
90+
hooks:
91+
- id: yamllint
92+
exclude: >
93+
(?x)^(
94+
.pre-commit-config.yaml*|
95+
.github/workflows/.*|
96+
97+
)$

0 commit comments

Comments
 (0)