-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathtest_all.sh
More file actions
executable file
·133 lines (100 loc) · 3.64 KB
/
test_all.sh
File metadata and controls
executable file
·133 lines (100 loc) · 3.64 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/bin/bash
set -ex
## This is overkill, but it seems to lead to less space being used on install, which was
## causing issues on GHA CI.
df -h
pip install . --cache-dir=/home/runner/tmp --prefer-binary
df -h
pip cache info
pip cache purge
df -h
pip install .[optional] --cache-dir=/home/runner/tmp --prefer-binary
df -h
pip cache purge
df -h
pip install .[all] --cache-dir=/home/runner/tmp --prefer-binary
df -h
# Note this:
# 1) runs examples to regenerate yaml/json...
# 2) tests examples with simple_scheduler
python -m pytest -ra -v tests/*.py
python -m pytest -rav tests/interfaces/onnx/*.py
python -m pytest -rav tests/interfaces/pytorch/test_export.py
#python -m pytest -ra tests/interfaces/pytorch/test_import.py # inception taking v long
cd examples/MDF
## Test generating MDF models, saving json/yaml & running the models
python simple.py -run
python abcd.py -run
python arrays.py -run
python states.py -run -nogui
python abc_conditions.py -run
python params_funcs.py -run
python newton.py -run -nogui
python switched_rlc.py -run -nogui
## Test exporting to NeuroML
python -m modeci_mdf.interfaces.neuroml.exporter Simple.json -run
python -m modeci_mdf.interfaces.neuroml.exporter ABCD.json -run
python -m modeci_mdf.interfaces.neuroml.exporter States.json -run
## Test exporting to graphs via GraphViz
python -m modeci_mdf.interfaces.graphviz.exporter Simple.json 1 -noview -horizontal
mv simple_example.gv.png images/simple.png
python -m modeci_mdf.interfaces.graphviz.exporter Simple.json 3 -noview
mv simple_example.gv.png images/simple_3.png
python -m modeci_mdf.interfaces.graphviz.exporter ABCD.json 1 -noview -horizontal
mv abcd_example.gv.png images/abcd.png
python -m modeci_mdf.interfaces.graphviz.exporter ABCD.json 3 -noview
mv abcd_example.gv.png images/abcd_3.png
python -m modeci_mdf.interfaces.graphviz.exporter Arrays.json 3 -noview
mv array_example.gv.png images/arrays.png
python -m modeci_mdf.interfaces.graphviz.exporter States.yaml 3 -noview
mv state_example.gv.png images/states.png
python -m modeci_mdf.interfaces.graphviz.exporter abc_conditions.yaml 3 -noview
mv abc_conditions_example.gv.png images/abc_conditions.png
python -m modeci_mdf.interfaces.graphviz.exporter ParametersFunctions.yaml 3 -noview
mv params_funcs_example.gv.png images/params_funcs.png
python -m modeci_mdf.interfaces.graphviz.exporter NewtonCoolingModel.yaml 3 -noview
mv cooling_process.gv.png images/newton.png
mv newton_plot.png images/newton_plot.png
python -m modeci_mdf.interfaces.graphviz.exporter SwitchedRLC_Circuit.yaml 3 -noview
mv SwitchedRLC_Circuit.gv.png images/switched_rlc_circuit.png
mv switched_rlc_plot.png images/switched_rlc_plot.png
cd conditions
python everyNCalls.py -graph
mv everyncalls.png images/everyncalls.png
python timeInterval.py -graph
mv timeinterval.png images/timeinterval.png
python threshold.py -graph
mv threshold.png images/threshold.png
python composite_condition_example.py -graph
mv composite_example.png images/composite_example.png
cd ..
## Test regenerating NeuroML
cd RNN
./regenerate.sh
## Test regenerating network example
cd ../networks
./regenerate.sh
## Test regenerating NeuroML
cd ../../NeuroML
./regenerateAndTest.sh -nogui
## Test PyTorch examples
cd ../PyTorch
./regenerate.sh
## Test ONNX examples
cd ../ONNX
python simple_ab.py -run
python simple_abc.py
python simple_abcd.py
python abc_basic.py
## Test ACT-R examples
cd ../ACT-R
python count.py
python addition.py
## Test Keras examples
cd ../TensorFlow/Keras
./regenerate.sh
## Generate the docs
cd ../../../docs
python generate.py
cd ..
/bin/bash -c 'pre-commit run --all-files; echo Finished running pre-commit!' # Note: prevents error code when reformatting