-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix pip syntax, add some ignores * fix syntax for osx in makefile * bump pre-commit hook #1256 * fix broken mne import * need to use .lower() for str comp * missed one str comp * Agg -> agg
- Loading branch information
1 parent
8e36555
commit a18d070
Showing
7 changed files
with
30 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,14 @@ | |
# Stefan Appelhoff <[email protected]> | ||
# | ||
# License: BSD-3-Clause | ||
import os | ||
import glob | ||
from os import path as op | ||
import os | ||
import shutil | ||
import sys | ||
from os import path as op | ||
|
||
import sphinx.util | ||
from mne.utils import run_subprocess, _replace_md5 | ||
from mne.utils import hashfunc, run_subprocess | ||
|
||
|
||
def setup(app): | ||
|
@@ -116,6 +117,17 @@ def generate_cli_rst(app=None): | |
print("[Done]") | ||
|
||
|
||
def _replace_md5(fname): | ||
"""Replace a file based on MD5sum.""" | ||
# adapted from sphinx-gallery | ||
assert fname.endswith(".new") | ||
fname_old = fname[:-4] | ||
if os.path.isfile(fname_old) and hashfunc(fname) == hashfunc(fname_old): | ||
os.remove(fname) | ||
else: | ||
shutil.move(fname, fname_old) | ||
|
||
|
||
# This is useful for testing/iterating to see what the result looks like | ||
if __name__ == "__main__": | ||
generate_cli_rst() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters