-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation progress improvments #252
Simulation progress improvments #252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found an error that kinda messed up the testing a bit (ref #253 ), but unrelated to this.
Look through the comments and then this should be good to go.
@@ -2,7 +2,7 @@ | |||
import time | |||
try: | |||
from PyQt4.QtCore import QTimer, pyqtSignal, QVariant, Qt, QAbstractTableModel | |||
from PyQt4.QtGui import QWidget, QPainter, QColor, QFrame, QGridLayout, QImage, QDialog, QTableView, QLabel | |||
from PyQt4.QtGui import QWidget, QPainter, QColor, QFrame, QGridLayout, QImage, QDialog, QTableView, QLabel, QPen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you need import of QPen both for pyqt4 and 5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and for the others as well? e.g. QPainter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick test just to verify at least imports would be nice, ert tests are run with both python2.7/pyqt4 and python4/pyqt5
@@ -81,12 +88,26 @@ def paintEvent(self, event): | |||
for index, (iens, progress) in enumerate(self._current_progress): | |||
y = int(iens / self.grid_width) | |||
x = int(iens - (y * self.grid_width)) | |||
|
|||
#painter.drawText(x * cell_width + cell_width / 2, y * cell_height + cell_height / 2, str(iens)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing comment :)
@@ -52,6 +52,13 @@ def set_progress(self, progress, iteration): | |||
self._current_iteration = iteration | |||
self.update() | |||
|
|||
def has_realization_failed(self, progress): | |||
for job in progress: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return any((job.status == 'Failure' for job in progress))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing and including the suggestions!
resolves #251