Skip to content

Commit

Permalink
Fix codecov (#115)
Browse files Browse the repository at this point in the history
* Fix codecov

* Fix readme and citation

* Fix readme and citation

* fix coverage settings

* remove codecov.yml

* Fix for pydata sphinx theme

* Revert "remove codecov.yml"

This reverts commit cef1b92.

* better coverage configuration

* Fix format?

Co-authored-by: mscheltienne <[email protected]>
Co-authored-by: Mathieu Scheltienne <[email protected]>
  • Loading branch information
3 people authored Aug 31, 2022
1 parent 2a20183 commit 34a896e
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
branches: [main]
paths:
- 'paper/*'
- "paper/*"

jobs:
paper:
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ concurrency:
on:
pull_request:
paths:
- '**.py'
- "**.py"
push:
branches: [main, maint/0.2, maint/0.3]
tags:
- 'v*.*.*'
- "v*.*.*"
paths:
- '**.py'
- "**.py"
workflow_dispatch:

jobs:
Expand All @@ -24,8 +24,8 @@ jobs:
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
python-version: "3.9"
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand All @@ -45,15 +45,15 @@ jobs:
with:
check_filenames: true
check_hidden: true
skip: './.git,./build,./.mypy_cache,./.pytest_cache'
skip: "./.git,./build,./.mypy_cache,./.pytest_cache"
ignore_words_file: ./.codespellignore
- name: Run pydocstyle
run: pydocstyle .
- name: Run mypy
uses: jpetrucciani/mypy-check@master
with:
path: './mne_icalabel'
mypy_flags: '--config-file pyproject.toml'
path: "./mne_icalabel"
mypy_flags: "--config-file pyproject.toml"

build:
timeout-minutes: 10
Expand All @@ -74,7 +74,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: [3.7, "3.10"] # oldest and newest supported versions
python-version: [3.7, "3.10"] # oldest and newest supported versions
mne: [stable, main]
name: pytest ${{ matrix.os }} - py${{ matrix.python-version }} - MNE ${{ matrix.mne }}
runs-on: ${{ matrix.os }}-latest
Expand All @@ -121,12 +121,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: main # clone repository in a sub-directory
path: main # clone repository in a sub-directory
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
architecture: "x64"
- name: Install Qt dependencies
if: "matrix.os == 'ubuntu'"
run: |
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
run: |
python -c "import mne; mne.datasets.testing.data_path()"
python -c "import mne_icalabel; mne_icalabel.datasets.icalabel.data_path()"
- name: Run pytest # headless via Xvfb on linux
- name: Run pytest # headless via Xvfb on linux
uses: GabrielBB/[email protected]
with:
run: pytest main/mne_icalabel --cov=main/mne_icalabel --cov-report=xml --cov-config=main/pyproject.toml
Expand All @@ -165,8 +165,10 @@ jobs:
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
fail_ci_if_error: true
verbose: true
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

# release is ran when a release is made on Github
release:
Expand All @@ -181,7 +183,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.9
architecture: 'x64'
architecture: "x64"
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
Expand Down
39 changes: 39 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,43 @@ keywords:
message: >-
Please cite this software using the metadata from
'preferred-citation' in the CITATION.cff file.
preferred-citation:
title: >-
MNE-ICALabel: Automatically annotating ICA components with ICLabel in Python
journal: Journal of Open Source Software
type: article
year: 2022
volume: 7
issue: 76
start: 4484
doi: 10.21105/joss.04484
authors:
- given-names: Adam
family-names: Li
affiliation: 'Department of Computer Science, Columbia University, New York, NY, USA'
orcid: 'https://orcid.org/0000-0001-8421-365X'
- given-names: Richard
family-names: Höchenberger
affiliation: 'Institute of Neuroscience and Medicine (INM-3), Research Center Jülich, Germany'
orcid: 'https://orcid.org/0000-0002-0380-4798'
- given-names: Thomas
family-names: Donoghue
affiliation: 'Department of Biomedical Engineering, Columbia University'
orcid: 'https://orcid.org/0000-0001-5911-0472'
- given-names: Mathieu
family-names: Scheltienne
affiliation: 'Human Neuroscience Platform, Fondation Campus Biotech Geneva, Geneva, Switzerland'
orcid: 'https://orcid.org/0000-0001-8316-7436'
- given-names: Jacob
family-names: Feitelberg
affiliation: 'Department of Biomedical Engineering, Johns Hopkins University, Baltimore, MD, USA'
orcid: 'https://orcid.org/0000-0002-4551-0245'
- given-names: Anand
family-names: Saini
affiliation: 'Human Neuroscience Platform, Fondation Campus Biotech Geneva, Geneva, Switzerland'
orcid: 'https://orcid.org/0000-0003-3595-5969'
identifiers:
- description: "Code archive on Zenodo"
type: doi
value: 10.5281/zenodo.7017165
...
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,26 @@ If you are interested in contributing, please read the
For any usage questions, please post to the
[MNE Forum](https://mne.discourse.group). Be sure to add the `mne-icalabel` tag to
your question.

# Citing

If you use the ``ICLabel`` model, please consider citing our paper:

Li et al., (2022). MNE-ICALabel: Automatically annotating ICA components with ICLabel in Python. Journal of Open Source Software, 7(76), 4484, https://doi.org/10.21105/joss.04484

with the corresponding BibTex:

@article{Li2022,
doi = {10.21105/joss.04484},
url = {https://doi.org/10.21105/joss.04484},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {76},
pages = {4484},
author = {Adam Li and Jacob Feitelberg and Anand Prakash Saini and Richard Höchenberger and Mathieu Scheltienne},
title = {MNE-ICALabel: Automatically annotating ICA components with ICLabel in Python},
journal = {Journal of Open Source Software}
}

Future versions of the software are aimed at improved models and may have different papers associated with it.
16 changes: 3 additions & 13 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ that build upon the ICLabel model.

We encourage you to use the package for your research and also build on top
with relevant Pull Requests. See our examples for walk-throughs of how to use the package.
Also, see our `contributing guide <https://github.com/mne-tools/mne-icalabel/blob/main/CONTRIBUTING.md>`_.

We are licensed under BSD-3 (see `License <https://github.com/mne-tools/mne-icalabel/blob/main/LICENSE>`_).

Contents
--------
Expand All @@ -28,19 +31,6 @@ Contents
api
auto_examples/index

.. toctree::
:hidden:
:caption: Development

License <https://raw.githubusercontent.com/mne-tools/mne-icalabel/main/LICENSE>
Contributing <https://github.com/mne-tools/mne-icalabel/blob/main/CONTRIBUTING.md>

License
-------

**mne-icalabel** is licensed under `BSD 3.0 <https://opensource.org/licenses/BSD-3-Clause>`_.
A full copy of the license can be found `on GitHub <https://raw.githubusercontent.com/mne-tools/mne-icalabel/main/LICENSE>`_.

Indices and tables
------------------

Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,10 @@ filterwarnings = []
[tool.coverage.run]
branch = true
cover_pylib = false
source = [
'mne_icalabel',
]
omit = [
'**/__init__.py',
'mne_icalabel/commands/*',
'mne_icalabel/_version.py',
'**/mne_icalabel/_version.py',
'**/mne_icalabel/commands/*',
'**/tests/**',
]

Expand Down

0 comments on commit 34a896e

Please sign in to comment.