Skip to content

Commit

Permalink
ENH: Add memory to circle [skip travis] [skip github]
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Oct 16, 2020
1 parent db510cc commit e5c06f5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
20 changes: 15 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ jobs:
touch pattern.txt;
if [ "$CIRCLE_BRANCH" == "master" ] || [[ $(cat gitlog.txt) == *"[circle full]"* ]]; then
echo "Doing a full dev build";
echo html_dev > build.txt;
echo html_dev-memory > build.txt;
python -c "import mne; mne.datasets._download_all_example_data()";
elif [ "$CIRCLE_BRANCH" == "maint/0.21" ]; then
echo "Doing a full stable build";
echo html_stable > build.txt;
echo html_stable-memory > build.txt;
python -c "import mne; mne.datasets._download_all_example_data()";
else
echo "Doing a partial build";
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
echo PATTERN="$PATTERN";
if [[ $PATTERN ]]; then
PATTERN="\(${PATTERN::-2}\)";
echo html_dev-pattern > build.txt;
echo html_dev-pattern-memory > build.txt;
else
echo html_dev-noplot > build.txt;
fi;
Expand All @@ -234,7 +234,7 @@ jobs:
- run:
name: make test-doc
command: |
if [[ $(cat gitlog.txt) == *"[circle front]"* ]] || [[ $(cat build.txt) == "html_dev" ]] || [[ $(cat build.txt) == "html_stable" ]]; then
if [[ $(cat gitlog.txt) == *"[circle front]"* ]] || [[ $(cat build.txt) == "html_dev-memory" ]] || [[ $(cat build.txt) == "html_stable-memory" ]]; then
make test-doc;
mkdir -p doc/_build/test-results/test-doc;
cp junit-results.xml doc/_build/test-results/test-doc/junit.xml;
Expand All @@ -245,6 +245,16 @@ jobs:
command: |
cd doc;
PATTERN=$(cat ../pattern.txt) make $(cat ../build.txt);
- run:
name: Show profiling output
when: always
command: |
if compgen -G "doc/*.mprof" > /dev/null; then
mkdir -p doc/generated
mprof plot doc/*.mprof --output doc/generated/memory.png
else
echo "No profile data found in doc/"
fi
- run:
name: Sanity check system state
command: |
Expand All @@ -254,7 +264,7 @@ jobs:
- run:
name: Reduce artifact upload time
command: |
if grep -q html_dev-pattern build.txt || grep -q html_dev-noplot build.txt; then
if grep -q html_dev-pattern-memory build.txt || grep -q html_dev-noplot build.txt; then
tar czf doc/_build/html/_downloads.tgz doc/_build/html/_downloads
rm -Rf doc/_build/html/_downloads
rm -f doc/auto_*/*/*.pickle
Expand Down
18 changes: 17 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
SPHINXOPTS = -nWT --keep-going
SPHINXBUILD = sphinx-build
PAPER =
MPROF = mprof run --python sphinx

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand Down Expand Up @@ -36,6 +37,11 @@ clean:
-rm -rf _build auto_examples auto_tutorials generated *.stc *.fif *.nii.gz

html_stable:
$(MPROF) -b html $(ALLSPHINXOPTS) _build/html_stable
@echo
@echo "Build finished. The HTML pages are in _build/html_stable."

html_stable-memory:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html_stable
@echo
@echo "Build finished. The HTML pages are in _build/html_stable."
Expand All @@ -45,8 +51,18 @@ html_dev:
@echo
@echo "Build finished. The HTML pages are in _build/html"

html_dev-memory:
BUILD_DEV_HTML=1 $(MPROF) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html"

html_dev-pattern:
BUILD_DEV_HTML=1 $(SPHINXBUILD) -D plot_gallery=1 -D sphinx_gallery_conf.filename_pattern=$(PATTERN) -b html $(ALLSPHINXOPTS) _build/html
BUILD_DEV_HTML=1 $(SPHINXBUILD) -D sphinx_gallery_conf.filename_pattern=$(PATTERN) -D sphinx_gallery_conf.run_stale_examples=True -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html"

html_dev-pattern-memory:
BUILD_DEV_HTML=1 $(MPROF) -D sphinx_gallery_conf.filename_pattern=$(PATTERN) -D sphinx_gallery_conf.run_stale_examples=True -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html"

Expand Down
6 changes: 3 additions & 3 deletions examples/inverse/plot_mixed_source_space_inverse.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
===================================================================
Compute MNE inverse solution on evoked data in a mixed source space
===================================================================
=====================================================================
Compute MNE inverse solution on evoked data with a mixed source space
=====================================================================
Create a mixed source space and compute an MNE inverse solution on an
evoked dataset.
Expand Down

0 comments on commit e5c06f5

Please sign in to comment.