Skip to content

Commit

Permalink
Simplify authors and copyright in all .py files (and make consistent) (
Browse files Browse the repository at this point in the history
…#1267)

* authors are 'The MNE-BIDS developers'

* clean up artifact from example

* adjust copyright and authors in examples/

* adjust copyright and authors in root package

* adjust copyright and authors in commands/

* adjust copyright and authors in tests/

* undo 'fix' of imports

* fix example

* bump previous mne version, it's 1.6, not 1.5

* fix where to write example
  • Loading branch information
sappelhoff authored Jul 11, 2024
1 parent 422a842 commit 313fe10
Show file tree
Hide file tree
Showing 65 changed files with 185 additions and 212 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
- name: Install MNE (previous stable)
if: matrix.mne-version == 'mne-prev-stable'
run: |
git clone --single-branch --branch maint/1.5 https://github.com/mne-tools/mne-python.git
git clone --single-branch --branch maint/1.6 https://github.com/mne-tools/mne-python.git
python -m pip install -e ./mne-python
- name: Install MNE (main)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018, mne-bids developers
Copyright (c) 2018, The MNE-BIDS developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
5 changes: 4 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Configure details for documentation with sphinx."""

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

import os
import sys
from datetime import date
Expand All @@ -8,7 +12,6 @@

import mne_bids


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down
2 changes: 1 addition & 1 deletion doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Dependencies

Required:

* ``mne`` (>=1.5)
* ``mne`` (>=1.6)
* ``numpy`` (>=1.21.2)
* ``scipy`` (>=1.7.0)

Expand Down
9 changes: 4 additions & 5 deletions doc/sphinxext/gen_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
Inspired by MNE-Python's `gen_commands.py`
see: github.com/mne-tools/mne-python/blob/main/doc/sphinxext/gen_commands.py
"""
# Authors: Eric Larson <[email protected]>
# Alexandre Gramfort <[email protected]>
# Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

import glob
import os
import shutil
Expand Down
4 changes: 4 additions & 0 deletions doc/sphinxext/gh_substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
https://doughellmann.com/blog/2010/05/09/defining-custom-roles-in-sphinx/
"""

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

from docutils.nodes import reference
from docutils.parsers.rst.roles import set_classes

Expand Down
2 changes: 1 addition & 1 deletion doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Detailed list of changes
🛠 Requirements
^^^^^^^^^^^^^^^

- nothing yet
- MNE-BIDS now requires MNE-Python 1.6.0 or higher.

🪲 Bug fixes
^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion doc/whats_new_previous_releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Detailed list of changes
^^^^^^^^^^^^^^^

- MNE-BIDS now requires Python 3.9 or higher.
- MNE-BIDS now requires MNE-Python 1.5.0 or higher.
- MNE-BIDS now requires MNE-Python 1.6.0 or higher.
- ``edfio`` replaces ``EDFlib-Python`` for export to EDF with MNE-Python >= 1.7.0.
- Installing ``mne-bids[full]`` will now also install ``defusedxml`` on all platforms.
- Version requirements for optional dependency packages have been bumped up, see installation instructions.
Expand Down
7 changes: 3 additions & 4 deletions examples/anonymize_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
to do the heavy lifting for you, automatically.
""" # noqa: D400 D205

# Authors: Richard Höchenberger <[email protected]>
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
import shutil
from pathlib import Path

import mne

Expand All @@ -37,7 +36,7 @@
write_raw_bids,
)

