Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 36 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,55 @@ language: python
python:
- "3.7"

services:
- xvfb
#services:
# - xvfb

env:
-DISPLAY=:99.0

before_install:
- sh -e /etc/init.d/xvfb start

#before_script:
# - "export DISPLAY=:99.0"
# - "sh -e /etc/init.d/xvfb start"
# - sleep 3 # give xvfb some time to start

sudo: true

#cache: pip

#on_success: never
#on_failure: change

git:
submodules: false

addons:
apt:
packages:
# - libwebkitgtk-dev
# - libjpeg-dev
# - libtiff-dev
- libgtk-3-dev
# - libsdl1.2-dev
# - libgstreamer-plugins-base0.10-dev
# - freeglut3
# - freeglut3-dev
# - libnotify-dev
- dpkg-dev
- build-essential
- python-dev
- libjpeg-dev
- libtiff5-dev
- libsdl1.2-dev
- libgstreamer-plugins-base0.10-dev
- libnotify-dev
- freeglut3
- freeglut3-dev
- libsm-dev
- libgtk-3-dev
- libpng16-16
- libwebkitgtk-3.0-dev
- libgstreamer-plugins-base1.0-dev
- at-spi2-core

# command to install dependencies
install:
- pip install -r requirements.txt
- travis_wait 50 pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 wxPython
- travis_wait 50 python setup.py install
- pip install PyPubSub==3.3.0 pyyaml ruamel.yaml

# command to run
script: python devsimpy.py
script: travis_wait 20 python devsimpy.py examples/model0.dsp stop
2 changes: 1 addition & 1 deletion PlotGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def OnPlotLine(self, event=None):
m = max([a[1] for a in dd])
dd = [(b[0], b[1]/m) for b in dd]

L.append(plot.PolyLine(d, legend = 'Port %d %s'%(ind,self.legend), colour = cc, width=1))
L.append(plot.PolyLine(dd, legend = 'Port %d %s'%(ind,self.legend), colour = cc, width=1))

a,b,c,d = get_limit(dd)

Expand Down
11 changes: 11 additions & 0 deletions devsimpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,16 @@ def StartSimulationGUIWin(self, arg, diagrams):
evt = wx.PyCommandEvent(wx.EVT_BUTTON.typeId, sf._btn1.GetId())
wx.PostEvent(sf._btn1, evt)

finally:
### Force to close DEVSimPy
try:
arg = sys.argv[-1]
except IndexError:
pass
else:
if arg in ('close','quit'):
self.Close()

##----------------------------------------------
#def AdjustTab(self, evt):
## clic sur simulation
Expand Down Expand Up @@ -2384,6 +2394,7 @@ def SetExceptionHook(self):
sys.stdout.write(_('\t To load an existing dsp with a simulation frame initialized with no time limit: \n\t\t$ python devsimpy.py <absolute path of the .dsp file> ntl/inf/infinity\n'))
sys.stdout.write(_('\t To start simulation: \n\t\t$ python devsimpy.py <absolute path of the .dsp file> ntl/inf/infinity start/go\n'))
sys.stdout.write(_('\t To execute DEVSimPy cleaner: python devsimpy.py -c|-clean\n'))
sys.stdout.write(_('\t To close DEVSimPy: python devsimpy.py close|quit\n'))
sys.stdout.write(_('Authors: L. Capocchi (capocchi@univ-corse.fr)\n'))
sys.exit()

Expand Down