Skip to content

Commit 7b6e33f

Browse files
committed
update
1 parent a0ce9e0 commit 7b6e33f

6 files changed

Lines changed: 29 additions & 9 deletions

File tree

.github/workflows/ci-build-ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,11 @@ jobs:
9090
9191
for file in "${FILES[@]}"; do
9292
xvfb-run -a python "$file" --autoclose
93-
done
93+
done
94+
95+
### Upload test results
96+
- name: Upload Artifact
97+
uses: actions/upload-artifact@v2
98+
with:
99+
name: ubuntu-test-results
100+
path: ./ubuntu-test-results/

.github/workflows/ci-build-windows.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
python -m pip install devsimpy
4040
4141
- name: Test DEVSimPy
42-
run: |
42+
run: |
43+
if: success()
4344
devsimpy --nogui examples/model0/model0.dsp 10
4445
4546
### Test of diag and sub frame
@@ -77,4 +78,11 @@ jobs:
7778
7879
foreach ($file in $FILES) {
7980
python $file --autoclose --nogui
80-
}
81+
}
82+
83+
### Upload test results
84+
- name: Upload Artifact
85+
uses: actions/upload-artifact@v2
86+
with:
87+
name: windows-test-results
88+
path: ./windows-test-results/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
| Category | Status |
88
|------------|--------|
9-
| **Tests** | [![Linux](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml) [![Windows](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml) |
9+
| **Builds & Tests** | [![Linux](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-ubuntu.yml) [![Windows](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/ci-build-windows.yml) |
1010
| **PyPI** | [![PyPI Version](https://img.shields.io/pypi/v/devsimpy)](https://pypi.org/project/devsimpy/) [![Supported Versions](https://img.shields.io/pypi/pyversions/devsimpy?logo=python&logoColor=white)](https://pypi.org/project/devsimpy/) [![Supported Implementations](https://img.shields.io/pypi/implementation/devsimpy)](https://pypi.org/project/devsimpy/) [![Wheel](https://img.shields.io/pypi/wheel/devsimpy)](https://pypi.org/project/devsimpy/) |
1111
| **Activity** | ![Last Commit](https://img.shields.io/github/last-commit/capocchi/devsimpy) [![Commits Since](https://img.shields.io/github/commits-since/capocchi/devsimpy/v5.1)](https://github.com/capocchi/devsimpy/commits) ![Maintained](https://img.shields.io/maintenance/yes/2025) [![PyPI Downloads](https://img.shields.io/pypi/dm/devsimpy)](https://pypi.org/project/devsimpy/) |
1212
| **QA** | [![CodeFactor](https://img.shields.io/codefactor/grade/github/capocchi/devsimpy?logo=codefactor)](https://www.codefactor.io/repository/github/capocchi/devsimpy) [![Flake8](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml) [![mypy](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml/badge.svg)](https://github.com/capocchi/DEVSimPy/actions/workflows/lint.yml) |

devsimpy/Reporter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ def ExceptionHook(exctype, value, trace):
8282

8383
ftrace = FormatTrace(exctype, value, trace)
8484

85+
if not sys.stdout:
86+
sys.stdout = sys.__stdout__
87+
88+
if not sys.stderr:
89+
sys.stderr = sys.__stderr__
90+
8591
# Ensure that error gets raised to console as well
8692
sys.stdout.write(ftrace)
8793

devsimpy/SimulationGUI.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,10 @@ def OnOk(self, event):
453453
else:
454454
self.current_master = self.master
455455

456-
if isinstance(self.parent, wx.Panel):
457-
# stdout redirect only for the Panel mode (if not in OnSimulation)
458-
mainW = self.parent.GetTopLevelParent()
459-
sys.stdout = mainW.stdioWin
456+
# if isinstance(self.parent, wx.Panel):
457+
# # stdout redirect only for the Panel mode (if not in OnSimulation)
458+
# mainW = self.parent.GetTopLevelParent()
459+
# sys.stdout = mainW.stdioWin
460460

461461
### check is model is well loaded
462462
if (self.current_master is None) or (len(self.current_master.getComponentSet()) == 0):

devsimpy/devsimpy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,6 @@ def OnCloseWindow(self, event):
975975
self._mgr.UnInit()
976976
del self._mgr
977977

978-
979978
if GUI_FLAG:
980979
sys.stdout.write(_("DEVSimPy closed!"))
981980

0 commit comments

Comments
 (0)