Skip to content
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
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ jobs:
# squash history onto the previous squash commit every ~20 deploys, so
# the repo stays small without a manual step and the push stays thin
python -m docstacks prune --keep 20 --min-squash 20 --push;
# go red if the version switcher and the deployed tree disagree (the
# 0.20 entry is the "≤ X.Y ..." link to the archived versions page)
python -m docstacks validate versions.json --site-dir . --ignore 0.20;
- save_cache:
key: website-cache-2
paths:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v7.1.0
- run: sudo apt-get update -q && sudo apt-get install -yq pandoc
- run: python -m pip install pygithub sphinx towncrier -e .
- run: python -m pip install pygithub sphinx towncrier -e . git+https://github.com/mne-tools/mne-tools
- name: Draft the announcement for the next minor release
env:
PR_NUMBER: ${{ github.event.pull_request.number }} # empty on main
Expand Down
13 changes: 4 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@

## Supported Versions

New minor versions of MNE-Python are typically released twice per year.
Only the most current stable release is officially supported.
New minor versions of MNE-Python are typically released three times per year.
Only the [most current stable release](https://github.com/mne-tools/mne-python/releases/latest)
is officially supported.
The unreleased, unstable "dev version" is also supported, though users
should beware that the API of the dev version is subject to change
without a proper 6-month deprecation cycle.

| Version | Supported |
| ------- | ------------------------ |
| 1.14.x | :heavy_check_mark: (dev) |
| 1.13.x | :heavy_check_mark: |
| < 1.13 | :x: |
without a proper one-release deprecation cycle.

## Reporting a Vulnerability

Expand Down
61 changes: 0 additions & 61 deletions doc/_static/js/update_installer_version.js

This file was deleted.

1 change: 0 additions & 1 deletion doc/changes/dev/13989.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc/changes/dev/14293.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc/changes/dev/14296.bugfix.rst

This file was deleted.

12 changes: 12 additions & 0 deletions doc/changes/v1.13.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.. _changes_1_13_2:

Version 1.13.2 (2026-09-11)
===========================

Bugfixes
--------

- Fix bug where :func:`mne.viz.plot_volume_source_estimates` with ``mode="glass_brain"`` always showed absolute values, by `Lau Møller Andersen`_. (`#13989 <https://github.com/mne-tools/mne-python/pull/13989>`__)
- Fix reading EEGLAB ``.set`` files containing MATLAB objects (e.g., ``string`` or ``datetime``) with SciPy 1.18+ when pymatreader is not installed, by `Eric Larson`_. (`#14293 <https://github.com/mne-tools/mne-python/pull/14293>`__)
- Fix :meth:`mne.io.Raw.export` to EDF/BDF altering channel values for data originally read from EDF/BDF files, and add a ``digital_range`` parameter to allow preserving the original digital range, by `Daniel McCloy`_. (`#14296 <https://github.com/mne-tools/mne-python/pull/14296>`__)

.. _changes_1_13_0:

Version 1.13.0 (2026-09-09)
Expand Down
15 changes: 7 additions & 8 deletions doc/install/installers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Platform-specific installers
:class-content: text-center
:name: install-linux

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.13.2/MNE-Python-1.13.2_0-Linux.sh
.. button-link:: https://github.com/mne-tools/mne-installers/releases/latest/download/MNE-Python-Linux.sh
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -31,14 +31,14 @@ Platform-specific installers

.. code-block:: console

$ sh ./MNE-Python-1.13.2_0-Linux.sh
$ sh ./MNE-Python-Linux.sh


.. tab-item:: macOS (Intel)
:class-content: text-center
:name: install-macos-intel

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.13.2/MNE-Python-1.13.2_0-macOS_Intel.pkg
.. button-link:: https://github.com/mne-tools/mne-installers/releases/latest/download/MNE-Python-macOS_Intel.pkg
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -54,7 +54,7 @@ Platform-specific installers
:class-content: text-center
:name: install-macos-apple

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.13.2/MNE-Python-1.13.2_0-macOS_M1.pkg
.. button-link:: https://github.com/mne-tools/mne-installers/releases/latest/download/MNE-Python-macOS_M1.pkg
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -70,7 +70,7 @@ Platform-specific installers
:class-content: text-center
:name: install-windows

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.13.2/MNE-Python-1.13.2_0-Windows.exe
.. button-link:: https://github.com/mne-tools/mne-installers/releases/latest/download/MNE-Python-Windows.exe
:ref-type: ref
:color: primary
:shadow:
Expand Down Expand Up @@ -99,7 +99,6 @@ Platform-specific installers

.. raw:: html

<script async="async" src="../_static/js/update_installer_version.js"></script>
<script async="async" src="../_static/js/set_installer_tab.js"></script>

First steps
Expand Down Expand Up @@ -164,7 +163,7 @@ To remove the MNE-Python distribution provided by our installers above:
.. code-block:: bash

$ which python
/home/username/mne-python/1.13.2_0/bin/python
/home/username/mne-python/X.Y.Z_0/bin/python
$ rm -Rf /home/$USER/mne-python
$ rm /home/$USER/.local/share/applications/mne-python-*.desktop

Expand All @@ -178,7 +177,7 @@ To remove the MNE-Python distribution provided by our installers above:
.. code-block:: bash

$ which python
/Users/username/Applications/MNE-Python/1.13.2_0/.mne-python/bin/python
/Users/username/Applications/MNE-Python/X.Y.Z_0/.mne-python/bin/python
$ rm -Rf /Users/$USER/Applications/MNE-Python # if user-specific
$ rm -Rf /Applications/MNE-Python # if system-wide

Expand Down
75 changes: 53 additions & 22 deletions tools/dev/finalize_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
python tools/dev/finalize_changelog.py 1.13.0

This writes doc/changes/vX.Y.rst with the authors list appended and points the
what's new toctree at it. Anything it flags is a .mailmap gap: fix it, then
what's new toctree at it. For a patch release (X.Y.Z with Z > 0, run on the
maint/X.Y branch) it instead adds the new section to the top of the existing
doc/changes/vX.Y.rst. Anything it flags is a .mailmap gap: fix it, then
``git checkout doc/changes`` and run again. It also drafts announcement.md, for
the forum and the GitHub release, from the entries of the PRs labeled
``release-highlight``, which needs ``pygithub`` and ``pandoc``. See the release
checklist in the wiki for the steps around it.
``release-highlight``, which needs ``pygithub`` and ``pandoc``, and regenerates
codemeta.json and CITATION.cff, which needs ``mne_tools``. See the release
checklists in the wiki for the steps around it.
"""

# Authors: The MNE-Python contributors.
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import argparse
import importlib.util
import json
import os
import re
Expand Down Expand Up @@ -75,15 +79,25 @@ def _bullet(text, number):
args = parser.parse_args()
assert re.fullmatch(r"\d+\.\d+\.\d+", args.version), args.version
out_fname = changes_dir / f"v{'.'.join(args.version.split('.')[:2])}.rst"
patch = not args.version.endswith(".0") # on maint/X.Y, adding to vX.Y.rst
if shutil.which("pandoc") is None:
raise SystemExit(
"pandoc must be on the PATH to draft the release announcement (nothing "
"has been written yet)"
)
if importlib.util.find_spec("mne_tools") is None:
raise SystemExit(
"mne_tools must be importable to update codemeta.json and CITATION.cff, "
"pip install git+https://github.com/mne-tools/mne-tools (nothing has "
"been written yet)"
)

# Everyone with a commit in the release, first-timers (who have a :newcontrib:
# entry, thanks to the credit action) marked with a trailing +
previous = _git("tag", "--list", "v*", "--sort=-v:refname").splitlines()[0]
# entry, thanks to the credit action) marked with a trailing +. On a maint
# branch, the latest tag overall can be a later minor release, so use the
# latest one in its history
previous = _git("tag", "--merged", "HEAD", "--list", "v*", "--sort=-v:refname")
previous = previous.splitlines()[0]
authors = dict( # name -> commit address
line.split("\t", maxsplit=1)[1].rstrip(">").split(" <", maxsplit=1)
for line in _git(
Expand Down Expand Up @@ -144,9 +158,11 @@ def _bullet(text, number):
in_release = set(_git("rev-list", f"{previous}..HEAD").splitlines())
entries, titles = {}, [] # changelog entry -> PR number, and PRs without one
for pr in labeled:
if pr.merge_commit_sha not in in_release and pr.number != args.pr:
continue
paths = list((changes_dir / "dev").glob(f"{pr.number}.*.rst"))
# A backport has another commit, but on maint all entries are backports
in_this = paths if patch else pr.merge_commit_sha in in_release
if not in_this and pr.number != args.pr:
continue
entries.update(dict.fromkeys(paths, pr.number))
if not paths:
print(f"Highlighted PR #{pr.number} has no changelog entry, using title")
Expand Down Expand Up @@ -203,31 +219,46 @@ def _bullet(text, number):
)
(repo_root / "announcement.md").write_text(announcement, "utf-8")

# towncrier prepends the release to dev.rst, which maint/X.Y does not have, so
# a patch release goes on top of vX.Y.rst there (above its anchor and authors)
dev_fname = changes_dir / "dev.rst"
if patch:
_git("mv", str(out_fname), str(dev_fname))
subprocess.run(
["towncrier", "build", "--yes", "--version", args.version],
cwd=repo_root,
check=True,
)

# towncrier prepends the release to dev.rst, so its scaffolding (everything the
# template has above the names.inc include) is left behind below the entries
dev_fname = changes_dir / "dev.rst"
text = dev_fname.read_text("utf-8")
scaffolding = (changes_dir / "dev.rst.template").read_text("utf-8")
scaffolding = scaffolding.split(".. include::")[0]
assert scaffolding in text, "dev.rst does not look like it came from the template"
lines = [f"- {name}{'+' if name in newcontribs else ''}" for name in sorted(authors)]
head, sep, tail = text.replace(scaffolding, "").rpartition(".. include::")
text = f"{head}Authors\n-------\n\n" + "\n".join(lines) + f"\n\n{sep}{tail}"
dev_fname.write_text(text, "utf-8")
# On main, the template scaffolding (everything above the names.inc include) is
# left behind below the entries
if not patch:
text = dev_fname.read_text("utf-8")
scaffolding = (changes_dir / "dev.rst.template").read_text("utf-8")
scaffolding = scaffolding.split(".. include::")[0]
assert scaffolding in text, "dev.rst does not look like it came from the template"
lines = [
f"- {name}{'+' if name in newcontribs else ''}" for name in sorted(authors)
]
head, sep, tail = text.replace(scaffolding, "").rpartition(".. include::")
text = f"{head}Authors\n-------\n\n" + "\n".join(lines) + f"\n\n{sep}{tail}"
dev_fname.write_text(text, "utf-8")

_git("mv", str(dev_fname), str(out_fname))
whats_new = repo_root / "doc" / "development" / "whats_new.rst"
text = whats_new.read_text("utf-8")
text = whats_new.read_text("utf-8") # on maint, the toctree has no dev.rst
text = text.replace(" ../changes/dev.rst\n", f" ../changes/{out_fname.name}\n")
whats_new.write_text(text, "utf-8")
for generator in ("generate_codemeta", "generate_citation"):
subprocess.run(
[sys.executable, "-m", f"mne_tools.{generator}", ".", args.version],
cwd=repo_root,
check=True,
)
print(
f"Wrote {out_fname.relative_to(repo_root)} with {len(authors)} authors "
f"({len(newcontribs)} new) since {previous}, and the draft announcement.md "
f"from {len(entries) + len(titles)} entries ({len(labeled)} labeled PRs found)"
f"Wrote {out_fname.relative_to(repo_root)} ({len(authors)} authors, "
f"{len(newcontribs)} new, since {previous}), codemeta.json, CITATION.cff, "
f"and the draft announcement.md from {len(entries) + len(titles)} entries "
f"({len(labeled)} labeled PRs found). If a new author has a compound "
"surname, add it to .extended_metadata.yaml and run again."
)
Loading