forked from DeepLearningForPrecisionHealthLab/MegNET_2020
-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
39 lines (28 loc) · 1.48 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
#>>>> https://stackoverflow.com/questions/53382383/makefile-cant-use-conda-activate
# Need to specify bash in order for conda activate to work.
SHELL=/bin/bash
# Note that the extra activate is needed to ensure that the activate floats env to the front of PATH
CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate ; conda activate
# <<<<
all: install_headless_test install_data test_headless
install_test:
conda env remove -n megnet_test
mamba create --override-channels --channel=conda-forge --name=megnet_test mne pip pytest -y
($(CONDA_ACTIVATE) megnet_test ; pip install -e .['testing'] )
install_data:
tmp_dir=$(pwd)
($(CONDA_ACTIVATE) datalad ; git clone ${MEG_DATA_SERVER}:test_data /data/NIGHTLY_TESTDATA/test_data ; cd /data/NIGHTLY_TESTDATA/test_data; datalad get /data/NIGHTLY_TESTDATA/test_data/* )
cd ${tmp_dir} #Revert out of datalad download location
install_headless_test:
conda env remove -n megnet_test
mamba create --override-channels --channel=conda-forge --name=megnet_test mne pip pytest "vtk>=9.2=*osmesa*" "mesalib=21.2.5" -y
($(CONDA_ACTIVATE) megnet_test ; pip install -e .['testing'] )
install_system_requirements:
dnf install Xvfb -y
dnf install git git-annex -y
test:
($(CONDA_ACTIVATE) megnet_test ; pytest -vv )
test_headless:
($(CONDA_ACTIVATE) megnet_test ; xvfb-run -a pytest -vv )
test_iterate_fs:
($(CONDA_ACTIVATE) megnet_test ; cd enigma_MEG; pytest -vv --report-log=./test_logfile.txt ) #xvfb-run -a pytest -s )