Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into deploy
Browse files Browse the repository at this point in the history
* upstream/main: (56 commits)
  [CI] Fix CIs (mne-tools#164)
  Fix azure
  Fix CIs
  New dev for v0.7
  [RELEASE] V0.6 (mne-tools#162)
  Try azure again
  [CI] Fix azure (mne-tools#161)
  Add gitblame
  [MAINT] Run black, isort, ruff, and other auto-linters on entire package (mne-tools#159)
  [MAINT] Replace setup.py with pyproject.toml (mne-tools#160)
  [BUG] Fixed issue w/ different rank-indices length (mne-tools#158)
  [MAINT] Refactor bivariate and multivariate methods into separate files (mne-tools#156)
  [MAINT] Fix failing unit tests & update CI packages (mne-tools#157)
  fixed grammar mistake
  switched to array indices & added inline comments
  updated default non-zero rank tolerance
  removed redundant list creation
  removed redundant ignored word
  switched to masked indices for multivariate conn
  updated time
  ...
  • Loading branch information
larsoner committed Jan 9, 2024
2 parents da9b5a6 + 32b10ea commit 8af7d36
Show file tree
Hide file tree
Showing 80 changed files with 7,375 additions and 4,627 deletions.
425 changes: 212 additions & 213 deletions .circleci/config.yml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
raison
fro
nd
manuel
ba
master
28 changes: 28 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[flake8]
max-line-length = 100

ignore =
# these rules don't play well with black
# whitespace before ':'
E203
# line break before binary operator
W503
E241,E305,W504,W605,E731

exclude =
.git
.github
.venv
.mypy_cache
.pytest_cache
.circleci
paper
setup.py
doc
benchmarks
build

per-file-ignores =
# __init__.py files are allowed to have unused imports
*/__init__.py:F401
*/**/__init__.py:F401
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0c216d35127f48792caabdc3cca170874a443eee # black, isort, ruff
22 changes: 22 additions & 0 deletions .github/workflows/cffconvert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: cffconvert

on:
push:
paths:
- CITATION.cff
pull_request:
paths:
- CITATION.cff

jobs:
validate:
name: "validate"
runs-on: ubuntu-latest
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v4

- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
with:
args: "--validate"
47 changes: 47 additions & 0 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: code-style
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches: [main, maint/0.2, maint/0.3, maint/0.4]
workflow_dispatch:

jobs:
style:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
python -m pip install --progress-bar off .[style]
- name: Run isort
uses: isort/isort-action@master
- name: Run black
uses: psf/black@stable
with:
options: "--check --verbose"
- name: Run Ruff
run: ruff check .
- name: Run codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: './.git,./build,./.mypy_cache,./.pytest_cache,./mne_icalabel/iclabel/network/assets'
ignore_words_file: ./.codespellignore
# - name: Run pydocstyle
# run: pydocstyle .
- name: Run toml-sort
run: toml-sort pyproject.toml --check
- name: Run yamllint
run: yamllint . -c .yamllint.yml --strict
50 changes: 16 additions & 34 deletions .github/workflows/linux_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
shell: bash -el {0}
env:
CONDA_ENV: 'environment.yml'
DISPLAY: ':99.0'
Expand All @@ -27,47 +27,29 @@ jobs:
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.9'
steps:
- uses: actions/checkout@v2
- run: |
curl https://raw.githubusercontent.com/mne-tools/mne-python/main/tools/setup_xvfb.sh -o setup_xvfb.sh
chmod +x setup_xvfb.sh
./setup_xvfb.sh
name: 'Setup xvfb'
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: mamba-org/setup-micromamba@v1
with:
activate-environment: 'mne'
python-version: ${{ env.PYTHON_VERSION }}
environment-file: ${{ env.CONDA_ENV }}
name: 'Setup conda'
- shell: bash -el {0}
run: |
conda activate mne
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=${{ env.PYTHON_VERSION }}
- run: |
curl https://raw.githubusercontent.com/mne-tools/mne-python/main/tools/get_minimal_commands.sh -o get_minimal_commands.sh
chmod +x get_minimal_commands.sh
source ./get_minimal_commands.sh
pip install -r requirements_testing.txt
pip install .[test]
name: 'Install dependencies'

- shell: bash -el {0}
name: Install MNE (main)
run: |
git clone --depth 1 https://github.com/mne-tools/mne-python.git -b main
pip install -e ./mne-python
- shell: bash -el {0}
run: |
python setup.py build
python setup.py install
name: 'Install MNE'

- shell: bash -el {0}
run: |
- run: pip install git+https://github.com/mne-tools/mne-python@main
- run: pip install -e .
- run: |
which mne
mne sys_info -pd
python -c "import numpy; numpy.show_config()"
name: 'Show infos'

- name: Run pytest
run: |
python -m pytest . --cov=mne_connectivity --cov-report=xml --cov-config=setup.cfg --verbose --ignore mne-python
shell: bash -el {0}
run: python -m pytest . --cov=mne_connectivity --cov-report=xml --cov-config=pyproject.toml --verbose --ignore mne-python
- uses: codecov/codecov-action@v3
36 changes: 18 additions & 18 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install twine wheel
- name: Install dependencies
run: |
pip install .[build]
pip install twine wheel
- name: Build and publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m twine upload --repository pypi dist/*
- name: Build and publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m twine upload --repository pypi dist/*
Loading

0 comments on commit 8af7d36

Please sign in to comment.