Diff of /Makefile [000000] .. [7f9fb8]

Switch to unified view

a b/Makefile
1
# simple makefile to simplify repetitive build env management tasks under posix
2
3
PYTHON ?= python
4
PYTESTS ?= py.test
5
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"
6
CODESPELL_DIRS ?= mne/ doc/ tutorials/ examples/
7
all: clean test-doc
8
9
clean-pyc:
10
    find . -name "*.pyc" | xargs rm -f
11
12
clean-so:
13
    find . -name "*.so" | xargs rm -f
14
    find . -name "*.pyd" | xargs rm -f
15
16
clean-build:
17
    rm -rf build dist
18
19
clean-ctags:
20
    rm -f tags
21
22
clean-cache:
23
    find . -name "__pycache__" | xargs rm -rf
24
25
clean: clean-build clean-pyc clean-so clean-ctags clean-cache
26
27
wheel:
28
    $(PYTHON) -m build -w
29
30
sample_data:
31
    @python -c "import mne; mne.datasets.sample.data_path(verbose=True);"
32
33
testing_data:
34
    @python -c "import mne; mne.datasets.testing.data_path(verbose=True);"
35
36
test-no-network: in
37
    sudo unshare -n -- sh -c 'MNE_SKIP_NETWORK_TESTS=1 py.test mne'
38
39
test-no-testing-data: in
40
    @MNE_SKIP_TESTING_DATASET_TESTS=true \
41
    $(PYTESTS) mne
42
43
test-doc: sample_data testing_data
44
    $(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
45
46
pre-commit:
47
    @pre-commit run -a --show-diff-on-failure
48
49
# Aliases for stuff we used to support or users might think of
50
ruff: pre-commit
51
flake: pre-commit
52
pep: pre-commit
53
54
codespell:  # running manually
55
    @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)
56
57
check-readme: clean wheel
58
    twine check dist/*
59
60
nesting:
61
    @echo "Running import nesting tests"
62
    @$(PYTESTS) mne/tests/test_import_nesting.py