-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathRunTests
executable file
·52 lines (46 loc) · 1.74 KB
/
RunTests
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
#!/bin/bash
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
cd $SCRIPT_DIR
echo ' '
echo 'RUNNING VESIcal TESTING ROUTINES'
echo '================================'
echo ' '
echo 'RUN DOCUMENTAITON NOTEBOOKS?'
echo '============================'
while true; do
read -t 10 -p 'Would you like to also re-run documentation notebooks? [Y/N] Will default to N after 10 seconds. ' yn
if [[ $yn ]]
then
case $yn in
[Yy]* ) echo ' '
echo "UPDATING DOCUMENTATION JUPYTER NOTEBOOKS AND TABLES"
echo '==================================================='
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_satP.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_dissolved.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_eqfluid.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_normalize.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/adv_newcalcs.ipynb
echo ' '
echo "TESTING DOCUMENTATION JUPYTER NOTEBOOKS WITHOUT TABLES"
echo '======================================================'
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_degassing.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_import.ipynb
jupyter nbconvert --execute --to notebook --inplace docs/jupyter_notebooks/ex_isobarsandisopleths.ipynb
break;;
[Nn]* ) break;;
* ) echo "Please answer Y or N.";;
esac
else
break
fi
done
echo ' '
echo 'RUNNING FLAKE8'
echo '=============='
python -m flake8
echo "flake8 completed"
echo ' '
echo "RUNNING UNIT TESTS"
echo '=================='
python tests/print_version.py
python -m unittest