data_path = Path(mne.datasets.sample.data_path())
data_path = mne.datasets.sample.data_path()
event_id = {
"Auditory/Left": 1,
"Auditory/Right": 2,
Expand Down
7 changes: 3 additions & 4 deletions examples/bidspath.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
BIDSPath is MNE-BIDS's working horse when it comes to file and folder
operations. Learn here how to use it.
"""
# Authors: Richard Höchenberger <[email protected]>
# Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Obviously, to start exploring BIDSPath, we first need to import it.
Expand Down
5 changes: 2 additions & 3 deletions examples/convert_eeg_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
""" # noqa: E501

# Authors: Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# We are importing everything we need for this example:
Expand Down
5 changes: 2 additions & 3 deletions examples/convert_empty_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
format and how to retrieve them.
"""

# Authors: Mainak Jas <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# We are dealing with MEG data, which is often accompanied by so-called
Expand Down
7 changes: 2 additions & 5 deletions examples/convert_group_studies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
checking out this group conversion example: :ref:`ex-convert-mne-sample`
"""

# Authors: Mainak Jas <[email protected]>
# Teon Brooks <[email protected]>
# Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Let us import ``mne_bids``
Expand Down
7 changes: 2 additions & 5 deletions examples/convert_ieeg_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@
""" # noqa: E501

# Authors: Adam Li <[email protected]>
# Stefan Appelhoff <[email protected]>
# Alex Rockhill <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%

Expand Down
9 changes: 2 additions & 7 deletions examples/convert_mne_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
.. _ds000248 dataset_description.json: https://github.com/sappelhoff/bids-examples/blob/master/ds000248/dataset_description.json
""" # noqa: D400 D205 E501

# Authors: Mainak Jas <[email protected]>
# Alexandre Gramfort <[email protected]>
# Teon Brooks <[email protected]>
# Stefan Appelhoff <[email protected]>
# Richard Höchenberger <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# First we import some basic Python libraries, followed by MNE-Python and its
Expand Down
8 changes: 3 additions & 5 deletions examples/convert_mri_and_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
``nilearn`` on top of your usual ``mne-bids`` installation.
"""
# Authors: Stefan Appelhoff <[email protected]>
# Alex Rockhill <[email protected]>
# Alex Gramfort <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Let's import everything we need for this example:
Expand Down
5 changes: 2 additions & 3 deletions examples/convert_nirs_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
""" # noqa: E501

# Authors: Robert Luke <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# We are importing everything we need for this example:
Expand Down
15 changes: 11 additions & 4 deletions examples/create_bids_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
``write_raw_bids``. This example is for manually creating files/folders.
"""

# Authors: Chris Holdgraf <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# First we will import the relevant functions

import shutil

import mne

from mne_bids import BIDSPath

# %%
Expand Down Expand Up @@ -49,7 +52,11 @@
#
# You can also use MNE-BIDS to create folder hierarchies.

my_root = mne.datasets.sample.data_path() # replace with *your* root folder
bids_path = BIDSPath(
subject="01", session="mysession", datatype="meg", root="path/to/project"
subject="mneBIDStest", session="mysession", datatype="meg", root=my_root
).mkdir()
print(bids_path.directory)

# clean up
shutil.rmtree(my_root / "sub-mneBIDStest")
5 changes: 2 additions & 3 deletions examples/mark_bad_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
.. _MNE-Python Annotations tutorial: https://mne.tools/stable/auto_tutorials/raw/30_annotate_raw.html#annotating-raw-objects-interactively
""" # noqa: E501 D400 D205

# Authors: Richard Höchenberger <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# We will demonstrate how to mark individual channels as bad on the MNE
Expand Down
8 changes: 3 additions & 5 deletions examples/read_bids_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
inspect BIDS-formatted data.
"""
# Authors: Adam Li <[email protected]>
# Richard Höchenberger <[email protected]>
# Alex Rockhill <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Imports
Expand Down
9 changes: 2 additions & 7 deletions examples/rename_brainvision_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
.. _BrainVision data format: https://www.brainproducts.com/support-resources/brainvision-core-data-format-1-0/
""" # noqa:E501

# Authors: Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# We are importing everything we need for this example:
Expand Down Expand Up @@ -89,11 +88,7 @@
# For converting data files, or writing new data to the BrainVision format, you
# can use :mod:`mne.export` or have a look at the `pybv`_ Python package.
#
# There is node JS tool to check the integrity of your BrainVision files.
# For that, see the `BrainVision Validator <bv-validator_>`_
#
# .. _`pybv`: https://github.com/bids-standard/pybv
# .. _`bv-validator`: https://github.com/sappelhoff/brainvision-validator
#
# References
# ----------
Expand Down
7 changes: 3 additions & 4 deletions examples/update_bids_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
In this tutorial, we show how ``update_sidecar_json`` can be used to update and
modify BIDS-formatted data.
"""
# Authors: Adam Li <[email protected]>
# mne-bids developers
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

# %%
# Imports
Expand Down
3 changes: 3 additions & 0 deletions mne_bids/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""MNE software for easily interacting with BIDS compatible datasets."""

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

try:
from importlib.metadata import version

Expand Down
3 changes: 3 additions & 0 deletions mne_bids/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
"""Initialize cli."""

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause
6 changes: 3 additions & 3 deletions mne_bids/commands/mne_bids_calibration_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
--bids_root=bids_root --file=sss_cal.dat
"""
# Authors: Richard Höchenberger <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

from mne.utils import logger

Expand Down
6 changes: 3 additions & 3 deletions mne_bids/commands/mne_bids_count_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"""

# Authors: Alex Gramfort <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

from pathlib import Path

import mne_bids
Expand Down
6 changes: 3 additions & 3 deletions mne_bids/commands/mne_bids_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
example usage: $ mne_bids cp --input myfile.vhdr --output sub-01_task-test.vhdr
"""

# Authors: Stefan Appelhoff <[email protected]>
#
# License: BSD-3-Clause
# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

import mne_bids
from mne_bids.copyfiles import copyfile_brainvision, copyfile_ctf, copyfile_eeglab

Expand Down
6 changes: 3 additions & 3 deletions mne_bids/commands/mne_bids_crosstalk_to_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
--bids_root=bids_root --file=ct_sparse.fif
"""
# Authors: Richard Höchenberger <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

from mne.utils import logger

Expand Down
6 changes: 3 additions & 3 deletions mne_bids/commands/mne_bids_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
--datatype=meg --suffix=meg --bids_root=bids_root
"""
# Authors: Richard Höchenberger <[email protected]>
#
# License: BSD-3-Clause

# Authors: The MNE-BIDS developers
# SPDX-License-Identifier: BSD-3-Clause

from mne.utils import logger

Expand Down
Loading

0 comments on commit 313fe10

Please sign in to comment.