Skip to content

Commit

Permalink
Use assert_allclose instead of np.allclose and np.isclose(...).all() (#…
Browse files Browse the repository at this point in the history
…115)

* use assert_allclose instead of assert np.allclose

* replace assert np.isclose(...).all() with assert_allclose and use sane rtol=1e-7, atol=0 in remaining np.allclose tests

* fix warning about gradient_kwargs

* fix missing f-string

* update style configuration

* run ruff, isort, black

* bump MNE req. to 1.1.0 and above

* fix missed black

* remove test on pick_channels

* clean-up following black

* run black again..

* trigger cis

* trigger cis with MNE 1.5

* shorten strings through 88 character length

* fix style

* fix documentation build
  • Loading branch information
mscheltienne authored Aug 17, 2023
1 parent 38c8d48 commit 1d839e2
Show file tree
Hide file tree
Showing 50 changed files with 767 additions and 1,370 deletions.
Empty file added .codespellignore
Empty file.
24 changes: 0 additions & 24 deletions .flake8

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
name: style
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
# https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#pullrequestevent
# workflow name, PR number (empty on push), push ref (empty on PR)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
Expand All @@ -27,10 +24,8 @@ jobs:
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off .[style]
- name: Run flake8
uses: py-actions/flake8@v2
with:
path: "pycrostates"
- name: Run Ruff
run: ruff check pycrostates
- name: Run isort
uses: isort/isort-action@master
- name: Run black
Expand All @@ -43,6 +38,7 @@ jobs:
check_filenames: true
check_hidden: true
skip: ./.git,./build,./.github,*.bib
ignore_words_file: ./.codespellignore
- name: Run pydocstyle
run: pydocstyle .
- name: Run bibclean
Expand Down
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"bool": ":class:`python:bool`",
"Path": "pathlib.Path",
# MNE
"ConductorModel": "mne.bem.ConductorModel",
"DigMontage": "mne.channels.DigMontage",
"Epochs": "mne.Epochs",
"Evoked": "mne.Evoked",
Expand All @@ -169,6 +170,7 @@
"EpochsSegmentation": "pycrostates.segmentation.EpochsSegmentation",
# Matplotlib
"Axes": "matplotlib.axes.Axes",
"Axes3D": "mpl_toolkits.mplot3d.axes3d.Axes3D",
"colormap": ":doc:`colormap <matplotlib:tutorials/colors/colormaps>`",
"Figure": "matplotlib.figure.Figure",
# Scipy
Expand All @@ -178,9 +180,11 @@
"instance",
"of",
"shape",
"n_ch_groups",
"n_channels",
"n_clusters",
"n_epochs",
"n_picks",
"n_samples",
}

Expand Down
Loading

0 comments on commit 1d839e2

Please sign in to comment.