File tree 2 files changed +35
-3
lines changed
2 files changed +35
-3
lines changed Original file line number Diff line number Diff line change
1
+ language : python
2
+ sudo : false
3
+
4
+ cache :
5
+ pip : true
6
+
7
+ os :
8
+ - linux
9
+
10
+ python :
11
+ - 2.7
12
+ - 3.5
13
+
14
+ install :
15
+ # - pip install coveralls flake8
16
+ - pip install -r requirements.txt
17
+
18
+ script :
19
+ # TODO to be enabled later
20
+ # - flake8 . --ignore=F403,E501,E123,E128 --exclude=build
21
+ - python start.py --travis
Original file line number Diff line number Diff line change 11
11
from collections import defaultdict
12
12
13
13
import math
14
+ import argparse
14
15
#import pdb
15
16
16
17
simulation_parameters = {'name' : 'name' ,
21
22
'start_cash_customer' : 100000.0 }
22
23
23
24
#@gui(simulation_parameters)
24
- def main (simulation_parameters ):
25
+ def main (simulation_parameters , isTravis ):
25
26
simulation = Simulation (rounds = simulation_parameters ['scheduledEndTime' ], processes = 1 )
26
27
27
28
insurancefirms = simulation .build_agents (InsuranceFirm , 'insurancefirm' ,
@@ -55,7 +56,17 @@ def main(simulation_parameters):
55
56
allagents .do ('filobl' )
56
57
insurancecustomers .do ('check_risk' )
57
58
58
- simulation .graphs ()
59
+ if not isTravis :
60
+ simulation .graphs ()
61
+
59
62
60
63
if __name__ == '__main__' :
61
- main (simulation_parameters )
64
+ # <Travis-specific code>
65
+ parser = argparse .ArgumentParser ()
66
+ parser .add_argument ('--travis' , dest = 'travis' , action = 'store_true' ,
67
+ default = False ,
68
+ help = 'Flag to disable gui when run in a Travis environment' )
69
+ args = parser .parse_args ()
70
+ # </Travis-specific code>
71
+
72
+ main (simulation_parameters , args .travis )
You can’t perform that action at this time.
0 commit comments