Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop into master v1.1.1 #645

Merged
merged 11 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 70 additions & 69 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
name: Docs

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true


on:
push:
branches: [master, develop]
branches: [ master, develop ]
pull_request:
branches: [master, develop]
branches: [ master, develop ]
permissions:
contents: write
pages: write
id-token: write

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

steps:
- uses: actions/checkout@v4
Expand All @@ -27,7 +31,7 @@ jobs:
mkdir ~/mne_data

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

Expand All @@ -37,63 +41,79 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache datasets and docs
id: cached-dataset-docs
- name: Create/Restore MNE Data Cache
id: cache-mne_data
uses: actions/cache@v3
with:
path: ~/mne_data
key: ${{ runner.os }}-mne_data

- name: Cache docs build
id: cache-docs
uses: actions/cache@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
~/mne_data
docs/build
key: docs-build-${{ github.run_id }}-${{ github.run_attempt }}
path: docs/build

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key:
docsvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{
hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: steps.cached-dataset-docs.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with docs --extras deeplearning
if: (steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
run: poetry install --no-interaction --no-root --with docs --extras deeplearning --extras optuna

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

- name: Build docs
run: |
cd docs && poetry run make html

# Create an artifact of the html output.
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: DocumentationHTML
path: docs/build/html/

deploy_docs:
if: ${{ github.ref == 'refs/heads/master' }}
deploy_neurotechx:
if: ${{ github.ref == 'refs/heads/develop' }}
needs: build_docs
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v4

- name: Create local data folder
run: |
mkdir ~/mne_data

- name: Cache datasets and docs
id: cached-dataset-docs
uses: actions/cache@v3
- name: Restore cached docs build
id: cache-docs
uses: actions/cache/restore@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
~/mne_data
docs/build
key: docs-build-${{ github.run_id }}-${{ github.run_attempt }}
path: docs/build

- name: Checkout moabb.github.io
uses: actions/checkout@v4
- name: Check cache hit
if: steps.cache-docs.outputs.cache-hit != 'true'
run: exit 1

- name: Deploy Neurotechx Subpage
uses: peaceiris/actions-gh-pages@v4
with:
repository: "NeuroTechX/moabb.github.io"
path: moabb-ghio
token: ${{ secrets.MOABB_GHIO }}
github_token: ${{ secrets.GITHUB_TOKEN }}
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/

deploy_gh_pages:
if: ${{ github.ref == 'refs/heads/develop' }}
Expand All @@ -102,47 +122,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v4

- name: Create local data folder
run: |
mkdir ~/mne_data

- name: Cache datasets and docs
id: cached-dataset-docs
uses: actions/cache@v3
- name: Restore cached docs build
id: cache-docs
uses: actions/cache/restore@v3
with:
key: doc-${{ github.head_ref }}-${{ hashFiles('moabb/datasets/**') }}
path: |
~/mne_data
docs/build
key: docs-build-${{ github.run_id }}-${{ github.run_attempt }}
path: docs/build

- name: Checkout gh pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: moabb-ghpages
- name: Check cache hit
if: steps.cache-docs.outputs.cache-hit != 'true'
run: exit 1

- name: Deploy Neurotechx Subpage
uses: peaceiris/actions-gh-pages@v3
- name: Deploy gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: NeuroTechX/moabb.github.io
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.MOABB_DEPLOY_KEY_NEW }}
destination_dir: docs/
publish_branch: master
publish_branch: gh-pages
publish_dir: ./docs/build/html
cname: moabb.neurotechx.com/

- name: Deploy on gh-pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
cd ~/work/moabb/moabb/moabb-ghpages
rm -Rf docs
cp -a ~/work/moabb/moabb/docs/build/html ./docs
git add -A
git commit -m "GH Actions update of GH pages ($GITHUB_RUN_ID - $GITHUB_RUN_NUMBER)"
git push origin gh-pages
cname: neurotechx.github.io/moabb/
36 changes: 20 additions & 16 deletions .github/workflows/test-braindecode.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Test-braindecode

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true


on:
push:
branches: [develop]
branches: [ develop ]
pull_request:
branches: [develop]
branches: [ develop ]

jobs:
test:
Expand All @@ -18,8 +16,8 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.8"]
os: [ ubuntu-latest ]
python-version: [ "3.8" ]
defaults:
run:
shell: bash
Expand All @@ -33,8 +31,21 @@ jobs:
repository: braindecode/braindecode
path: braindecode

- name: Create local data folder
if: runner.os != 'Windows'
run: |
mkdir ~/mne_data

- name: Create/Restore MNE Data Cache
if: runner.os != 'Windows'
id: cache-mne_data
uses: actions/cache@v3
with:
path: ~/mne_data
key: ${{ runner.os }}-mne_data

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

Expand All @@ -44,22 +55,15 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Create/Restore MNE Data Cache
id: cache-mne_data
uses: actions/cache@v3
with:
path: ~/mne_data
key: ${{ runner.os }}-mne

- name: Load cached venv
if: runner.os != 'Windows'
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key:
testvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{
hashFiles('**/poetry.lock') }}
testvenv-braindecode-${{ matrix.os }}-py${{matrix.python-version}}-${{
hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: |
Expand Down
33 changes: 22 additions & 11 deletions .github/workflows/test-devel.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Test-devel

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true


on:
push:
branches: [develop]
branches: [ develop ]
pull_request:
branches: [develop]
branches: [ develop ]

jobs:
test:
Expand All @@ -18,16 +16,29 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.9", "3.10"]
os: [ ubuntu-latest, windows-latest, macOS-latest ]
python-version: [ "3.9", "3.10" ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- name: Create local data folder
if: runner.os != 'Windows'
run: |
mkdir ~/mne_data

- name: Create/Restore MNE Data Cache
if: runner.os != 'Windows'
id: cache-mne_data
uses: actions/cache@v3
with:
path: ~/mne_data
key: ${{ runner.os }}-mne_data

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

Expand All @@ -45,21 +56,21 @@ jobs:
path: .venv
key:
testvenv-${{ matrix.os }}-py${{matrix.python-version}}-${{
hashFiles('**/poetry.lock') }}
hashFiles('**/pyproject.toml') }}

- name: Install dependencies
if: |
(runner.os != 'Windows') &&
(steps.cached-poetry-dependencies.outputs.cache-hit != 'true')
run: poetry install --no-interaction --no-root --extras deeplearning
run: poetry install --no-interaction --no-root --extras deeplearning --extras optuna

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

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

- name: Run tests
run: |
Expand Down
Loading
Loading