forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (44 loc) · 2.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# simple makefile to simplify repetitive build env management tasks under posix
PYTHON ?= python
PYTESTS ?= py.test
CODESPELL_SKIPS ?= "doc/_build,doc/auto_*,*.fif,*.eve,*.gz,*.tgz,*.zip,*.mat,*.stc,*.label,*.w,*.bz2,*.annot,*.sulc,*.log,*.local-copy,*.orig_avg,*.inflated_avg,*.gii,*.pyc,*.doctree,*.pickle,*.inv,*.png,*.edf,*.touch,*.thickness,*.nofix,*.volume,*.defect_borders,*.mgh,lh.*,rh.*,COR-*,FreeSurferColorLUT.txt,*.examples,.xdebug_mris_calc,bad.segments,BadChannels,*.hist,empty_file,*.orig,*.js,*.map,*.ipynb,searchindex.dat,install_mne_c.rst,plot_*.rst,*.rst.txt,c_EULA.rst*,*.html,gdf_encodes.txt,*.svg,references.bib,*.css,*.edf,*.bdf,*.vhdr"
CODESPELL_DIRS ?= mne/ doc/ tutorials/ examples/
all: clean test-doc
clean-pyc:
find . -name "*.pyc" | xargs rm -f
clean-so:
find . -name "*.so" | xargs rm -f
find . -name "*.pyd" | xargs rm -f
clean-build:
rm -rf build dist
clean-ctags:
rm -f tags
clean-cache:
find . -name "__pycache__" | xargs rm -rf
clean: clean-build clean-pyc clean-so clean-ctags clean-cache
wheel:
$(PYTHON) -m build -w
sample_data:
@python -c "import mne; mne.datasets.sample.data_path(verbose=True);"
testing_data:
@python -c "import mne; mne.datasets.testing.data_path(verbose=True);"
test-no-network: in
sudo unshare -n -- sh -c 'MNE_SKIP_NETWORK_TESTS=1 py.test mne'
test-no-testing-data: in
@MNE_SKIP_TESTING_DATASET_TESTS=true \
$(PYTESTS) mne
test-doc: sample_data testing_data
$(PYTESTS) --doctest-modules --doctest-ignore-import-errors --doctest-glob='*.rst' ./doc/ --ignore=./doc/auto_examples --ignore=./doc/auto_tutorials --ignore=./doc/_build --ignore=./doc/conf.py --ignore=doc/sphinxext --fulltrace
pre-commit:
@pre-commit run -a
# Aliases for stuff we used to support or users might think of
ruff: pre-commit
flake: pre-commit
pep: pre-commit
codespell: # running manually
@codespell --builtin clear,rare,informal,names,usage -w -i 3 -q 3 -S $(CODESPELL_SKIPS) --ignore-words=ignore_words.txt --uri-ignore-words-list=bu $(CODESPELL_DIRS)
check-readme: clean wheel
twine check dist/*
nesting:
@echo "Running import nesting tests"
@$(PYTESTS) mne/tests/test_import_nesting.py